|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectExtendedWadlServerResource
fr.cnes.sitools.common.resource.AbstractSitoolsResource
fr.cnes.sitools.common.SitoolsResource
fr.cnes.sitools.common.resource.SitoolsParameterizedResource
fr.cnes.sitools.resources.order.AbstractOrderResource
public abstract class AbstractOrderResource
Abstract Resource to handle Orders
Developer must implement
public abstract ListReferencesAPI listFilesToOrder(DatabaseRequest dbRequest) throws SitoolsException;
andpublic abstract Representation processOrder(ListReferencesAPI listReferences) throws SitoolsException;
| Field Summary |
|---|
| Fields inherited from class fr.cnes.sitools.common.SitoolsResource |
|---|
DEFAULT_MEDIATYPE |
| Constructor Summary | |
|---|---|
AbstractOrderResource()
|
|
| 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) |
void |
doInitialiseOrder()
Actual method to initialize the order. |
void |
doTerminateOrder()
Terminate the order. |
org.restlet.representation.Representation |
executeOrder()
Execute the order |
java.lang.String |
getFileName()
Get the fileName from the request or the model. |
abstract java.lang.String |
getOrderName()
Return the name of the order |
void |
initialiseOrder()
First step of the order, Initialize it |
abstract ListReferencesAPI |
listFilesToOrder()
Abstract method to list all the files to order. |
void |
notifyAdminEnd()
Notify the administrator. |
org.restlet.representation.Representation |
orderGet(org.restlet.representation.Variant variant)
|
org.restlet.representation.Representation |
orderPost(org.restlet.representation.Representation represent,
org.restlet.representation.Variant variant)
|
abstract org.restlet.representation.Representation |
processOrder(ListReferencesAPI listReferences)
Process the list of files to order |
void |
terminateOrder()
Last step of the order, terminate it and notify the administrator |
| 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.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 |
|---|
public AbstractOrderResource()
| Method Detail |
|---|
public void doInit()
SitoolsParameterizedResource
doInit in class SitoolsParameterizedResource
public final org.restlet.representation.Representation orderPost(org.restlet.representation.Representation represent,
org.restlet.representation.Variant variant)
orderPost in interface IOrderResourcepublic final org.restlet.representation.Representation orderGet(org.restlet.representation.Variant variant)
orderGet in interface IOrderResource
public void initialiseOrder()
throws java.lang.Exception
java.lang.Exception - if there is any error
public org.restlet.representation.Representation executeOrder()
throws SitoolsException
Representation result of the order or null if the result
is stored on the server
SitoolsException - if there is any error
public void terminateOrder()
throws SitoolsException
SitoolsException - if there is any error
public void doInitialiseOrder()
throws SitoolsException
SitoolsException - if there is an error while creating the order
public abstract ListReferencesAPI listFilesToOrder()
throws SitoolsException
ListReferencesAPI containing the list of Reference to
order
SitoolsException - if there is any error
public abstract org.restlet.representation.Representation processOrder(ListReferencesAPI listReferences)
throws SitoolsException
listReferences - the ListReferencesAPI containing the list of Reference to
order
Representation or null if the response is stored on the
server
SitoolsException - if there is any errorpublic abstract java.lang.String getOrderName()
public void doTerminateOrder()
throws SitoolsException
SitoolsException - is there is any error
public void notifyAdminEnd()
throws SitoolsException
SitoolsException - if here is any errorpublic void checkUser()
public java.lang.String getFileName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||