|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.adobe.livecycle.signatures.client.types.Credential
public class Credential
Represents a credential that is required to sign or certify a PDF document.
You create a Credential
object by invoking the getInstance
method
and referencing a security credential that is located in
LiveCycle Credential Service or
provide a SPI name (and other properties) for signing the PDF using the SPI signature handler.
Three components make up a credential: certificate, key, and alias. You create an instance of this type when you sign or certify a PDF document. To see an object of this type used in a code example, see the Digitally signing a PDF document using the Java API quick start in Programming with LiveCycle ES4.
Sign()
,
Certify()
,
Serialized FormField Summary | |
---|---|
static int |
ALIAS_CERT_KEY
This value specifies that the alias is provided from Signature API, the certificate is from the LiveCycle ES trust store. |
static int |
ALIAS_CERTNKEY_NONE
This value specifies that the alias is provided from Signature API, the certificate and key values are from the LiveCycle ES trust store, and the signing SPI provider is not queried. |
static int |
ALIAS_NONE_CERTNKEY
This value specifies that the alias is provided from the Signature API, the Truststore is not querried. |
static int |
CERT_NONE_KEY
This value specifies that the certificate is provided from the Signature API, the LiveCycle ES trust store is not querried, and the key value comes from the signing SPI provider. |
static java.lang.String |
DEFAULT_ALIAS
This value specifies that the SPI signing provider is used. |
Constructor Summary | |
---|---|
Credential()
|
Method Summary | |
---|---|
java.lang.String |
getAlias()
Returns the alias corresponding to this Credential object. |
byte[] |
getCertificate()
Returns the certificate used when using the signing SPI provider to sign a PDF document. |
int |
getCredentialType()
Retrieves the credential type. |
static Credential |
getInstance(byte[] cert,
java.lang.String inSpiName)
Creates a Credential object that is used to sign or
certify a PDF document using an SPI provider. |
static Credential |
getInstance(java.lang.String alias)
Creates a Credential object that is used to sign or
certify a PDF document. |
java.lang.String |
getSpiName()
Returns the name of the signing SPI provider. |
java.util.HashMap |
getSPIProperties()
Gets the property values that are used by the signing SPI provider. |
static java.util.Properties |
hashMapToProperties(java.util.HashMap hmap)
Converts a java.util.Properties object to
a java.util.HashMap object. |
static java.util.HashMap |
propertiesToHashMap(java.util.Properties props)
Converts a java.util.Properties object to
a java.util.HashMap object. |
void |
setAlias(java.lang.String alias)
Sets the alias value that corresponds to this Credential object. |
void |
setCertificate(byte[] certificate)
Sets the certificate used when using the signing SPI provider to sign a PDF document. |
void |
setCredentialType(int credentialType)
Sets the credential type that provide the types of credentials supported and the default value. |
void |
setSpiName(java.lang.String inSpiName)
Sets the name of the signing SPI provider. |
void |
setSPIProperties(java.util.HashMap props)
Sets the property values that are used by the signing SPI provider. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CERT_NONE_KEY
public static final int ALIAS_CERTNKEY_NONE
public static final int ALIAS_NONE_CERTNKEY
public static final int ALIAS_CERT_KEY
public static final java.lang.String DEFAULT_ALIAS
Constructor Detail |
---|
public Credential()
Method Detail |
---|
public static Credential getInstance(java.lang.String alias)
Credential
object that is used to sign or
certify a PDF document. To see this method used in a code example,
see the Digitally signing a PDF document using the Java API quick start in
Programming with LiveCycle ES4.
alias
- The alias of the credential that is located in LiveCycle
Credential Service. An alias is specified when you import a
security credential.
Credential
object that corresponds to the
specified alias.public static Credential getInstance(byte[] cert, java.lang.String inSpiName)
Credential
object that is used to sign or
certify a PDF document using an SPI provider. Use of this method with certificate parameter
implies the use of the signing SPI provider. This function is used only when
calling the signing SPI provider for signing the document.
To see how to create a signing SPI provider, see the
Creating Signature Handlers section in Programming with LiveCycle ES4.
cert
- The byte array corresponding to the certificate required for
signing using the signing SPI provider.inSpiName
- The name of the signing SPI provider as registered with the Signature service.
Credential
object that corresponds to the specified alias.public static java.util.HashMap propertiesToHashMap(java.util.Properties props)
java.util.Properties
object to
a java.util.HashMap
object.
props
- The java.util.Properties
object to be converted to a java.util.HashMap
object.
java.util.HashMap
object that corresponds to the specified alias.public static java.util.Properties hashMapToProperties(java.util.HashMap hmap)
java.util.Properties
object to
a java.util.HashMap
object.
props
- The java.util.HashMap
object to convert to a java.util.Properties
object.
java.util.HashMap
object that corresponds to the specified alias.public java.lang.String getAlias()
Credential
object.
Credential
object.public void setAlias(java.lang.String alias)
Credential
object.
To see this method used in a code example, see the
Digitally signing a PDF document using the Java API
quick start in Programming with LiveCycle ES4.
alias
- The alias value that corresponds to this Credential
object.public byte[] getCertificate()
public void setCertificate(byte[] certificate)
cert
- The byte array corresponding to the certificate required when using the signing SPI provider.public int getCredentialType()
public void setCredentialType(int credentialType)
credentialType
- An integer value that specifies the credential type.public java.lang.String getSpiName()
public void setSpiName(java.lang.String inSpiName)
inSpiName
- A string value that specifies the name of the signing SPI provider.public java.util.HashMap getSPIProperties()
java.util.Properties
object that contains property values used by the
signing SPI provider.public void setSPIProperties(java.util.HashMap props)
props
- A java.util.Properties
object that contains property values used by the
signing SPI provider.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |