public class MediaResource extends BaseMdsResource
Modifier and Type | Field and Description |
---|---|
private String |
mediaName
DOI parsed from the URL.
|
DOI_PARAMETER, LOG, URL_PARAMETER
Constructor and Description |
---|
MediaResource() |
Modifier and Type | Method and Description |
---|---|
private void |
checkInputs(String doi,
org.restlet.data.Form mediaForm)
Checks input parameters
|
org.restlet.representation.Representation |
createMedia(org.restlet.data.Form mediaForm)
Creates a media related to an URL for a given DOI.
|
protected void |
describeGet(org.restlet.ext.wadl.MethodInfo info)
Describes the GET method.
|
protected void |
describePost(org.restlet.ext.wadl.MethodInfo info)
Describes the POST method.
|
protected void |
doInit()
Init by getting the media name.
|
org.restlet.representation.Representation |
getMedias()
Returns the media related to a DOI.
|
private org.restlet.ext.wadl.RepresentationInfo |
mediaRepresentation()
Media representation.
|
checkPermission, describeDelete, explainRepresentation, extractSelectedRoleFromRequestIfExists, getAttributePath, getDoiApp
addRequestDocToMethod, addRequestDocToMethod, addRequestDocToMethod, addResponseDocToMethod, createQueryParamDoc, createQueryRepresentationDoc, createResponseDoc, createResponseDoc, createResponseDoc, htmlRepresentation, isObjectExist, isObjectNotExist, isValueExist, isValueNotExist, stringRepresentation
canDescribe, createHtmlRepresentation, createWadlRepresentation, describe, describe, describe, describe, describe, describe, describe, describe, describeMethod, describeMethod, describeOptions, describeParameters, describePatch, describePut, getDescription, getName, getParameter, getParameters, getPreferredWadlVariant, getResourcePath, getResourcesBase, getWadlVariants, isAutoDescribing, options, setAutoDescribing, setDescription, setName
abort, commit, delete, delete, describeVariants, doCatch, doConditionalHandle, doError, doHandle, doHandle, doNegotiatedHandle, get, get, getAttribute, getInfo, getInfo, getOnSent, getPreferredVariant, getRole, getVariants, getVariants, handle, hasAnnotations, head, head, isAnnotated, isAutoCommitting, isCommitted, isConditional, isExisting, isInRole, isNegotiated, options, patch, patch, post, post, put, put, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAllowedMethods, setAnnotated, setAttribute, setAutoCommitting, setChallengeRequests, setCommitted, setConditional, setCookieSettings, setDimensions, setExisting, setLocationRef, setLocationRef, setNegotiated, setOnSent, setProxyChallengeRequests, setServerInfo, setStatus, setStatus, setStatus, setStatus, updateAllowedMethods, updateDimensions
doError, doRelease, getAllowedMethods, getApplication, getChallengeRequests, getChallengeResponse, getClientInfo, getConditions, getConnegService, getContext, getConverterService, getCookies, getCookieSettings, getDimensions, getHostRef, getLocationRef, getLogger, getMatrix, getMatrixValue, getMaxForwards, getMetadataService, getMethod, getOriginalRef, getProtocol, getProxyChallengeRequests, getProxyChallengeResponse, getQuery, getQueryValue, getRanges, getReference, getReferrerRef, getRequest, getRequestAttributes, getRequestCacheDirectives, getRequestEntity, getResponse, getResponseAttributes, getResponseCacheDirectives, getResponseEntity, getRootRef, getServerInfo, getStatus, getStatusService, init, isConfidential, isLoggable, release, setApplication, setQueryValue, setRequest, setResponse, toBoolean, toByte, toDouble, toFloat, toInteger, toLong, toObject, toRepresentation, toRepresentation, toRepresentation, toShort, toString
private volatile String mediaName
protected void doInit() throws DoiServerException
doInit
in class BaseMdsResource
DoiServerException
- - if a problem happens@Requirement(reqId="DOI_SRV_090",reqName="R\u00e9cup\u00e9ration des m\u00e9dias") @Requirement(reqId="DOI_MONIT_020",reqName="Monitoring de l\'\u00e9tat de DataCite") @Get public org.restlet.representation.Representation getMedias() throws DoiServerException
DoiServerException
- - if the response is not a success
@Requirement(reqId="DOI_SRV_080",reqName="Cr\u00e9ation d\u2019un m\u00e9dia") @Requirement(reqId="DOI_MONIT_020",reqName="Monitoring de l\'\u00e9tat de DataCite") @Requirement(reqId="DOI_INTER_070",reqName="V\u00e9rification des entr\u00e9es fournies pour DataCite") @Requirement(reqId="DOI_AUTO_020",reqName="S\u00e9lection du r\u00f4le") @Requirement(reqId="DOI_AUTO_030",reqName="V\u00e9rification du projet") @Post public org.restlet.representation.Representation createMedia(org.restlet.data.Form mediaForm) throws DoiServerException
mediaForm
- FormDoiServerException
- - if the response is not a success :
@Requirement(reqId="DOI_INTER_070", reqName="V\u00e9rification des entr\u00e9es fournies pour DataCite") private void checkInputs(String doi, org.restlet.data.Form mediaForm) throws DoiServerException
doi
- DOI numbermediaForm
- the parametersDoiServerException
- - 400 Bad Request if DOI_PARAMETER is not setprivate org.restlet.ext.wadl.RepresentationInfo mediaRepresentation()
@Requirement(reqId="DOI_DOC_010", reqName="Documentation des interfaces") protected final void describeGet(org.restlet.ext.wadl.MethodInfo info)
describeGet
in class org.restlet.ext.wadl.WadlServerResource
info
- Wadl description for a GET method@Requirement(reqId="DOI_DOC_010", reqName="Documentation des interfaces") protected final void describePost(org.restlet.ext.wadl.MethodInfo info)
ClientMDS.DATACITE_API_RESPONSE.SUCCESS
DoiMdsApplication.API_MDS.MEDIA_VALIDATION
DoiMdsApplication.API_MDS.DATACITE_PROBLEM
DoiMdsApplication.API_MDS.SECURITY_USER_NO_ROLE
DoiMdsApplication.API_MDS.SECURITY_USER_NOT_IN_SELECTED_ROLE
DoiMdsApplication.API_MDS.SECURITY_USER_PERMISSION
DoiMdsApplication.API_MDS.SECURITY_USER_CONFLICT
describePost
in class BaseMdsResource
info
- Wadl description for describing POST methodCopyright © 2017–2020 CNES. All rights reserved.