@Requirement(reqId="DOI_SRV_010",reqName="Cr\u00e9ation de m\u00e9tadonn\u00e9es") @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_SRV_040",reqName="Mise \u00e0 jour des m\u00e9tadonn\u00e9es d\u2019un DOI") @Requirement(reqId="DOI_SRV_050",reqName="D\u00e9sactivation d\u2019un DOI") @Requirement(reqId="DOI_SRV_060",reqName="R\u00e9cup\u00e9ration des m\u00e9tadonn\u00e9es") @Requirement(reqId="DOI_SRV_070",reqName="R\u00e9cup\u00e9ration de l\u2019URL de la landing page") @Requirement(reqId="DOI_SRV_080",reqName="Cr\u00e9ation d\u2019un m\u00e9dia") @Requirement(reqId="DOI_SRV_090",reqName="R\u00e9cup\u00e9ration des m\u00e9dias") @Requirement(reqId="DOI_MONIT_020",reqName="Monitoring de l\'\u00e9tat de DataCite") public final class DoiMdsApplication extends AbstractApplication
Two methods of authentication are defined in this application and both is optional:
authenticator
by login/passwordauthenticator
by
token
methods need to be authenticated
.
Security
--------------
The authentication is done by the following pipeline:
|Method authorization|-->|Authentication login/pwd|-->|Authentication
token|
Method authorization : Only GET method does not need an authorization
Routing
--------------
root
|
|__ dois (authorization)
|__ dois/{doiName} (authorization)
|__ metadata (authorization)
|__ metadata/{doiName} (authorization)
|__ media/{doiName} (authorization)
the resources related to this application
,
DOI Handbook,
API Documentation,
List and create DOI
,
Handle a DOI
,
Create metadata
,
Handle DOI metadata
,
Handle media related to metadata
Modifier and Type | Class and Description |
---|---|
static class |
DoiMdsApplication.API_MDS
API related only to the code in this webservice.
|
static class |
DoiMdsApplication.SecurityPostProcessingFilter
Post processing for specific authorization.
|
Modifier and Type | Field and Description |
---|---|
private ClientMDS |
client
Client to query Mds Datacite.
|
static String |
DOI_NAME_URI
URI to handle a DOI : "/{doiName}".
|
static String |
DOI_TEMPLATE
Template Query for DOI : "doiName".
|
static String |
DOI_URI
URI to handle the collection of DOIs : "/dois".
|
private static org.apache.logging.log4j.Logger |
LOG
Logger.
|
static String |
MEDIA_URI
URI to handle media : "/media".
|
static String |
METADATAS_URI
URI to handle metadata : "/metadata".
|
static String |
NAME
Application name : "Metadata Store Application"
|
private AbstractTokenDBHelper |
tokenDB
Token DB that contains the set of generated token.
|
DEFAULT_CORS_CREDENTIALS, DEFAULT_CORS_ORIGIN
Constructor and Description |
---|
DoiMdsApplication(ClientMDS client)
Creates the Digital Object Identifier server application.
|
Modifier and Type | Method and Description |
---|---|
org.restlet.Restlet |
createInboundRoot()
Creates a router for the DoiMdsApplication.
|
private org.restlet.security.MethodAuthorizer |
createMethodAuthorizer()
Creates the method authorizer.
|
private org.restlet.routing.Router |
createRouter()
Creates the router.
|
org.restlet.ext.wadl.ApplicationInfo |
getApplicationInfo(org.restlet.Request request,
org.restlet.Response response)
Method to describe application in the WADL.
|
ClientMDS |
getClient()
Returns the client.
|
String |
getDataCentrePrefix()
Returns the DOI prefix.
|
org.apache.logging.log4j.Logger |
getLog()
Returns the logger.
|
private String |
getLoginMds()
Returns the decrypted login for DataCite.
|
private String |
getPwdMds()
Returns the decrypted password for DataCite.
|
AbstractTokenDBHelper |
getTokenDB()
Returns the token database.
|
createAuthenticator, createAuthenticatorLoginBased, createCoreService, createHtmlRepresentation, createTokenAuthenticator, getConfig, sendAlertWhenDataCiteFailed
attachToComponent, attachToHost, canDescribe, createFinder, createWadlRepresentation, getBaseRef, getPreferredWadlVariant, getRouter, getWadlVariants, handle, isAutoDescribing, setAutoDescribing, setBaseRef, wadlRepresent, wadlRepresent
createOutboundRoot, getConnectorService, getConnegService, getConverterService, getCurrent, getDecoderService, getEncoderService, getInboundRoot, getMetadataService, getOutboundRoot, getRangeService, getRole, getRoles, getServices, getStatusService, getTaskService, getTunnelService, isDebugging, setConnectorService, setConnegService, setContext, setConverterService, setCurrent, setDebugging, setDecoderService, setEncoderService, setInboundRoot, setInboundRoot, setMetadataService, setOutboundRoot, setOutboundRoot, setRangeService, setRoles, setStatusService, setTaskService, setTunnelService, start, stop
public static final String DOI_TEMPLATE
public static final String DOI_URI
public static final String DOI_NAME_URI
public static final String METADATAS_URI
public static final String MEDIA_URI
public static final String NAME
private static final org.apache.logging.log4j.Logger LOG
private final ClientMDS client
private final AbstractTokenDBHelper tokenDB
public DoiMdsApplication(ClientMDS client)
client
- ClientMDSDoiRuntimeException
- When the DataCite schema is not availablepublic org.restlet.Restlet createInboundRoot()
createInboundRoot
in class org.restlet.Application
the router that contains the Mds
resources
,
the authentication mechanism
by login/password
,
the authentication
mechanism by token
,
the method authorization
mechanism
private org.restlet.routing.Router createRouter()
DOI_URI
to create/update a DOI and its
landing pageDOI_URI
DOI_NAME_URI
to get the URL of the landing page related to a given DOIMETADATAS_URI
to create/update DOI
metadataMETADATAS_URI
DOI_NAME_URI
to get DOI's metadata or delete a given DOIMEDIA_URI
DOI_NAME_URI
to handle media related to a DOI
Handles a DOI and its landing page
,
Handles DOI metadata
,
Handles DOI metadata
,
Handles media related to a DOI
private org.restlet.security.MethodAuthorizer createMethodAuthorizer()
private String getLoginMds()
private String getPwdMds()
public String getDataCentrePrefix()
public ClientMDS getClient()
public AbstractTokenDBHelper getTokenDB()
getTokenDB
in class AbstractApplication
public org.apache.logging.log4j.Logger getLog()
getLog
in class AbstractApplication
public final org.restlet.ext.wadl.ApplicationInfo getApplicationInfo(org.restlet.Request request, org.restlet.Response response)
getApplicationInfo
in class org.restlet.ext.wadl.WadlApplication
request
- Requestresponse
- ResponseCopyright © 2017–2020 CNES. All rights reserved.