fr.cnes.sitools.portal
Class AbstractPortalResource

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.portal.AbstractPortalResource
Direct Known Subclasses:
PortalResource

public abstract class AbstractPortalResource
extends SitoolsResource

Base class for portal management resources.

Author:
jp.boignard (AKKA Technologies)

Field Summary
 
Fields inherited from class fr.cnes.sitools.common.SitoolsResource
DEFAULT_MEDIATYPE
 
Constructor Summary
AbstractPortalResource()
           
 
Method Summary
 void configure(com.thoughtworks.xstream.XStream xstream, Response response)
          Configure XStream mapping for xml and json serialisation
 void doInit()
          Initiate the resource
 Portal getObject(org.restlet.representation.Representation representation, org.restlet.representation.Variant variant)
          Decode the given representation to a Portal object.
 PortalApplication getPortalApplication()
          Get the portal application associated to the resource
 java.lang.String getPortalId()
          Get the portal ID
 org.restlet.representation.Representation getRepresentation(Response response, org.restlet.data.MediaType media)
          Gets a representation according to the requested media
 org.restlet.representation.Representation getRepresentation(Response response, org.restlet.representation.Variant variant)
          Gets representation according to the specified Variant if present.
 PersistenceDao<Portal> getStore()
          Return the store associated to the Portal resource
 
Methods inherited from class fr.cnes.sitools.common.SitoolsResource
addStandardGetRequestInfo, addStandardInternalServerErrorInfo, addStandardNotificationInfo, addStandardObjectResponseInfo, addStandardPostOrPutRequestInfo, addStandardResourceCollectionFilterInfo, addStandardResponseInfo, addStandardSimpleResponseInfo, getNotificationObject, 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

AbstractPortalResource

public AbstractPortalResource()
Method Detail

doInit

public void doInit()
Description copied from class: SitoolsResource
Initiate the resource


getRepresentation

public final org.restlet.representation.Representation getRepresentation(Response response,
                                                                         org.restlet.representation.Variant variant)
Gets representation according to the specified Variant if present. If variant is null (when content negociation = false) sets the variant to the first client accepted mediaType.

Overrides:
getRepresentation in class SitoolsResource
Parameters:
response - : The response to get the representation from
variant - : The variant needed
Returns:
Representation

configure

public final void configure(com.thoughtworks.xstream.XStream xstream,
                            Response response)
Configure XStream mapping for xml and json serialisation

Overrides:
configure in class SitoolsResource
Parameters:
xstream - XStream
response - Response

getRepresentation

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

Overrides:
getRepresentation in class SitoolsResource
Parameters:
response - Response
media - requested MediaType
Returns:
ObjectRepresentation or XStreamRepresentation

getObject

public final Portal getObject(org.restlet.representation.Representation representation,
                              org.restlet.representation.Variant variant)
Decode the given representation to a Portal object.

Parameters:
representation - Representation
variant - Variant
Returns:
Portal

getPortalId

public final java.lang.String getPortalId()
Get the portal ID

Returns:
the portal ID as String

getStore

public final PersistenceDao<Portal> getStore()
Return the store associated to the Portal resource

Returns:
the store

getPortalApplication

public final PortalApplication getPortalApplication()
Get the portal application associated to the resource

Returns:
the portal application handling the resource


Copyright © 2010-2013 CNES. All Rights Reserved.