@RestResource(id=<error>) public class MediaContentRestResource extends AbstractItemLookupRestResource
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string.
|
COLLECTION_MISSING_INPUT_PARAMS, COLLECTION_PARENT_ITEM_NOT_FOUND, COLLECTION_PARENT_REPOSITORY_NOT_FOUND, COLLECTION_PROPERTY_INVALID, COLLECTION_PROPERTY_NOT_FOUND, COLLECTION_SORT_SIZE, COMMA, DEFAULT_PAGE_SIZE, ID, INVALID_QUERY_PARAMS, ITEM, ITEM_DESCRIPTOR_NOT_SUPPLIED, ITEM_NOT_FOUND, mEmbeddedRelationshipToResourceId, mRepository, PARENT_ITEM_ID, PARENT_ITEM_TYPE, PARENT_PROPERTY_NAME, REQUEST_DATA_KEY_PREFIX, RESOURCE_NAME, SEPARATOR, sResourceBundle, UNEXPECTED_ERROR
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
MediaContentRestResource() |
Modifier and Type | Method and Description |
---|---|
RepresentationModel |
getMediaContent(java.lang.String pMediaContentId,
java.lang.Boolean pFilterBySiteFlag,
java.lang.String pSiteId)
Get the media content matching the id passed.
|
protected RepresentationModel.Builder |
getRepresentationModelBuilder(java.lang.Object pState,
java.lang.String pItemId)
Gets the RepresentationModel.Builder with the given object acting as the state.
|
RepresentationModel |
listMediaContents(java.lang.String pParentItemId,
java.lang.String pParentItemType,
java.lang.String pParentPropertyName,
java.lang.String pOffset,
java.lang.String pLimit,
java.lang.String pOrderBy)
Gets the collection of media content based on parentItemId, parentItemType
and parentPropertyName query parameters.
|
addEmbeddedCollectionResource, addEmbeddedCollectionResources, buildInputs, generateRequestDataKey, getCollectionSortLimit, getDefaultLimit, getDroplet, getEmbeddedRelationshipToResourceId, getItem, getItemDescriptor, getParentRepositoryItem, getRepository, getRepresentationModelBuilder, listItems, listItems, listItems, postInvoker, preInvoker, retrieveItem, retrieveRequestData, setCollectionSortLimit, setDefaultLimit, setDroplet, setEmbeddedRelationshipToResourceId, setItemDescriptor, setRepository, validateProperty
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService, toString
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static final java.lang.String CLASS_VERSION
@Endpoint(id="/mediaContents/#GET", isSingular=false, filterId="mediaContents-Default") public RepresentationModel listMediaContents(java.lang.String pParentItemId, java.lang.String pParentItemType, java.lang.String pParentPropertyName, java.lang.String pOffset, java.lang.String pLimit, java.lang.String pOrderBy) throws RestException, RepositoryException, javax.servlet.ServletException
The collection will be paged. Paging can be controlled using the offset & limit query parameters. If no limit is set the resource's defaultLimit will be used.
The collection order may be controlled using the orderBy param. Format is orderBy=propertyName:asc|desc. Supports a comma separated set of properties.
pParentItemId
- The parent item id of the media content to return.pParentItemType
- The parent item type of the media content to return.pParentPropertyName
- The parent item property name the references the media content to return.pOffset
- The page start indexpLimit
- The page sizepOrderBy
- The repository item properties to sort results by. Direction
defaults to ascending.RestException
- the rest exceptionRepositoryException
- the repository exceptionjavax.servlet.ServletException
- the servlet exception@Endpoint(id="/mediaContents/{mediaContentId}#GET", isSingular=true, filterId="mediaContents.id-Default") public RepresentationModel getMediaContent(java.lang.String pMediaContentId, java.lang.Boolean pFilterBySiteFlag, java.lang.String pSiteId) throws RestException, RepositoryException
pMediaContentId
- the id of the mediaContent to findpFilterBySiteFlag
- if true only find the mediaContent if it matches siteId or the
current site contextpSiteId
- site id mediaContent should belong to. If not set current site
will be used.RestException
- the rest exceptionRepositoryException
- if fails to retrieve media content repository itemprotected RepresentationModel.Builder getRepresentationModelBuilder(java.lang.Object pState, java.lang.String pItemId)
Also embeds media content type.
pState
- the state that will be added to the representation modelpItemId
- the item repository id