|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.knowcenter.wag.egov.egiz.sig.ConnectorFactory
public abstract class ConnectorFactory
This is a factory for creating the appropriate connector according to the connector identifier.
ConnectorInformation| Field Summary | |
|---|---|
protected static Class[] |
AVAILABLE_CONNECTORS
The list of available Connector implementations. |
protected static String |
CONNECTOR_INFORMATION_FIELD_NAME
The name of the field that holds the Connector implementation's unique identifier. |
| Constructor Summary | |
|---|---|
ConnectorFactory()
|
|
| Method Summary | |
|---|---|
static Connector |
createConnector(String connector_identifier)
Creates a new connector given by the connector_identifier. |
protected static boolean |
getAvailabilityUsingDefault(String connector_identifier,
String availability_key,
boolean default_value)
Retrieves the availability of the connector from the flags specified in the config file. |
protected static Class |
getConnectorClass(String connector_identifier)
Retrieves the connector Class belonging to the connector id. |
static ConnectorInformation[] |
getConnectorInformationArray()
Gathers the ConnectorInformation objects of all registered connectors. |
protected static ConnectorInformation |
getConnectorInformationFromClass(Class connector_class)
Retrieves the ConnectorInformation from the connector Class. |
static boolean |
isAvailableForCommandline(String connector_identifier)
Tells, if the connector is available for being used in the Commandline (synchron) environment. |
static boolean |
isAvailableForWeb(String connector_identifier)
Tells, if the Connector is available for being used in a Web (asynchron, local) environment. |
static boolean |
isConnectorLocal(String connector_identifier)
Tells, if the given connector is local. |
static boolean |
isValidConnectorIdentifier(String connector_identifier)
Tells, if the given connector identifier is valid. |
static boolean |
needsSIG_ID(String connector)
Tells, if the given connector needs or produces SIG_IDs. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String CONNECTOR_INFORMATION_FIELD_NAME
This must be a public static final String on the Connector implementation class.
protected static Class[] AVAILABLE_CONNECTORS
Note that this could also be generated dynamically from a config file, preferably enveloped by a Singleton.
| Constructor Detail |
|---|
public ConnectorFactory()
| Method Detail |
|---|
protected static ConnectorInformation getConnectorInformationFromClass(Class connector_class)
throws IllegalArgumentException,
IllegalAccessException,
SecurityException,
NoSuchFieldException
connector_class - The connector Class.
IllegalArgumentException - F.e.
IllegalAccessException - F.e.
SecurityException - F.e.
NoSuchFieldException - F.e.
public static ConnectorInformation[] getConnectorInformationArray()
throws ConnectorFactoryException
This is used by the user interface to provide a list of all available connectors.
ConnectorFactoryException - F.e.
protected static Class getConnectorClass(String connector_identifier)
throws ConnectorFactoryException
connector_identifier - The connector id.
ConnectorFactoryException - Thrown, if the id is invalid.
public static Connector createConnector(String connector_identifier)
throws ConnectorFactoryException
connector_identifier - The connector identifier of the new connector.
ConnectorFactoryException - F.e.
public static boolean isValidConnectorIdentifier(String connector_identifier)
throws ConnectorFactoryException
connector_identifier - The connector identifier.
ConnectorFactoryException - F.e.
protected static boolean getAvailabilityUsingDefault(String connector_identifier,
String availability_key,
boolean default_value)
throws ConnectorFactoryException
connector_identifier - The connector.availability_key - The key of the availability flag to be retrieved.default_value - The default value to be used if the flag is not set in the config
file.
ConnectorFactoryException - Thrown, if the connector is invalid.
public static boolean isAvailableForCommandline(String connector_identifier)
throws ConnectorFactoryException
A connector is available for commandline processing if it requires no active user interaction for being executed or if it handles the user interaction itself.
A commandline connector is executed synchronously. The client waits until the Connector has finished.
Usually a synchron connector can also be used in a web environment.
Examples for commandline connectors are: MOA, BKU. A1 is not suitible for commandline because it requires HTTP/HTML interaction, log in, etc.
ConnectorFactoryException
public static boolean isAvailableForWeb(String connector_identifier)
throws ConnectorFactoryException
A connector is available for Web if it can be used in a web environment. Often a web connector is also a local connector.
Typical examples are the local BKU and A1. The later requires HTML log in and session handling.
ConnectorFactoryException
public static boolean isConnectorLocal(String connector_identifier)
throws ConnectorFactoryException
connector_identifier - The connector.
ConnectorFactoryException - F.e.public static boolean needsSIG_ID(String connector)
This method is used when pre formatted signature blocks have to be created that have to know if there will be a SIG_ID field or not.
Connectors like BKU produce SIG_IDs when signing that are needed when verifying.
connector - The connector.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||