I am implementing qsjava application of docusign, as part of the application it is taking the pdf file from local folder i.e,World_Wide_Corp_lorem.pdf. I want to take that file from my accound Link.
I have created the Template and I have added the standard fields like text box.
Here my question is in the api link i.e, https://demo.docusign.net/restapi/v2.1/accounts/accountid/templates/teplateid, I am not getting the statndard fild that I have added in the template, from which api I will get it.
Once I got that field how can I read that my account template api and use that template in my application.
I'll answer your question, but I don't think that's what you are trying to do.
To retrieve the bits of documents inside templates, you can use this endpoint:
GET /restapi/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}
You need to know the documentId of your document, which is typically a number, if you set it yourself you can use "1", "2" etc.a
Now, I wonder if what you want to do is use this template to have someone sign an envelope using that template? that doesn't require you to download the bits.
See this code example that shows how to do this with your template if that's what you're after.
Related
I was assigned to work on this specific project, where we will be getting AFP(advanced function presentation) files and we need to get the documents, i.e.the content and the corresponding meta data. I have been looking into AFP(advanced function presentation) file format and haven't actually got any useful resource about how I should proceed with the task.
I have almost got no information up until now and don't know where to proceed. I looked into some open source projects and found this: https://github.com/yan74/afplib
I tried running it.. But it does not work on the sample AFP file which I have.
Really need some insight upon what resources should I go through to be able this project.
I need to write the code in Java and have gone through some licensed softwares which do the same,like PROARCHIVER and PAPYRUS.
Thanks in advance
AFP is an easy format, it's composed of structured fields, your first step is decoding them, download this: "Mixed Object Document Content Architecture Reference" read first 50 pages and write code to split afp into structured fields, in order to create an easy dump of your file.
After that if you want to extract images AFP world calls them IOCA, so you need: Image Object Content Architecture reference
If you want to extract text (called PTX) you need: Presentation Text Object Content Architecture Reference
good job
I wanted to invert the page of the display order of "item-view" in dspace think this table page is harmful to the user. I wanted to make the downloadable files were shown above the table. Which parameters should I change?
Your question did not specify which version of DSpace you are running. I assume you are using XMLUI since you tagged the question with xslt. Here is a solution referencing the Mirage theme in DSpace 5.x. (If my assumptions are incorrect, please update your question.)
The following code is used to display an item.
These lines display the metadata.
https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace-xmlui/src/main/webapp/themes/Mirage/lib/xsl/aspect/artifactbrowser/item-view.xsl#L50-L52
These lines display the file objects.
https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace-xmlui/src/main/webapp/themes/Mirage/lib/xsl/aspect/artifactbrowser/item-view.xsl#L54-L83
A simple first step would be to change the order of these calls in the xslt template.
The following page outlines how to customize XMLUI: https://wiki.duraspace.org/display/DSDOC5x/XMLUI+Configuration+and+Customization
Do you already have a custom theme? If so, override this template in your custom theme.
If not, you will want to read about XMLUI overlays. You will simply need to copy the files you wish to override into dspace/modules/xmlui/... and apply your changes there.
Let me just start by saying that this is a soft question.
I am rather new to application development, and thus why I'm asking a question without presenting you with any actual code. I know the basics of Java coding, and I was wondering if anyone could enlighten me on the following topic:
Say I have an external website, Craigslist, or some other site that allows me to search through products/services/results manually by typing a query into a searchbox somewhere on the page. The trouble is, that there is no API for this site for me to use.
However I do know that http://sfbay.craigslist.org/search/sss?query=QUERYHERE&sort=rel points me to a list of results, where QUERYHERE is replaced by what I'm looking for.
What I'm wondering here is: is it possible to store these results in an Array (or List or some form of Collection) in Java?
Is there perhaps some library or external tool that can allow me to specify a query to search for, have it paste it in to a search-link, perform the search, and fill an Array with the results?
Or is what I am describing impossible without an API?
This depends, if the query website accepts returning the result as XML or JSON (usually with a .xml or .json at the end of url) you can parse it easily with DOM for XML on Java or download and use the JSONLibrary to parse a JSON.
Otherwise you will receive a HTML that is the page that a user would see in a browser, then you can try parse it as a XML but you will have a lot of work to map all fields in the HTML to get the list as you want.
I am attempting to figure out how to upload a dynamically generated PDF file to SugarCRM using Java.
At first I thought I would simply need to create a Document object and fill in some field expecting a byte[] 64Bit encoded as a String. However, from what I've read online, what I'm looking for is not a Document but a Note with an attachment. That seems like a poor naming convention in use; am I correct in assuming I need to be creating Notes?
In this question I am simply asking for clarification on what a Document is, and if it is suited for containing a PDF document or if the only method for uploading a file like a PDF is through Notes and their attachments.
(I will ask a followup question elsewhere depending on this question's answer.)
Thank you.
You should be able to use both Document and Note, but in SugarCRM they are used for two different things.
Documents: Used for common documents that you want to share with the users and customers (e.g. Letter templates, Product briefs, Terms, etc)
Notes: Used for documents (or files actually) related to a specific Account, Contact, or similar, which most commonly is for the users only (e.g. Business cases, Emails, Contracts, etc)
You can upload both documents and notes to SugarCRM through the Soap API.
Documents: Use set_document_revision
Notes: First use set_entry with a Note, and afterwards set_note_attachment to upload and relate the file
(Disclaimer: I haven't used the "upload documents" in sugarCRM before, but according to the wsdl, it should be possible)
I want to do some development in Java. I'd like to be able to access a website, say for example
www.chipotle.com
On the top right, they have a place where you can enter in your zip code and it will give you all of the nearest locations. The program will just have an empty box for user input for their zip code, and it will query the actual chipotle server to retrieve the nearest locations. How do I do that, and also how is the data I receive stored?
This will probably be a followup question as to what methods I should use to parse the data.
Thanks!
First you need to know the parameters needed to execute the query and the URL which these parameters should be submitted to (the action attribute of the form). With that, your application will have to do an HTTP request to the URL, with your own parameters (possibly only the zip code). Finally parse the answer.
This can be done with standard Java API classes, but it won't be very robust. A better solution would be HttpClient. Here are some examples.
This will probably be a followup question as to what methods I should use to parse the data.
It very much depends on what the website actually returns.
If it returns static HTML, use an regular (strict) or permissive HTML parser should be used.
If it returns dynamic HTML (i.e. HTML with embedded Javascript) you may need to use something that evaluates the Javascript as part of the content extraction process.
There may also be a web API designed for programs (like yours) to use. Such an API would typically return the results as XML or JSON so that you don't have to scrape the results out of an HTML document.
Before you go any further you should check the Terms of Service for the site. Do they say anything about what you are proposing to do?
A lot of sites DO NOT WANT people to scrape their content or provide wrappers for their services. For instance, if they get income from ads shown on their site, what you are proposing to do could result in a diversion of visitors to their site and a resulting loss of potential or actual income.
If you don't respect a website's ToS, you could be on the receiving end of lawyers letters ... or worse. In addition, they could already be using technical means to make life difficult for people to scrape their service.