com.adobe.truststore.client
Class CredentialServiceClient

java.lang.Object
  extended by com.adobe.truststore.client.CredentialServiceClient

public class CredentialServiceClient
extends java.lang.Object

Enables you to programmatically interact with the LiveCycle ES Credential Service. A credential contains your private key information needed for signing or identifying documents. A certificate is public key information that you configure for trust. LiveCycle ES4 uses certificates and credentials for several purposes:

For information about programmatically interacting with the LiveCycle ES Credential Service, see the Working with Credentials section in Programming with LiveCycle ES4.


Constructor Summary
CredentialServiceClient(ServiceClientFactory serviceClientFactory)
           
 
Method Summary
 void addCredential(CredentialBO credential)
          Adds a credential to LiveCycle.
 void clearAllHSMConnections()
          For internal use only.
 void deleteCredential(java.lang.String alias)
          Deletes a credential from LiveCyle ES2.
 void deregisterCacheInvalidationHandler(java.lang.String serviceName, java.lang.String operationName)
          For internal use only.
 Document exportCredential(java.lang.String alias, java.lang.String keyPassword)
          Exports a credential from LiveCyle ES2.
 java.util.List fetchAllCredentialsInfo()
          For internal use only.
 CredentialBO findCredentialByAlias(java.lang.String alias, java.lang.String keyPassword)
          Finds a credential by using an alias value.
 CredentialBO findCredentialBySubjectDN(java.lang.String subjectDN)
          Finds a credential by using the subjectDN value.
 java.util.List findCredentials(com.adobe.truststore.businessobject.CredentialSearchFilter searchFilter)
          Finds a given credential.
 java.util.List getCredentialsOnToken(java.lang.String pkcs11Lib, java.lang.Integer slotListIndex, java.lang.String pwd, java.lang.String hsmDev)
          For internal use only.
 com.adobe.truststore.businessobject.CredentialType[] getCredentialTypes(java.lang.String locale)
          Gets a list of supported credential types.
 void importCredential(java.lang.String alias, Document p12Credential, java.lang.String keyPassword, java.lang.String[] types)
          Imports a credential into LiveCyle ES2.
 HSMDeviceInfo listSlots(java.lang.String pkcs11Lib)
          For internal use only.
 void registerCacheInvalidationHandler(java.lang.String serviceName, java.lang.String operationName)
          For internal use only.
 void resetCredentialCache()
          Resets the credential cache.
 void setCredentialTypes(java.lang.String alias, java.lang.String[] credentialTypes)
          For internal use only.
 void updateCredential(java.lang.String alias, CredentialBO credential)
          Updates a given credential.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CredentialServiceClient

public CredentialServiceClient(ServiceClientFactory serviceClientFactory)
Method Detail

getCredentialTypes

public com.adobe.truststore.businessobject.CredentialType[] getCredentialTypes(java.lang.String locale)
                                                                        throws java.lang.Exception
Gets a list of supported credential types.

Parameters:
locale - The locale value of credential.
Returns:
An array of CredentialType objects that represent the supported types.
Throws:
java.lang.Exception

addCredential

public void addCredential(CredentialBO credential)
                   throws java.lang.Exception
Adds a credential to LiveCycle.

Parameters:
credential - A CredentialBO object that represents the credential to add.
Throws:
java.lang.Exception

importCredential

public void importCredential(java.lang.String alias,
                             Document p12Credential,
                             java.lang.String keyPassword,
                             java.lang.String[] types)
                      throws java.lang.Exception
Imports a credential into LiveCyle ES2. Once imported, a credential can be used to perform an operation such as digitially signing a PDF document. To see this method used in a code example, see the Importing credentials using the Java API quick start in Programming with LiveCycle ES4.

Parameters:
alias - A string value that represents the alias that corresponds to the credential. When using the credential, you reference it using this alias value.
p12Credential - A com.adobe.ipd.Document instance that represents the credential to import.
keyPassword - A string value that represents the password that corresponds to the credential.
types - A string array that represents the credential type. For example, specify truststore.usage.type.sign to import a credential used to sign a PDF document.
Throws:
java.lang.Exception

exportCredential

