public static enum ClientMDS.Context extends Enum<ClientMDS.Context>
Enum Constant and Description |
---|
DEV
Development context.
|
POST_DEV
Post development context.
|
PRE_PROD
Pre production context.
|
PROD
Production context.
|
Modifier and Type | Field and Description |
---|---|
private String |
dataCiteUrl
DataCite URL.
|
private boolean |
isDoiPrefix
There is special test prefix 10.5072 available to all datacentres.
|
private boolean |
isTestMode
Each API call can have optional query parametertestMode.
|
private Level |
levelLog
Level log.
|
Modifier and Type | Method and Description |
---|---|
String |
getDataCiteUrl()
Returns the service end point.
|
Level |
getLevelLog()
Returns the log level.
|
boolean |
hasDoiTestPrefix()
Returns true when the context has a DOI dev.
|
boolean |
hasTestMode()
Returns true when the context must not register data in DataCite
|
static void |
setDataCiteUrl(ClientMDS.Context context,
String dataCiteUrl)
Sets the DataCite URL for a given context
|
private void |
setDataCiteURl(String dataCiteUrl)
Sets the DataCite URL for the context
|
static void |
setLevelLog(ClientMDS.Context context,
Level levelLog)
Sets the level log for a given context
|
private void |
setLevelLog(Level levelLog)
Sets the level log for the context
|
static ClientMDS.Context |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ClientMDS.Context[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ClientMDS.Context DEV
public static final ClientMDS.Context POST_DEV
public static final ClientMDS.Context PRE_PROD
public static final ClientMDS.Context PROD
private final boolean isTestMode
private final boolean isDoiPrefix
private Level levelLog
private String dataCiteUrl
public static ClientMDS.Context[] values()
for (ClientMDS.Context c : ClientMDS.Context.values()) System.out.println(c);
public static ClientMDS.Context valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean hasDoiTestPrefix()
public boolean hasTestMode()
public Level getLevelLog()
public String getDataCiteUrl()
private void setDataCiteURl(String dataCiteUrl)
dataCiteUrl
- DataCite URLprivate void setLevelLog(Level levelLog)
levelLog
- level logpublic static void setLevelLog(ClientMDS.Context context, Level levelLog)
context
- the contextlevelLog
- the level logpublic static void setDataCiteUrl(ClientMDS.Context context, String dataCiteUrl)
context
- the contextdataCiteUrl
- the DataCite URLCopyright © 2017–2020 CNES. All rights reserved.