fr.cnes.sitools.datasource.mongodb.dbexplorer
Class MongoDBExplorerResource

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.datasource.mongodb.dbexplorer.MongoDBExplorerResource

public class MongoDBExplorerResource
extends SitoolsResource

DBExplorerResource using DataSource for pooled connections

Author:
jp.boignard (AKKA Technologies)

Field Summary
 
Fields inherited from class fr.cnes.sitools.common.SitoolsResource
DEFAULT_MEDIATYPE
 
Constructor Summary
MongoDBExplorerResource()
           
 
Method Summary
 void configure(com.thoughtworks.xstream.XStream xstream, Response response)
          Configure the XStream
 void doInit()
          Initiate the resource
 org.restlet.representation.Representation get(org.restlet.representation.Variant variant)
          Get an representation
 java.lang.String getBaseRef()
          Get base reference
 SitoolsMongoDBDataSource getDataSource()
          Get the DataSource
 int getFetchSize()
          Gets the fetchSize value
 int getLimit()
          Gets the limit value
 int getMaxrows()
          Gets the maxrows value
 int getPaginationExtend()
          Read extend request parameter -> integer - maxrows by default
 int getPaginationStartRecord()
          Read startRecord request parameter -> integer - 0 by default
 int getStart()
          Gets the start value
 boolean isDatabaseTarget()
          Returns if target is a database
 boolean isRecordSetTarget()
          Returns if target is a record set
 boolean isRecordTarget()
          Returns if target is a record
 org.restlet.representation.Representation processConstraint(org.restlet.representation.Variant variant)
          Process constraint
 void setLimit(int limit)
          Sets the value of limit
 void setStart(int start)
          Sets the value of start
 void sitoolsDescribe()
          Method implementation mandatory
 
Methods inherited from class fr.cnes.sitools.common.SitoolsResource
addStandardGetRequestInfo, addStandardInternalServerErrorInfo, addStandardNotificationInfo, addStandardObjectResponseInfo, addStandardPostOrPutRequestInfo, addStandardResourceCollectionFilterInfo, addStandardResponseInfo, addStandardSimpleResponseInfo, 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
 

Constructor Detail

MongoDBExplorerResource

public MongoDBExplorerResource()
Method Detail

sitoolsDescribe

public void sitoolsDescribe()
Description copied from class: AbstractSitoolsResource
Method implementation mandatory

Specified by:
sitoolsDescribe in class AbstractSitoolsResource

isDatabaseTarget

public final boolean isDatabaseTarget()
Returns if target is a database

Returns:
true if database

isRecordSetTarget

public final boolean isRecordSetTarget()
Returns if target is a record set

Returns:
true if record set

isRecordTarget

public final boolean isRecordTarget()
Returns if target is a record

Returns:
true if record

doInit

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


getDataSource

public final SitoolsMongoDBDataSource getDataSource()
Get the DataSource

Returns:
the DataSource associated

processConstraint

public org.restlet.representation.Representation processConstraint(org.restlet.representation.Variant variant)
Process constraint

Parameters:
variant - Client preference
Returns:
Representation to be used

get

@Get
public org.restlet.representation.Representation get(org.restlet.representation.Variant variant)
Get an representation

Parameters:
variant - the variant needed by the client
Returns:
representation with the following variant

getBaseRef

public final java.lang.String getBaseRef()
Get base reference

Returns:
base reference

getPaginationStartRecord

public final int getPaginationStartRecord()
Read startRecord request parameter -> integer - 0 by default

Returns:
startRecord

getPaginationExtend

public final int getPaginationExtend()
Read extend request parameter -> integer - maxrows by default

Returns:
extend

getFetchSize

public final int getFetchSize()
Gets the fetchSize value

Returns:
the fetchSize

getMaxrows

public final int getMaxrows()
Gets the maxrows value

Returns:
the maxrows

configure

public void configure(com.thoughtworks.xstream.XStream xstream,
                      Response response)
Configure the XStream

Overrides:
configure in class SitoolsResource
Parameters:
xstream - the XStream to treat
response - the response used

getStart

public int getStart()
Gets the start value

Returns:
the start

setStart

public void setStart(int start)
Sets the value of start

Parameters:
start - the start to set

getLimit

public int getLimit()
Gets the limit value

Returns:
the limit

setLimit

public void setLimit(int limit)
Sets the value of limit

Parameters:
limit - the limit to set


Copyright © 2010-2013 CNES. All Rights Reserved.