fr.cnes.sitools.resources.order.cart.common
Class AbstractCartOrderResource

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.cart.common.AbstractCartOrderResource
All Implemented Interfaces:
IResource, IOrderResource
Direct Known Subclasses:
StreamingOrderResource, WgetArchiveOrderResource, WgetListFileOrderResource

public abstract class AbstractCartOrderResource
extends AbstractOrderResource

Abstract class to override for your own CartOrder process

Version:
Author:
m.gond/tx.chevallier

Field Summary
 
Fields inherited from class fr.cnes.sitools.common.SitoolsResource
DEFAULT_MEDIATYPE
 
Constructor Summary
AbstractCartOrderResource()
           
 
Method Summary
 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)
 void doInitialiseOrder()
          Actual method to initialize the order.
 CartSelections getObject(org.restlet.representation.Representation representation, org.restlet.representation.Variant variant)
          Parse a CartSelections object from the given representation
 java.lang.String getOrderName()
          Return the name of the order
 ListReferencesAPI listFilesToOrder()
          Abstract method to list all the files to order.
 void terminateOrder()
          Last step of the order, terminate it and notify the administrator
 
Methods inherited from class fr.cnes.sitools.resources.order.AbstractOrderResource
checkUser, doTerminateOrder, executeOrder, getFileName, initialiseOrder, notifyAdminEnd, orderGet, orderPost, processOrder
 
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

AbstractCartOrderResource

public AbstractCartOrderResource()
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

doInitialiseOrder

public void doInitialiseOrder()
                       throws SitoolsException
Description copied from class: AbstractOrderResource
Actual method to initialize the order. This method can be overridden to change the order initialisation

Overrides:
doInitialiseOrder in class AbstractOrderResource
Throws:
SitoolsException - if there is an error while creating the order

listFilesToOrder

public ListReferencesAPI listFilesToOrder()
                                   throws SitoolsException
Description copied from class: AbstractOrderResource
Abstract method to list all the files to order.

Specified by:
listFilesToOrder in class AbstractOrderResource
Returns:
a ListReferencesAPI containing the list of Reference to order
Throws:
SitoolsException - if there is any error

getOrderName

public java.lang.String getOrderName()
Description copied from class: AbstractOrderResource
Return the name of the order

Specified by:
getOrderName in class AbstractOrderResource
Returns:
the name of the order

terminateOrder

public void terminateOrder()
                    throws SitoolsException
Description copied from class: AbstractOrderResource
Last step of the order, terminate it and notify the administrator

Overrides:
terminateOrder in class AbstractOrderResource
Throws:
SitoolsException - if there is any error

getObject

public final CartSelections getObject(org.restlet.representation.Representation representation,
                                      org.restlet.representation.Variant variant)
Parse a CartSelections object from the given representation

Parameters:
representation - the representation
variant - the variant
Returns:
a CartSelections object


Copyright © 2010-2013 CNES. All Rights Reserved.