|
||||||||||
| 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 java.lang.String |
serviceEndpoint
Remote service endpoint. |
| Constructor Summary | |
|---|---|
FileServiceProxy(java.lang.String serviceEndpoint)
Constructor with remote service endpoint. |
|
| Method Summary | |
|---|---|
protected java.lang.String |
buildUrl(java.lang.String endpoint,
java.lang.String... additionalParams)
Build post url. |
protected java.io.File |
downloadFile(java.lang.String fileUrl)
|
java.io.File |
downloadFormAttachment(java.lang.String uri)
Download file. |
java.io.File |
downloadFormEmbeddedFile(java.lang.String uri)
Download file. |
java.io.File |
downloadPDF(java.lang.String uri)
Download pdf file. |
java.io.File |
downloadRequestHistory(java.lang.String uri)
Download request histiory file. |
java.io.File |
downloadTemplate(java.lang.String extensionName,
java.lang.String templateName)
Download file. |
java.io.File |
downloadWebHarvestScript(java.lang.String uri)
Download file. |
java.lang.String |
getRequestHistoryURL(java.lang.String uri)
Download request histiory file. |
protected java.lang.String |
uploadFile(java.io.File file,
java.lang.String postUrl)
|
java.lang.String |
uploadFormAttachment(java.io.File file,
java.lang.String formId)
Upload a form attachment. |
java.lang.String |
uploadFormEmbeddedFile(java.io.File file,
java.lang.String formId)
Upload a form attachement. |
java.lang.String |
uploadTempFile(java.io.File file)
Upload a temporary file (for example for export). |
java.lang.String |
uploadTemplate(java.io.File file,
java.lang.String extensionName)
Upload a template on server. |
java.lang.String |
uploadWebHarvestScript(java.io.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 java.lang.String serviceEndpoint
| Constructor Detail |
|---|
public FileServiceProxy(java.lang.String serviceEndpoint)
serviceEndpoint - remote service endpoint| Method Detail |
|---|
public java.lang.String uploadTemplate(java.io.File file,
java.lang.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 java.lang.String uploadWebHarvestScript(java.io.File file)
throws VradiException
FileService
uploadWebHarvestScript in interface FileServicefile - file to upload
VradiException - throw VradiException if exception is occured
public java.lang.String uploadFormAttachment(java.io.File file,
java.lang.String formId)
throws VradiException
FileService
uploadFormAttachment in interface FileServicefile - file to uploadformId - form id
VradiException - if an exception occurred
public java.lang.String uploadTempFile(java.io.File file)
throws VradiException
FileService
uploadTempFile in interface FileServicefile - The file to upload
VradiException - if an exception occurred
public java.lang.String uploadFormEmbeddedFile(java.io.File file,
java.lang.String formId)
throws VradiException
FileService
uploadFormEmbeddedFile in interface FileServicefile - file to uploadformId - form id
VradiException - throw VradiException if exception is occured
protected java.lang.String buildUrl(java.lang.String endpoint,
java.lang.String... additionalParams)
endpoint - endpointadditionalParams - parameters to be added to the url
protected java.lang.String uploadFile(java.io.File file,
java.lang.String postUrl)
throws VradiException
VradiException
protected java.io.File downloadFile(java.lang.String fileUrl)
throws VradiException
VradiException
public java.io.File downloadWebHarvestScript(java.lang.String uri)
throws VradiException
FileService
downloadWebHarvestScript in interface FileServiceuri - file uri to download
VradiException - throw VradiException if exception is occured
public java.io.File downloadTemplate(java.lang.String extensionName,
java.lang.String templateName)
throws VradiException
FileService
downloadTemplate in interface FileServiceextensionName - extension nametemplateName - template name
VradiException - throw VradiException if exception is occured
public java.io.File downloadPDF(java.lang.String uri)
throws VradiException
FileService
downloadPDF in interface FileServiceuri - file uri to download
VradiException - throw VradiException if exception is occured
public java.io.File downloadFormAttachment(java.lang.String uri)
throws VradiException
FileService
downloadFormAttachment in interface FileServiceuri - file uri to download
VradiException - throw VradiException if exception is occured
public java.io.File downloadFormEmbeddedFile(java.lang.String uri)
throws VradiException
FileService
downloadFormEmbeddedFile in interface FileServiceuri - file uri to download
VradiException - throw VradiException if exception is occured
public java.io.File downloadRequestHistory(java.lang.String uri)
throws VradiException
FileService
downloadRequestHistory in interface FileServiceuri - corresponding to history
VradiException - throw VradiException if exception is occured
public java.lang.String getRequestHistoryURL(java.lang.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 | |||||||||