Package com.jalios.jcms.rest.resources
Class DataResource
java.lang.Object
org.restlet.resource.Resource
com.jalios.jcms.rest.JcmsRestResource
com.jalios.jcms.rest.DataRestResource
com.jalios.jcms.rest.DataCollectionRestResource
com.jalios.jcms.rest.resources.DataResource
- All Implemented Interfaces:
MashupConstants,RestConstants
Rest Resource for Data management.
Give a way to access and modify data through REST.
- Since:
- JCMS-6.0
- Author:
- dissert
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jalios.jcms.rest.JcmsRestResource
JcmsRestResource.DataCollectionWrapper -
Field Summary
Fields inherited from class com.jalios.jcms.rest.DataRestResource
data, relatedsFields inherited from class com.jalios.jcms.rest.JcmsRestResource
channel, checkCSRF, context, formQueryString, j2eeRequest, jcmsContext, pagerData, queryString, xmlEncodingFields inherited from interface com.jalios.jcms.mashup.MashupConstants
DATA_TAG, DATASET_TAG, FIELD_CLASS, FIELD_ENTRY, FIELD_ITEM, FIELD_KEY, FIELD_NAME, FIELD_TAG, FIELD_VALUE, FILE_FIELD, FILE_ID, FILE_MTIME, FILE_SIZE, FILE_TAG, FILE_TICKET, FILESET_TAG, RELATED_TAGFields inherited from interface com.jalios.jcms.rest.RestConstants
CSRF_HEADER_NAME, HTTP_HEADERS, METHOD_OVERRIDE_HTTP_HEADER, UTS_ADMIN, UTS_ADMIN_CHECK_0, UTS_ADMIN_CHECK_1, UTS_ADMIN_CHECK_2, UTS_ADMIN_INDEX_SNAPSHOT, UTS_ADMIN_INSTANCE_REPORT_SEND, UTS_ADMIN_MEMBER_PREFERENCES, UTS_ADMIN_MEMBER_PREFERENCES_2, UTS_ADMIN_PLUGINS, UTS_ADMIN_PREFIX, UTS_ADMIN_PROPS_1, UTS_ADMIN_PROPS_2, UTS_ADMIN_PROPS_3, UTS_ADMIN_STATUS, UTS_ALERT, UTS_ALERT_LIST, UTS_ALERT_LIST_LEGACY, UTS_ALERT_WS, UTS_CHANNEL_NAME, UTS_DATA_CHILDREN, UTS_DATA_PARAM, UTS_DATATYPE_ITEM, UTS_DATATYPE_LIST, UTS_DOC, UTS_JSYNC_REQUEST, UTS_LOCK, UTS_MEMBER_ITEM, UTS_MEMBER_PHOTO_UPDATE, UTS_MEMBER_PREFERENCES_2_ITEM, UTS_MEMBER_PREFERENCES_ITEM, UTS_MSG_ENC_OPTIONS_ITEM, UTS_PUSH, UTS_SEARCH, UTS_SEARCH_CAT, UTS_SEARCH_GROUP, UTS_SEARCH_MBR, UTS_SEARCH_WS, UTS_STATE, UTS_UNLOCK, UTS_WHOAMI_ITEM, UTS_WORKFLOWS, UTS_WORKFLOWS_ITEM, UTS_WORKSPACE_ADMIN, UTS_WORKSPACE_ADMIN2 -
Constructor Summary
ConstructorsConstructorDescriptionDataResource(org.restlet.Context context, org.restlet.data.Request request, org.restlet.data.Response response) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanallowPut()voiddoDelete()Handle DELETE requests: delete current pub item.voiddoPost(org.restlet.resource.Representation entity) Handle POST requests: create pub item with given dataType.voiddoPut(org.restlet.resource.Representation entity) Handle PUT requests: modify current pub item.requestMemberPageResult(PagerData pager, org.restlet.data.Request request) requestPublicationQueryResultSet(String type, PagerData pager, Workspace workspace) Methods inherited from class com.jalios.jcms.rest.DataCollectionRestResource
getItemXmlRepresentation, getJSONRepresentationMethods inherited from class com.jalios.jcms.rest.DataRestResource
getData, updateObjectMapperBuilderMethods inherited from class com.jalios.jcms.rest.JcmsRestResource
checkReadRight, delete, doPost, forward, generateErrorRepresentation, getAtomRepresentation, getLoggedMember, getPagerData, getPlainTextRepresentation, getPreferredMediaType, getRepresentation, getXmlProlog, getXmlRepresentation, insertAfterXml, insertBeforeXml, post, put, setCheckCSRF, setXmlUTF8EncodingMethods inherited from class org.restlet.resource.Resource
allowGet, generateRef, getContext, getLogger, getPreferredRepresentation, getPreferredVariant, getRequest, getResponse, getVariants, handleDelete, handleGet, handleHead, handleOptions, handlePost, handlePut, init, isNegotiateContent, setContext, setNegotiateContent, setRequest, setResponse
-
Constructor Details
-
DataResource
public DataResource(org.restlet.Context context, org.restlet.data.Request request, org.restlet.data.Response response)
-
-
Method Details
-
requestMemberPageResult
public PageResult<Member> requestMemberPageResult(PagerData pager, org.restlet.data.Request request) - Parameters:
pager- the currentPagerDatarequest- the currentRequest- Returns:
- the
PageResultwith member data
-
requestPublicationQueryResultSet
public QueryResultSet requestPublicationQueryResultSet(String type, PagerData pager, Workspace workspace) - Parameters:
type- the type of publicationpager- thePagerDataworkspace- theWorkspace- Returns:
- the
QueryResultSetwith publication data
-
allowPost
public boolean allowPost()- Overrides:
allowPostin classorg.restlet.resource.Resource
-
allowPut
public boolean allowPut()- Overrides:
allowPutin classorg.restlet.resource.Resource
-
allowDelete
public boolean allowDelete()- Overrides:
allowDeletein classorg.restlet.resource.Resource
-
doPost
public void doPost(org.restlet.resource.Representation entity) Handle POST requests: create pub item with given dataType.- Overrides:
doPostin classJcmsRestResource
-
doPut
public void doPut(org.restlet.resource.Representation entity) Handle PUT requests: modify current pub item.- Overrides:
doPutin classJcmsRestResource
-
doDelete
public void doDelete()Handle DELETE requests: delete current pub item.- Overrides:
doDeletein classJcmsRestResource
-