fr.cnes.sitools.service.storage
Class AbstractStorageResource

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.service.storage.AbstractStorageResource
Direct Known Subclasses:
SearchActionResource, StorageCollectionResource, StorageResource

public abstract class AbstractStorageResource
extends SitoolsResource

Abstract class for common properties of Storage resources

Author:
m.marseille (AKKA Technologies)

Field Summary
 
Fields inherited from class fr.cnes.sitools.common.SitoolsResource
DEFAULT_MEDIATYPE
 
Constructor Summary
AbstractStorageResource()
           
 
Method Summary
 java.lang.String getDirectoryId()
          Get the directory ID found in the API
 org.restlet.representation.Representation getRepresentation(Response response, org.restlet.data.MediaType media)
          Gets representation according to the specified MediaType.
 StorageAdministration getStorageAdministration()
          Get the application associated to the resource
 StorageApplication getStorageApplication()
          Get the application associated to the resource
 StorageDirectory getStorageDirectory(org.restlet.representation.Representation representation)
          Instantiate a StorageDirectory object from representation
 DataStorageStore getStore()
          Get the store associated to the application
 boolean isAlreadyAttached(StorageDirectory input)
          Indicates if an attachment is already present (root comparison)
 
Methods inherited from class fr.cnes.sitools.common.SitoolsResource
addStandardGetRequestInfo, addStandardInternalServerErrorInfo, addStandardNotificationInfo, addStandardObjectResponseInfo, addStandardPostOrPutRequestInfo, addStandardResourceCollectionFilterInfo, addStandardResponseInfo, addStandardSimpleResponseInfo, configure, getNotificationObject, getRepresentation, getSettings, getSitoolsApplication, getSitoolsSetting, trace, trace
 
Methods inherited from class fr.cnes.sitools.common.resource.AbstractSitoolsResource
getMediaType, sitoolsDescribe
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractStorageResource

public AbstractStorageResource()
Method Detail

isAlreadyAttached

public final boolean isAlreadyAttached(StorageDirectory input)
Indicates if an attachment is already present (root comparison)

Parameters:
input - the directory to compare
Returns:
true if already attached

getRepresentation

public org.restlet.representation.Representation getRepresentation(Response response,
                                                                   org.restlet.data.MediaType media)
Gets representation according to the specified MediaType.

Overrides:
getRepresentation in class SitoolsResource
Parameters:
response - : The response to get the representation from
media - : The MediaType asked
Returns:
The Representation of the response with the selected mediaType

getStorageDirectory

public final StorageDirectory getStorageDirectory(org.restlet.representation.Representation representation)
Instantiate a StorageDirectory object from representation

Parameters:
representation - the representation sent
Returns:
a StorageDirectory corresponding to the representation

getStore

public final DataStorageStore getStore()
Get the store associated to the application

Returns:
the store

getDirectoryId

public final java.lang.String getDirectoryId()
Get the directory ID found in the API

Returns:
the ID

getStorageAdministration

public final StorageAdministration getStorageAdministration()
Get the application associated to the resource

Returns:
the application

getStorageApplication

public final StorageApplication getStorageApplication()
Get the application associated to the resource

Returns:
the application


Copyright © 2010-2013 CNES. All Rights Reserved.