|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jurismarches.vradi.services.FileServiceProxy
public class FileServiceProxy
This proxy can handle i/o API and manage file upload on servlet. FileService -> FileServiceProxy -> FileServlet -> FileServiceImpl. Based on commons http client. Principe:
| Field Summary | |
|---|---|
protected String |
serviceEndpoint
Remote service endpoint. |
| Constructor Summary | |
|---|---|
FileServiceProxy(String serviceEndpoint)
Constructor with remote service endpoint. |
|
| Method Summary | |
|---|---|
protected String |
buildUrl(String endpoint,
boolean convertUrl,
String... additionalParams)
Build post url. |
protected File |
downloadFile(String fileUrl)
|
File |
downloadFormAttachment(boolean convertUrl,
String fileName,
String formId)
Download file. |
File |
downloadFormAttachment(String uri)
Download file. |
File |
downloadFormAttachment(String fileName,
String formId)
Download file. |
File |
downloadFormEmbeddedFile(boolean convertUrl,
String fileName,
String formId)
Download file. |
File |
downloadFormEmbeddedFile(String uri)
Download file. |
File |
downloadFormEmbeddedFile(String fileName,
String formId)
Download file. |
File |
downloadPDF(boolean convertUrl,
String uri)
Download pdf file. |
File |
downloadPDF(String uri)
Download pdf file. |
File |
downloadRequestHistory(boolean convretUrl,
String uri)
Download request history file. |
File |
downloadRequestHistory(String uri)
Download request histiory file. |
File |
downloadTemplate(boolean convertUrl,
String extensionName,
String templateName)
Download file. |
File |
downloadTemplate(String extensionName,
String templateName)
Download file. |
File |
downloadWebHarvestScript(boolean convertUrl,
String uri)
Download file. |
File |
downloadWebHarvestScript(String uri)
Download file. |
String |
getFormEmbeddedUrl(String fileName,
String formId)
|
String |
getPDFUrl(String uri)
Download pdf file. |
String |
getRequestHistoryURL(String uri)
Get the url of request history. |
protected String |
uploadFile(File file,
String postUrl)
|
String |
uploadFormAttachment(File file,
String formId)
Upload a form attachment. |
String |
uploadFormEmbeddedFile(File file,
String formId)
Upload a form attachement. |
String |
uploadTempFile(File file)
Upload a temporary file (for example for export). |
String |
uploadTemplate(File file,
String extensionName)
Upload a template on server. |
String |
uploadWebHarvestScript(File file)
Upload a web harvest script on server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String serviceEndpoint
| Constructor Detail |
|---|
public FileServiceProxy(String serviceEndpoint)
serviceEndpoint - remote service endpoint| Method Detail |
|---|
public String uploadTemplate(File file,
String extensionName)
throws VradiException
FileService
uploadTemplate in interface FileServicefile - file to uploadextensionName - extension name to put file into
VradiException - throw VradiException if exception is occured
public String uploadWebHarvestScript(File file)
throws VradiException
FileService
uploadWebHarvestScript in interface FileServicefile - file to upload
VradiException - throw VradiException if exception is occured
public String uploadFormAttachment(File file,
String formId)
throws VradiException
FileService
uploadFormAttachment in interface FileServicefile - file to uploadformId - form id
VradiException - if an exception occurred
public String uploadTempFile(File file)
throws VradiException
FileService
uploadTempFile in interface FileServicefile - The file to upload
VradiException - if an exception occurred
public String uploadFormEmbeddedFile(File file,
String formId)
throws VradiException
FileService
uploadFormEmbeddedFile in interface FileServicefile - file to uploadformId - form id
VradiException - throw VradiException if exception is occured
protected String buildUrl(String endpoint,
boolean convertUrl,
String... additionalParams)
throws VradiException
endpoint - endpointconvertUrl - if url must be encodeadditionalParams - parameters to be added to the url
VradiException - if url error
protected String uploadFile(File file,
String postUrl)
throws VradiException
VradiException
protected File downloadFile(String fileUrl)
throws VradiException
VradiException
public File downloadWebHarvestScript(String uri)
throws VradiException
FileService
downloadWebHarvestScript in interface FileServiceuri - file uri to download
VradiException - throw VradiException if exception is occured
public File downloadWebHarvestScript(boolean convertUrl,
String uri)
throws VradiException
FileService
downloadWebHarvestScript in interface FileServiceconvertUrl - if convertion url is necessaryuri - file uri to download
VradiException - throw VradiException if exception is occured
public File downloadTemplate(String extensionName,
String templateName)
throws VradiException
FileService
downloadTemplate in interface FileServiceextensionName - extension nametemplateName - template name
VradiException - throw VradiException if exception is occured
public File downloadTemplate(boolean convertUrl,
String extensionName,
String templateName)
throws VradiException
FileService
downloadTemplate in interface FileServiceconvertUrl - if convertion url is necessaryextensionName - extension nametemplateName - template name
VradiException - throw VradiException if exception is occured
public File downloadPDF(String uri)
throws VradiException
FileService
downloadPDF in interface FileServiceuri - file uri to download
VradiException - throw VradiException if exception is occured
public File downloadPDF(boolean convertUrl,
String uri)
throws VradiException
FileService
downloadPDF in interface FileServiceconvertUrl - if convertion url is necessaryuri - file uri to download
VradiException - throw VradiException if exception is occured
public String getPDFUrl(String uri)
throws VradiException
FileService
getPDFUrl in interface FileServiceuri - corresponding to history
VradiException - throw VradiException if exception is occured
public File downloadFormAttachment(String uri)
throws VradiException
FileService
downloadFormAttachment in interface FileServiceuri - file uri to download
VradiException - throw VradiException if exception is occured
public File downloadFormAttachment(String fileName,
String formId)
throws VradiException
FileService
downloadFormAttachment in interface FileServicefileName - to downloadformId - concerned
VradiException - throw VradiException if exception is occured
public File downloadFormAttachment(boolean convertUrl,
String fileName,
String formId)
throws VradiException
FileService
downloadFormAttachment in interface FileServiceconvertUrl - if convertion url is necessary
VradiException - throw VradiException if exception is occured
public File downloadFormEmbeddedFile(String uri)
throws VradiException
FileService
downloadFormEmbeddedFile in interface FileServiceuri - file uri to download
VradiException - throw VradiException if exception is occured
public File downloadFormEmbeddedFile(String fileName,
String formId)
throws VradiException
FileService
downloadFormEmbeddedFile in interface FileServicefileName - to downloadformId - form id
VradiException - throw VradiException if exception is occured
public File downloadFormEmbeddedFile(boolean convertUrl,
String fileName,
String formId)
throws VradiException
FileService
downloadFormEmbeddedFile in interface FileServiceconvertUrl - if convertion url is necessaryfileName - to downloadformId - form id
VradiException - throw VradiException if exception is occured
public String getFormEmbeddedUrl(String fileName,
String formId)
throws VradiException
getFormEmbeddedUrl in interface FileServiceVradiException
public File downloadRequestHistory(String uri)
throws VradiException
FileService
downloadRequestHistory in interface FileServiceuri - corresponding to history
VradiException - throw VradiException if exception is occured
public File downloadRequestHistory(boolean convretUrl,
String uri)
throws VradiException
FileService
downloadRequestHistory in interface FileServiceconvretUrl - if convertion url is necessaryuri - corresponding to history
VradiException - throw VradiException if exception is occured
public String getRequestHistoryURL(String uri)
throws VradiException
FileService
getRequestHistoryURL in interface FileServiceuri - corresponding to history
VradiException - throw VradiException if exception is occured
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||