|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.knowcenter.wag.egov.egiz.sig.SignatureObject
public class SignatureObject
This class represents the abstract signature object. It contains all methods
reading the definitions from the settings file, analyse them and build the
abstract signature table.
All values that build or used by the signation creation process, call the
external services, can read or set separately. All other values are defined
in the settings file.
Field Summary | |
---|---|
protected static int |
new_cert_num
This is an internal counter for added certificates. |
protected String |
raw_signature_response
The raw xml response from the connector that was used to set the values in this SignatureObject. |
static String |
SIG_CER
Standard key get/set the certification value |
static String |
SIG_CER_DIG
Standard key get/set the certification digest value |
static String |
SIG_META
Standard key get/set the signature meta informations |
Constructor Summary | |
---|---|
SignatureObject()
The empty constructor. |
Method Summary | |
---|---|
static boolean |
decideNewEtsiByBKUVersion(String productVersion)
|
List |
fillValues(char placeholder,
boolean has_SIG_ID)
|
static String |
formatSigIds(Properties response_properties,
String[] sigIds)
|
Table |
getAbstractTable()
|
PdfASID |
getKZ()
Returns the "Kennzeichnung" of this signature. |
String |
getOfficialSeal()
|
String |
getRawSignatureResponse()
Returns the raw signature response XML string as set by the signing Connector. |
SignatureEntry |
getSigEntry(String key)
This method returns a signature entry object. |
String |
getSignationDate()
|
String |
getSignationIds()
Takes the signation id value of the current SignatureObject and split them into the corresponding id array added with the id-base. |
String |
getSignationIssuer()
|
String |
getSignationName()
|
String |
getSignationNormVersion()
|
String |
getSignationSerialNumber()
|
String |
getSignationType()
|
String |
getSignationValue()
|
SignatureTypeDefinition |
getSignatureTypeDefinition()
|
String |
getSigResponse()
Dummy getter Method for debugging only |
String |
getSigValue(String key)
This method returns a value for a given signature key. |
X509Cert |
getX509Cert()
|
X509Cert |
getX509Cert(String serialNumber,
String issuer)
|
String |
getX509CertificateDigest()
|
String |
getX509CertificateString()
|
String |
getX509CertificateString(String serialNumber,
String issuer)
return the 509v3 certificate of the given serialNumber and the given issuer string |
void |
initByType()
This method inits the signature object by the given type. |
boolean |
isBinary()
Tells, if this SignatureObject is binary. |
boolean |
isMOASigned()
Checks if the current SignatureObject is siganted by MOA. |
boolean |
isSigKey(String sigKey)
This method checks if a given signature key is realy a defined signature key. |
boolean |
isTextual()
Tells if this SignatureObject is textual. |
protected byte[] |
loadCertificateFromLDAP(String serialNumber,
String issuer)
Connects to the LDAP server to look for the certificate. |
static String[] |
parseSigIds(String sig_ids)
|
void |
setKZ(PdfASID kz)
Sets the "Kennzeichnung". |
void |
setRawSignatureResponse(String raw_response_string)
Sets the raw signature response XML string. |
void |
setSignationDate(String sigDate)
|
void |
setSignationIDs(String sigIds)
Set the signation id's build by a BKU signated SignatureObject. |
void |
setSignationIssuer(String sigIssuer)
|
void |
setSignationName(String sigName)
|
void |
setSignationNormVersion(String sigNormVersion)
|
void |
setSignationSerialNumber(String serialNumber)
|
void |
setSignationValue(String sigValue)
|
void |
setSigResponse(String sigRespone)
Dummy setter Method for debugging only |
void |
setSigType(String sigType)
This method set the signature type. |
boolean |
setSigValue(String key,
String value)
This method adds an signaton value to the entry cache. |
void |
setSigValueCaption(String key,
String value,
String caption)
Set the value and the caption to given key. |
boolean |
setValueBruteForce(String key,
String value)
|
void |
setX509Certificate(String x509Certificate)
|
void |
setX509CertificateDigest(String certDigest)
|
void |
storeNewCertificateInLocalStore(byte[] cert_data)
Writes the certificate data to a file and stores the file in the local certificate store. |
String |
toString()
The toString method, used for tests or debugging. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String SIG_META
public static final String SIG_CER
public static final String SIG_CER_DIG
protected String raw_signature_response
This is set by the Connector so that signing Applications can use the returned XML values.
protected static int new_cert_num
Constructor Detail |
---|
public SignatureObject() throws SignatureException
SignatureException
- ErrorCode:101, 400Method Detail |
---|
public String getSigResponse()
public void setSigResponse(String sigRespone)
sigRespone
- store the response stringpublic void setSigType(String sigType) throws SignatureTypesException
sigType
- the signature type to be set
SignatureTypesException
public boolean isSigKey(String sigKey)
sigKey
- the key to check
public boolean setSigValue(String key, String value)
SIG_VALUE
all whitespaces are
removed!
key
- the key to be setvalue
- the value to be set
true
if a new signature value is created,
false
otherwisepublic boolean setValueBruteForce(String key, String value)
public void setSigValueCaption(String key, String value, String caption)
key
- the key of the signature objectvalue
- the value of the given keycaption
- the caption of the given keypublic String getSigValue(String key)
SIG_NORM
and the value is null
the version
string of the current normalizer is returned!
key
- the key to get the value for
public void setKZ(PdfASID kz)
kz
- The "Kennzeichnung" to be set.public PdfASID getKZ() throws InvalidIDException
InvalidIDException
public String getSignationType()
public String getSignationDate()
public void setSignationDate(String sigDate)
sigDate
- The SignationDate to set.public String getSignationName()
public void setSignationName(String sigName)
sigName
- The SignationName to set.public String getSignationNormVersion()
public void setSignationNormVersion(String sigNormVersion)
sigNormVersion
- The SignationNormVersion to set.public String getSignationIssuer()
public void setSignationIssuer(String sigIssuer)
sigIssuer
- The SignationIssuer to set.public String getSignationValue()
public void setSignationValue(String sigValue)
sigValue
- The SignationValue to set.public String getOfficialSeal()
public void setSignationSerialNumber(String serialNumber)
serialNumber
- The serial number of the signature to setpublic String getSignationSerialNumber()
public void setX509CertificateDigest(String certDigest)
certDigest
- set the digest value for the X509Certificatepublic String getX509CertificateDigest()
public String getX509CertificateString()
public void setX509Certificate(String x509Certificate)
x509Certificate
- The X509v3 certificate of the signature to setpublic String getX509CertificateString(String serialNumber, String issuer)
serialNumber
- the serialNumber which the certificates should loadissuer
- the issuer which the certificates should load
public X509Cert getX509Cert(String serialNumber, String issuer)
public X509Cert getX509Cert()
public void setSignationIDs(String sigIds)
sigIds
- the string to store.public static String formatSigIds(Properties response_properties, String[] sigIds) throws SignatureException
SignatureException
public static boolean decideNewEtsiByBKUVersion(String productVersion)
public boolean isMOASigned()
public boolean isTextual()
public boolean isBinary()
public String getSignationIds()
public static String[] parseSigIds(String sig_ids)
public void storeNewCertificateInLocalStore(byte[] cert_data)
cert_data
- The binary certificate data.protected byte[] loadCertificateFromLDAP(String serialNumber, String issuer)
serialNumber
- The serial number String of the certificate being sought. E.g.
"123455676744123432".issuer
- The issuer String of the certificate being sought.
ClassNotFoundException
public Table getAbstractTable()
Table
public void initByType() throws SignatureTypesException
SignatureTypesException
public SignatureEntry getSigEntry(String key)
key
- the corresponding key
public SignatureTypeDefinition getSignatureTypeDefinition()
public List fillValues(char placeholder, boolean has_SIG_ID)
placeholder
-
public String getRawSignatureResponse()
public void setRawSignatureResponse(String raw_response_string)
This should be used by the Connector to pass the response String to the signer.
raw_response_string
- The new raw signature response string.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |