com.jurismarches.vradi.services
Class FileServiceImpl

java.lang.Object
  extended by com.jurismarches.vradi.services.FileServiceImpl
All Implemented Interfaces:
FileService

public class FileServiceImpl
extends Object
implements FileService

File service impl.

Version:
$Revision: 1452 $ Last update : $Date: 2010-09-20 15:38:19 +0200 (lun., 20 sept. 2010) $ By : $Author: chatellier $
Author:
chatellier

Constructor Summary
FileServiceImpl()
           
 
Method Summary
 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.
 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
 

Constructor Detail

FileServiceImpl

public FileServiceImpl()
Method Detail

uploadTemplate

public String uploadTemplate(File file,
                             String extensionName)
                      throws VradiException
Description copied from interface: FileService
Upload a template on server.

Specified by:
uploadTemplate in interface FileService
Parameters:
file - file to upload
extensionName - extension name to put file into
Returns:
file uri to reference file
Throws:
VradiException - throw VradiException if exception is occured

downloadTemplate

public File downloadTemplate(String extensionName,
                             String templateName)
Description copied from interface: FileService
Download file. File may be temporary.

Specified by:
downloadTemplate in interface FileService
Parameters:
extensionName - extension name
templateName - template name
Returns:
locally downloaded file

uploadWebHarvestScript

public String uploadWebHarvestScript(File file)
                              throws VradiException
Description copied from interface: FileService
Upload a web harvest script on server.

Specified by:
uploadWebHarvestScript in interface FileService
Parameters:
file - file to upload
Returns:
file uri to reference file
Throws:
VradiException - throw VradiException if exception is occured

downloadWebHarvestScript

public File downloadWebHarvestScript(String uri)
Description copied from interface: FileService
Download file. File may be temporary.

Specified by:
downloadWebHarvestScript in interface FileService
Parameters:
uri - file uri to download
Returns:
locally downloaded file

downloadPDF

public File downloadPDF(String uri)
Description copied from interface: FileService
Download pdf file. File may be temporary.

Specified by:
downloadPDF in interface FileService
Parameters:
uri - file uri to download
Returns:
locally downloaded file

uploadFormAttachment

public String uploadFormAttachment(File file,
                                   String formId)
                            throws VradiException
Description copied from interface: FileService
Upload a form attachment.

Specified by:
uploadFormAttachment in interface FileService
Parameters:
file - file to upload
formId - form id
Returns:
file uri to reference file
Throws:
VradiException - if an exception occurred

uploadTempFile

public String uploadTempFile(File file)
                      throws VradiException
Description copied from interface: FileService
Upload a temporary file (for example for export).

Specified by:
uploadTempFile in interface FileService
Parameters:
file - The file to upload
Returns:
an absolute URI on server file system
Throws:
VradiException - if an exception occurred

downloadFormAttachment

public File downloadFormAttachment(String uri)
Description copied from interface: FileService
Download file. File may be temporary.

Specified by:
downloadFormAttachment in interface FileService
Parameters:
uri - file uri to download
Returns:
locally downloaded file

uploadFormEmbeddedFile

public String uploadFormEmbeddedFile(File file,
                                     String formId)
                              throws VradiException
Description copied from interface: FileService
Upload a form attachement.

Specified by:
uploadFormEmbeddedFile in interface FileService
Parameters:
file - file to upload
formId - form id
Returns:
file uri to reference file
Throws:
VradiException - throw VradiException if exception is occured

downloadFormEmbeddedFile

public File downloadFormEmbeddedFile(String uri)
Description copied from interface: FileService
Download file. File may be temporary.

Specified by:
downloadFormEmbeddedFile in interface FileService
Parameters:
uri - file uri to download
Returns:
locally downloaded file

downloadRequestHistory

public File downloadRequestHistory(String uri)
                            throws VradiException
Description copied from interface: FileService
Download request histiory file. File may be temporary.

Specified by:
downloadRequestHistory in interface FileService
Parameters:
uri - corresponding to history
Returns:
url to go to file
Throws:
VradiException - throw VradiException if exception is occured

getRequestHistoryURL

public String getRequestHistoryURL(String uri)
                            throws VradiException
Description copied from interface: FileService
Download request histiory file. File may be temporary.

Specified by:
getRequestHistoryURL in interface FileService
Parameters:
uri - corresponding to history
Returns:
url to go to file
Throws:
VradiException - throw VradiException if exception is occured


Copyright © 2009-2010 JurisMarches. All Rights Reserved.