@Requirement(reqId="DOI_DOC_010", reqName="Documentation des interfaces") public abstract class AbstractApplication extends org.restlet.ext.wadl.WadlApplication
Modifier and Type | Field and Description |
---|---|
private DoiSettings |
config
DOI settings.
|
static boolean |
DEFAULT_CORS_CREDENTIALS
If true, adds 'Access-Control-Allow-Credentials' header.
|
static Set |
DEFAULT_CORS_ORIGIN
Default value of 'Access-Control-Allow-Origin' header.
|
private static org.apache.logging.log4j.Logger |
LOG
Logger.
|
private AbstractTokenDBHelper |
tokenDB
Token database.
|
Constructor and Description |
---|
AbstractApplication()
This constructor creates an instance of proxySettings and doiSettings.
|
Modifier and Type | Method and Description |
---|---|
protected org.restlet.security.ChallengeAuthenticator |
createAuthenticator()
Creates the authenticator based on a HTTP basic.
|
protected org.restlet.security.ChallengeAuthenticator |
createAuthenticatorLoginBased()
Creates the authenticator based on a HTTP basic.
|
protected org.restlet.service.CorsService |
createCoreService(Set corsOrigin,
boolean corsCredentials)
Defines the CORS service.
|
protected org.restlet.representation.Representation |
createHtmlRepresentation(org.restlet.ext.wadl.ApplicationInfo applicationInfo)
Creates HTML representation of the WADL.
|
protected org.restlet.security.ChallengeAuthenticator |
createTokenAuthenticator()
Creates an authentication by token.
|
protected DoiSettings |
getConfig()
Returns the configuration of the DOI server.
|
org.apache.logging.log4j.Logger |
getLog()
Returns the logger.
|
AbstractTokenDBHelper |
getTokenDB()
Returns the token database.
|
private void |
init()
Defined services and metadata.
|
void |
sendAlertWhenDataCiteFailed(Exception exception)
Sends alert as an email when DataCite failed.
|
attachToComponent, attachToHost, canDescribe, createFinder, createWadlRepresentation, getApplicationInfo, getBaseRef, getPreferredWadlVariant, getRouter, getWadlVariants, handle, isAutoDescribing, setAutoDescribing, setBaseRef, wadlRepresent, wadlRepresent
createInboundRoot, 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 Set DEFAULT_CORS_ORIGIN
public static final boolean DEFAULT_CORS_CREDENTIALS
private static final org.apache.logging.log4j.Logger LOG
private final AbstractTokenDBHelper tokenDB
private final DoiSettings config
public AbstractApplication()
DEFAULT_CORS_ORIGIN
and
DEFAULT_CORS_CREDENTIALS
createCoreService(java.util.Set, boolean)
private void init()
protected final org.restlet.service.CorsService createCoreService(Set corsOrigin, boolean corsCredentials)
corsOrigin
- IP that can access to the servicecorsCredentials
- credentials allowed@Requirement(reqId="DOI_AUTH_010", reqName="Authentification par login/mot de passe") protected org.restlet.security.ChallengeAuthenticator createAuthenticator()
@Requirement(reqId="DOI_AUTH_010", reqName="Authentification par login/mot de passe") protected org.restlet.security.ChallengeAuthenticator createAuthenticatorLoginBased()
@Requirement(reqId="DOI_AUTH_020", reqName="Authentification par token") protected org.restlet.security.ChallengeAuthenticator createTokenAuthenticator()
the token verification
protected org.restlet.representation.Representation createHtmlRepresentation(org.restlet.ext.wadl.ApplicationInfo applicationInfo)
createHtmlRepresentation
in class org.restlet.ext.wadl.WadlApplication
applicationInfo
- Application descriptionpublic void sendAlertWhenDataCiteFailed(Exception exception)
exception
- error message to sendprotected final DoiSettings getConfig()
public AbstractTokenDBHelper getTokenDB()
public org.apache.logging.log4j.Logger getLog()
Copyright © 2017–2020 CNES. All rights reserved.