fr.opensagres.xdocreport.remoting.resources.services.server.file
Class FileResourcesService

java.lang.Object
  extended by fr.opensagres.xdocreport.remoting.resources.services.AbstractResourcesService
      extended by fr.opensagres.xdocreport.remoting.resources.services.server.file.FileResourcesService
All Implemented Interfaces:
JAXRSResourcesService, JAXWSResourcesService, ResourcesService
Direct Known Subclasses:
WebAppResourcesServiceListener

public abstract class FileResourcesService
extends AbstractResourcesService
implements JAXRSResourcesService, JAXWSResourcesService


Constructor Summary
FileResourcesService(File rootFolder)
           
FileResourcesService(File rootFolder, boolean templateHierarchy)
           
 
Method Summary
 BinaryData download(String resourceId)
          Download the content of the given unique resource id.
 LargeBinaryData downloadLarge(String resourceId)
           
protected  String getResourcePath(String resourceId)
           
 File getRootFolder()
           
 Resource getRootWithFilter(Filter filter)
           
 Resource toResource(File file, Resource parent)
           
 Resource toSimpleResource(File file, Resource parent)
           
 void upload(BinaryData data)
           
 void uploadLarge(LargeBinaryData data)
           
 
Methods inherited from class fr.opensagres.xdocreport.remoting.resources.services.AbstractResourcesService
downloadMultiple, getInputStream, getRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.opensagres.xdocreport.remoting.resources.services.jaxrs.JAXRSResourcesService
getName, getRoot
 
Methods inherited from interface fr.opensagres.xdocreport.remoting.resources.services.jaxws.JAXWSResourcesService
downloadMultiple, getName, getRoot
 

Constructor Detail

FileResourcesService

public FileResourcesService(File rootFolder)

FileResourcesService

public FileResourcesService(File rootFolder,
                            boolean templateHierarchy)
Method Detail

getRootWithFilter

public Resource getRootWithFilter(Filter filter)
Specified by:
getRootWithFilter in interface JAXWSResourcesService
Specified by:
getRootWithFilter in interface ResourcesService

download

public BinaryData download(String resourceId)
                    throws ResourcesException
Description copied from interface: ResourcesService
Download the content of the given unique resource id.

Specified by:
download in interface JAXRSResourcesService
Specified by:
download in interface JAXWSResourcesService
Specified by:
download in interface ResourcesService
Returns:
the byte array of the content of the given resourcePath.
Throws:
ResourcesException

getResourcePath

protected String getResourcePath(String resourceId)

downloadLarge

public LargeBinaryData downloadLarge(String resourceId)
                              throws ResourcesException
Specified by:
downloadLarge in interface JAXRSResourcesService
Throws:
ResourcesException

uploadLarge

public void uploadLarge(LargeBinaryData data)
                 throws ResourcesException
Specified by:
uploadLarge in interface JAXRSResourcesService
Throws:
ResourcesException

upload

public void upload(BinaryData data)
            throws ResourcesException
Specified by:
upload in interface JAXRSResourcesService
Specified by:
upload in interface JAXWSResourcesService
Specified by:
upload in interface ResourcesService
Throws:
ResourcesException

getRootFolder

public File getRootFolder()

toSimpleResource

public Resource toSimpleResource(File file,
                                 Resource parent)

toResource

public Resource toResource(File file,
                           Resource parent)


Copyright © 2013. All rights reserved.