|
||||||||||
| 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,
String... additionalParams)
Build post url. |
protected File |
downloadFile(String fileUrl)
|
File |
downloadFormAttachment(String uri)
Download file. |
File |
downloadFormEmbeddedFile(String uri)
Download file. |
File |
downloadPDF(String uri)
Download pdf file. |
File |
downloadRequestHistory(String uri)
Download request histiory file. |
File |
downloadTemplate(String extensionName,
String templateName)
Download file. |
File |
downloadWebHarvestScript(String uri)
Download file. |
String |
getRequestHistoryURL(String uri)
Download request histiory file. |
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,
String... additionalParams)
endpoint - endpointadditionalParams - parameters to be added to the url
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 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 downloadPDF(String uri)
throws VradiException
FileService
downloadPDF in interface FileServiceuri - file uri to download
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 downloadFormEmbeddedFile(String uri)
throws VradiException
FileService
downloadFormEmbeddedFile in interface FileServiceuri - file uri to download
VradiException - throw VradiException if exception is occured
public File downloadRequestHistory(String uri)
throws VradiException
FileService
downloadRequestHistory in interface FileServiceuri - 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 | |||||||||