fr.cnes.sitools.resources.order
Class DirectOrderResource

java.lang.Object
  extended by ExtendedWadlServerResource
      extended by fr.cnes.sitools.common.resource.AbstractSitoolsResource
          extended by fr.cnes.sitools.common.SitoolsResource
              extended by fr.cnes.sitools.common.resource.SitoolsParameterizedResource
                  extended by fr.cnes.sitools.resources.order.AbstractOrderResource
                      extended by fr.cnes.sitools.resources.order.AbstractDatasetOrderResource
                          extended by fr.cnes.sitools.resources.order.OrderResource
                              extended by fr.cnes.sitools.resources.order.DirectOrderResource
All Implemented Interfaces:
IResource, IOrderResource

public class DirectOrderResource
extends OrderResource

OrderResource to order files and create an archive file 'on the fly' Multiple archive format are available including ZIP, TAR or TAR.GZ

Author:
m.gond

Field Summary
 
Fields inherited from class fr.cnes.sitools.common.SitoolsResource
DEFAULT_MEDIATYPE
 
Constructor Summary
DirectOrderResource()
           
 
Method Summary
 void checkUser()
          Check that the user is allowed to do the order Throw a ResourceException to stop the order execution Can be overridden to change default behaviour
 void doInit()
          Initiate the resource To initialize shared instance of objects between resources, get the component Context from the Settings and put the object in the Context ((SitoolsSettings)getContext().getAttributes().get(ContextAttributes.SETTINGS)).getComponent() .getContext().getAttributes().put(SOME KEY, SOME OBJECT)
 org.restlet.representation.Representation processOrder(ListReferencesAPI listReferences)
          Process the list of files to order.
 
Methods inherited from class fr.cnes.sitools.resources.order.OrderResource
listFilesToOrder
 
Methods inherited from class fr.cnes.sitools.resources.order.AbstractDatasetOrderResource
executeRequest, getCountOnDataset, getOrderName, initialiseOrder, listFilesToOrder, prepareRequest
 
Methods inherited from class fr.cnes.sitools.resources.order.AbstractOrderResource
doInitialiseOrder, doTerminateOrder, executeOrder, getFileName, notifyAdminEnd, orderGet, orderPost, terminateOrder
 
Methods inherited from class fr.cnes.sitools.common.resource.SitoolsParameterizedResource
addStandardResponseInfo, getId, getModel, getOverrideParameterValue, getOverrideParameterValueObject, getOverrideParams, getParameterValue, getParent, setId, setModel, setParent, sitoolsDescribe
 
Methods inherited from class fr.cnes.sitools.common.SitoolsResource
addStandardGetRequestInfo, addStandardInternalServerErrorInfo, addStandardNotificationInfo, addStandardObjectResponseInfo, addStandardPostOrPutRequestInfo, addStandardResourceCollectionFilterInfo, addStandardSimpleResponseInfo, configure, getNotificationObject, getRepresentation, getRepresentation, getSettings, getSitoolsApplication, getSitoolsSetting, trace, trace
 
Methods inherited from class fr.cnes.sitools.common.resource.AbstractSitoolsResource
getMediaType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.cnes.sitools.common.model.IResource
getDescription, getName
 

Constructor Detail

DirectOrderResource

public DirectOrderResource()
Method Detail

doInit

public void doInit()
Description copied from class: SitoolsParameterizedResource
Initiate the resource To initialize shared instance of objects between resources, get the component Context from the Settings and put the object in the Context ((SitoolsSettings)getContext().getAttributes().get(ContextAttributes.SETTINGS)).getComponent() .getContext().getAttributes().put(SOME KEY, SOME OBJECT)

Overrides:
doInit in class AbstractOrderResource

checkUser

public void checkUser()
Description copied from class: AbstractOrderResource
Check that the user is allowed to do the order Throw a ResourceException to stop the order execution Can be overridden to change default behaviour

Overrides:
checkUser in class AbstractOrderResource

processOrder

public org.restlet.representation.Representation processOrder(ListReferencesAPI listReferences)
                                                       throws SitoolsException
Process the list of files to order. Create a Representation of a Archive containing all the ordered files

Overrides:
processOrder in class OrderResource
Parameters:
listReferences - the ListReferencesAPI containing the list of Reference to order
Returns:
a Representation of a Archive containing all the ordered files
Throws:
SitoolsException - if there is any error


Copyright © 2010-2013 CNES. All Rights Reserved.