fr.cnes.sitools.feeds
Class AbstractFeedsResource

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.feeds.AbstractFeedsResource
Direct Known Subclasses:
FeedsAdminResource, FeedsCollectionResource, FeedsNotificationResource

public abstract class AbstractFeedsResource
extends SitoolsResource

Abstract Resource class for Feeds management

Author:
m.gond (AKKA Technologies)

Field Summary
 
Fields inherited from class fr.cnes.sitools.common.SitoolsResource
DEFAULT_MEDIATYPE
 
Constructor Summary
AbstractFeedsResource()
           
 
Method Summary
 void doInit()
          Initiate the resource
 java.lang.String getDataId()
          Gets the dataId value
 FeedCollectionModel getFeedCollectionModel(org.restlet.representation.Representation representation, org.restlet.representation.Variant variant)
          Gets the Object FeedsModel
 FeedsApplication getFeedsApplication()
          Gets the application value
 java.lang.String getFeedsId()
          Gets the feedsId value
 FeedModel getObject(org.restlet.representation.Representation representation, org.restlet.representation.Variant variant)
          Gets the Object FeedsModel
 org.restlet.representation.Representation getRepresentation(Response response, org.restlet.data.MediaType media, boolean omitEntries)
          Response to Representation
 org.restlet.representation.Representation getRepresentation(Response response, org.restlet.representation.Variant variant, boolean omitEntries)
          Gets representation according to the specified Variant if present.
 SitoolsStore<FeedModel> getStore()
          Gets the store value
 void registerObserver(FeedModel input)
          Register as observer
static void sortEntries(FeedModel feedInput)
          Sort the entries of the specified feedInput
 void unregisterObserver(FeedModel input)
          Unregister as Observer
 Response validateFeed(FeedModel feedsInput)
          Check that the name is unique over the feeds collection
 
Methods inherited from class fr.cnes.sitools.common.SitoolsResource
addStandardGetRequestInfo, addStandardInternalServerErrorInfo, addStandardNotificationInfo, addStandardObjectResponseInfo, addStandardPostOrPutRequestInfo, addStandardResourceCollectionFilterInfo, addStandardResponseInfo, addStandardSimpleResponseInfo, configure, getNotificationObject, getRepresentation, 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

AbstractFeedsResource

public AbstractFeedsResource()
Method Detail

doInit

public final 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,
                                                                         boolean omitEntries)
Gets representation according to the specified Variant if present. If variant is null (when content negotiation = false) sets the variant to the first client accepted mediaType.

Parameters:
response - Response
variant - Variant
omitEntries - boolean
Returns:
Representation

getRepresentation

public final org.restlet.representation.Representation getRepresentation(Response response,
                                                                         org.restlet.data.MediaType media,
                                                                         boolean omitEntries)
Response to Representation

Parameters:
response - Response
media - MediaType
omitEntries - boolean
Returns:
Representation FeedModel representation

getObject

public final FeedModel getObject(org.restlet.representation.Representation representation,
                                 org.restlet.representation.Variant variant)
Gets the Object FeedsModel

Parameters:
representation - the representation
variant - the variant
Returns:
an Object FeedsModel

getFeedCollectionModel

public final FeedCollectionModel getFeedCollectionModel(org.restlet.representation.Representation representation,
                                                        org.restlet.representation.Variant variant)
Gets the Object FeedsModel

Parameters:
representation - the representation
variant - the variant
Returns:
an Object FeedsModel

registerObserver

public final void registerObserver(FeedModel input)
Register as observer

Parameters:
input - The ConverterChainedModel

unregisterObserver

public final void unregisterObserver(FeedModel input)
Unregister as Observer

Parameters:
input - ConverterChainedModel Object

sortEntries

public static final void sortEntries(FeedModel feedInput)
Sort the entries of the specified feedInput

Parameters:
feedInput - the feedInput to sort

validateFeed

public final Response validateFeed(FeedModel feedsInput)
Check that the name is unique over the feeds collection

Parameters:
feedsInput - the feed to check with the collection
Returns:
a Response with the error message if the checking fail, null otherwise

getFeedsApplication

public final FeedsApplication getFeedsApplication()
Gets the application value

Returns:
the application

getStore

public final SitoolsStore<FeedModel> getStore()
Gets the store value

Returns:
the store

getFeedsId

public final java.lang.String getFeedsId()
Gets the feedsId value

Returns:
the feedsId

getDataId

public final java.lang.String getDataId()
Gets the dataId value

Returns:
the dataId


Copyright © 2010-2013 CNES. All Rights Reserved.