public class Configuration extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
CONFIG_FILE_DIR
Document constant.
|
protected static String |
CONFIG_FILE_PATH
Document constant.
|
protected static String |
CUSTOM_CONFIG_FILENAME
Document constant.
|
protected static String |
CUSTOM_CONFIG_PATH
Document constant.
|
protected static String |
FILE_SEPARATOR
Document constant.
|
protected static String |
KEY_JAVA_VERSION
Document constant.
|
protected static String |
KEY_OS_NAME
Document constant.
|
protected static String |
KEY_OS_VERSION
Document constant.
|
protected static String |
MSCAPI_DISABLED
Document constant.
|
protected static String |
VAR_PKCS11_CONFIG
Document constant.
|
protected static String |
VAR_PKCS11_DRIVER
Document constant.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDriver(String fileName)
The name of the driver is required for proper loading of the library, but
there is no obligation for the name to be always the same and unique, so to
facilitate in cases where the manufacturer of the driver is not known, this
method can be used to create the Name of the driver from your physical file.
|
void |
addDriver(String name,
String fileName)
Tests each driver that has been informed, checking if the file exists.
|
void |
doConfiguration() |
static String |
getConfigFilePath() |
SortedMap<String,String> |
getDrivers()
Returns a set of drivers in the Map, in this pattern: <'driver name',
'path driver'>
|
static Configuration |
getInstance() |
String |
getJavaVersion()
Method that returns the version of the JVM that is running the component.
|
String |
getPKCS11ConfigFile()
Retrieve the path of the configuration file for SunPKCS11 according to the
links below.
|
void |
getPKCS11DriverFromVariable()
Retrieve the driver and its path from the environment variable or JVM
variable.
|
String |
getSO()
Method that returns the name of the operating system.
|
Integer |
getSoVersion()
Method that returns the version of the operating system.
|
Integer |
getSoVersionRelease() |
boolean |
isMSCAPI_ON()
default is true.
|
boolean |
isMSCapiDisabled() |
void |
setMSCAPI_ON(boolean mSCAPI_ON)
set MSCAPI to ON (true) or OFF (false).
|
protected static final String KEY_JAVA_VERSION
protected static final String KEY_OS_NAME
protected static final String KEY_OS_VERSION
protected static final String VAR_PKCS11_CONFIG
protected static final String VAR_PKCS11_DRIVER
protected static final String CUSTOM_CONFIG_PATH
protected static final String CUSTOM_CONFIG_FILENAME
protected static final String FILE_SEPARATOR
protected static final String MSCAPI_DISABLED
protected static final String CONFIG_FILE_DIR
protected static final String CONFIG_FILE_PATH
public static Configuration getInstance()
public void doConfiguration()
public String getJavaVersion()
public boolean isMSCapiDisabled()
public String getSO()
public Integer getSoVersion()
public Integer getSoVersionRelease()
public SortedMap<String,String> getDrivers()
public void addDriver(String name, String fileName)
name - Required parameter that informs the driver's nickname to be
loaded. Ex: PronovafileName - Mandatory parameter that informs the full path of the driver
in the operating system. Ex: /etc/driver/driver.sopublic void addDriver(String fileName)
fileName - Mandatory parameter that informs the full path of the driver
in the operating system. Ex: /etc/driver/driver.sopublic String getPKCS11ConfigFile()
public void getPKCS11DriverFromVariable()
public static String getConfigFilePath()
public boolean isMSCAPI_ON()
public void setMSCAPI_ON(boolean mSCAPI_ON)
mSCAPI_ON - the value to set.Copyright © 2025 SERPRO - Serviço Federal de Processamento de Dados. All rights reserved.