public Document exportCredential(java.lang.String alias,
                                 java.lang.String keyPassword)
                          throws java.lang.Exception
Exports a credential from LiveCyle ES2. If you specify an alias value that does not exist, an exception is thrown.

Parameters:
alias - A string value that represents the alias that corresponds to the credential.
keyPassword - A string value that represents the password that corresponds to the credential.
Returns:
A com.adobe.ipd.Document instance that represents the exported credential.
Throws:
java.lang.Exception

deleteCredential

public void deleteCredential(java.lang.String alias)
                      throws java.lang.Exception
Deletes a credential from LiveCyle ES2. If you specify an alias value that does not exist, an exception is thrown. To see this method used in a code example, see the Deleting credentials using the Java API quick start in Programming with LiveCycle ES4.

Parameters:
alias - A string value that represents the alias that corresponds to the credential.
Throws:
java.lang.Exception

setCredentialTypes

public void setCredentialTypes(java.lang.String alias,
                               java.lang.String[] credentialTypes)
                        throws java.lang.Exception
For internal use only.

Throws:
java.lang.Exception

updateCredential

public void updateCredential(java.lang.String alias,
                             CredentialBO credential)
                      throws java.lang.Exception
Updates a given credential.

Parameters:
alias - A string value that represents the alias that corresponds to the credential.
A - CredentialBO object that represents the updated credential.
Throws:
java.lang.Exception

findCredentials

public java.util.List findCredentials(com.adobe.truststore.businessobject.CredentialSearchFilter searchFilter)
                               throws java.lang.Exception
Finds a given credential.

Parameters:
searchFilter - A CredentialSearchFilter object that represents a search filter.
Returns:
A java.util.List instance where each element is a credential that satisfies the search filter.
Throws:
java.lang.Exception

findCredentialByAlias

public CredentialBO findCredentialByAlias(java.lang.String alias,
                                          java.lang.String keyPassword)
                                   throws java.lang.Exception
Finds a credential by using an alias value.

Parameters:
alias - A string value that represents the alias that corresponds to the credential. When using the credential, you reference it using this alias value.
keyPassword - A string value that represents the password that corresponds to the credential.
Returns:
A CredentialBO instance that represents the credential that corresponds to the alias.
Throws:
java.lang.Exception

findCredentialBySubjectDN

public CredentialBO findCredentialBySubjectDN(java.lang.String subjectDN)
                                       throws java.lang.Exception
Finds a credential by using the subjectDN value.

Parameters:
subjectDN - A string value that represents the subjectDN value.
Returns:
A CredentialBO instance that represents the credential that corresponds to the subjectDN value.
Throws:
java.lang.Exception

registerCacheInvalidationHandler

public void registerCacheInvalidationHandler(java.lang.String serviceName,
                                             java.lang.String operationName)
                                      throws java.lang.Exception
For internal use only.

Throws:
java.lang.Exception

deregisterCacheInvalidationHandler

public void deregisterCacheInvalidationHandler(java.lang.String serviceName,
                                               java.lang.String operationName)
                                        throws java.lang.Exception
For internal use only.

Throws:
java.lang.Exception

resetCredentialCache

public void resetCredentialCache()
                          throws java.lang.Exception
Resets the credential cache.

Throws:
java.lang.Exception

getCredentialsOnToken

public java.util.List getCredentialsOnToken(java.lang.String pkcs11Lib,
                                            java.lang.Integer slotListIndex,
                                            java.lang.String pwd,
                                            java.lang.String hsmDev)
                                     throws java.lang.Exception
For internal use only.

Throws:
java.lang.Exception

listSlots

public HSMDeviceInfo listSlots(java.lang.String pkcs11Lib)
                        throws java.lang.Exception
For internal use only.

Throws:
java.lang.Exception

fetchAllCredentialsInfo

public java.util.List fetchAllCredentialsInfo()
                                       throws java.lang.Exception
For internal use only.

Throws:
java.lang.Exception

clearAllHSMConnections

public void clearAllHSMConnections()
                            throws java.lang.Exception
For internal use only.

Throws:
java.lang.Exception


[an error occurred while processing this directive] [an error occurred while processing this directive]