public class DoisResource extends BaseMdsResource
Modifier and Type | Field and Description |
---|---|
static String |
CREATE_DOI
Function of this resource "Create a DOI".
|
static String |
LIST_ALL_DOIS
Function of this resource "List all DOIs".
|
DOI_PARAMETER, LOG, URL_PARAMETER
Constructor and Description |
---|
DoisResource() |
Modifier and Type | Method and Description |
---|---|
private void |
checkInputs(org.restlet.data.Form mediaForm)
Checks input parameters.
|
String |
createDoi(org.restlet.data.Form doiForm)
Creates a new DOI based on the doi and url parameters
The DOI name is built following this syntax:
CNES_prefix/project_provided_the_DOI_server/project_suffix.
|
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.
|
private org.restlet.ext.wadl.RepresentationInfo |
explainStatusRepresentation()
Returns the exit status representation.
|
List<String> |
getDois()
Returns the collection of DOI.
|
private org.restlet.ext.wadl.RepresentationInfo |
noContentRepresentation()
Returns the no content representation.
|
private org.restlet.ext.wadl.RepresentationInfo |
requestRepresentation()
Request representation.
|
private org.restlet.ext.wadl.RepresentationInfo |
successFullRepresentation()
Returns the sucessfull 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
public static final String LIST_ALL_DOIS
public static final String CREATE_DOI
protected void doInit() throws DoiServerException
doInit
in class BaseMdsResource
DoiServerException
- - if a problem happens@Get public List<String> getDois() throws DoiServerException
DoiServerException
- 204 No Content - no DOIs founds@Requirement(reqId="DOI_SRV_020",reqName="Enregistrement d\u2019un DOI") @Requirement(reqId="DOI_SRV_030",reqName="Mise \u00e0 jour de l\u2019URL de la landing page d\'un DOI") @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(value="form") public String createDoi(org.restlet.data.Form doiForm) throws DoiServerException
The client provides :
Will mint new DOI if specified DOI doesn't exist. This method will attempt to update URL if you specify existing DOI. Standard domains and quota restrictions check will be performed. A Datacentre's doiQuotaUsed will be increased by 1. A new record in Datasets will be created by returning a 201 status for operation successful.
doiForm
- doi and urlDoiServerException
- - if the response is not a success
@Requirement(reqId="DOI_INTER_070", reqName="V\u00e9rification des entr\u00e9es fournies pour DataCite") private void checkInputs(org.restlet.data.Form mediaForm) throws DoiServerException
mediaForm
- the parameters
"doi" and
"url"DoiServerException
- - 400 Bad Request if DOI_PARAMETER and
"url" are not
set@Requirement(reqId="DOI_DOC_010", reqName="Documentation des interfaces") private org.restlet.ext.wadl.RepresentationInfo successFullRepresentation()
@Requirement(reqId="DOI_DOC_010", reqName="Documentation des interfaces") private org.restlet.ext.wadl.RepresentationInfo noContentRepresentation()
@Requirement(reqId="DOI_DOC_010", reqName="Documentation des interfaces") private org.restlet.ext.wadl.RepresentationInfo explainStatusRepresentation()
@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@Requirement(reqId="DOI_DOC_010", reqName="Documentation des interfaces") private org.restlet.ext.wadl.RepresentationInfo requestRepresentation()
@Requirement(reqId="DOI_DOC_010", reqName="Documentation des interfaces") protected final void describePost(org.restlet.ext.wadl.MethodInfo info)
ClientMDS.DATACITE_API_RESPONSE.SUCESS_CREATED
DoiMdsApplication.API_MDS.LANGING_PAGE_VALIDATION
ClientMDS.DATACITE_API_RESPONSE.PROCESS_ERROR
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
DoiMdsApplication.API_MDS.DATACITE_PROBLEM
describePost
in class BaseMdsResource
info
- Wadl descriptionCopyright © 2017–2020 CNES. All rights reserved.