HATS 7.5.1 Web API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.hats.portlet.cv
Class CredentialVaultHelper

java.lang.Object
  extended by com.ibm.hats.portlet.cv.CredentialVaultHelper

public class CredentialVaultHelper
extends Object

This class is used to aid the access to the WebSphere Portal Credential Vault for standard portlets.


Field Summary
static String CLASSNAME
          The CLASSNAME string contains the package and class of the instance of the class being used.
static String Copyright
          The HATSCopyright.COPYRIGHT field will be updated each release, thereby updating this class file.
static int SECRET_ADMINISTRATIVE_SLOT
          Slot type value indicator for the administrative slot.
static int SECRET_PORTLET_PRIVATE_SLOT
          Slot type value indicator for the private slot.
static int SECRET_SHARED_SLOT
          Slot type value indicator for the shared slot.
static int SECRET_SYSTEM_SLOT
          Slot type value indicator for the system slot.
 
Method Summary
static String generateSlotName(String vaultId, String hostDestination, String hostAppId)
          Generates a name for the slot from the information indicated in the parameters.
 UserPasswordCredential getCredential(String slotId, javax.portlet.PortletRequest portletRequest)
          Returns the user password credential.
static CredentialVaultHelper getInstance()
          Returns a CredentialVaultHelper instance.
 String getSlotId(javax.portlet.PortletRequest portletRequest, String slotName, int slotType)
          Returns the slot id for the portlet.
 void setCredential(String slotId, UserPasswordCredential credential, javax.portlet.PortletRequest portletRequest)
          Sets the user password credential.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
The HATSCopyright.COPYRIGHT field will be updated each release, thereby updating this class file.

See Also:
Constant Field Values

CLASSNAME

public static final String CLASSNAME
The CLASSNAME string contains the package and class of the instance of the class being used.

See Also:
Constant Field Values

SECRET_PORTLET_PRIVATE_SLOT

public static final int SECRET_PORTLET_PRIVATE_SLOT
Slot type value indicator for the private slot.

See Also:
Constant Field Values

SECRET_SHARED_SLOT

public static final int SECRET_SHARED_SLOT
Slot type value indicator for the shared slot.

See Also:
Constant Field Values

SECRET_ADMINISTRATIVE_SLOT

public static final int SECRET_ADMINISTRATIVE_SLOT
Slot type value indicator for the administrative slot.

See Also:
Constant Field Values

SECRET_SYSTEM_SLOT

public static final int SECRET_SYSTEM_SLOT
Slot type value indicator for the system slot.

See Also:
Constant Field Values
Method Detail

getInstance

public static CredentialVaultHelper getInstance()
Returns a CredentialVaultHelper instance.

Returns:
CredentialVaultHelper

setCredential

public void setCredential(String slotId,
                          UserPasswordCredential credential,
                          javax.portlet.PortletRequest portletRequest)
                   throws javax.portlet.PortletException
Sets the user password credential.

Parameters:
slotId - the identification for which slot you would like to access
credential - the com.ibm.hats.portlet.cv.UserPasswordCredential object
portletRequest - the javax.portlet.PortletRequest object
Throws:
javax.portlet.PortletException

getCredential

public UserPasswordCredential getCredential(String slotId,
                                            javax.portlet.PortletRequest portletRequest)
                                     throws javax.portlet.PortletException
Returns the user password credential.

Parameters:
slotId - the identification for which slot you would like to access
portletRequest - the javax.portlet.PortletRequest object
Returns:
com.ibm.hats.portlet.cv.UserPasswordCredntial
Throws:
javax.portlet.PortletException

generateSlotName

public static String generateSlotName(String vaultId,
                                      String hostDestination,
                                      String hostAppId)
Generates a name for the slot from the information indicated in the parameters.

Parameters:
vaultId - the Portal Credential Vault identification
hostDestination - the host destination
hostAppId - the host application identification
Returns:
the slot name

getSlotId

public String getSlotId(javax.portlet.PortletRequest portletRequest,
                        String slotName,
                        int slotType)
                 throws javax.portlet.PortletException
Returns the slot id for the portlet.

Parameters:
portletRequest - the javax.portlet.PortletRequest object
slotName - the desired slot name
slotType - the desired slot type
Returns:
the slot id
Throws:
javax.portlet.PortletException

HATS 7.5.1 (201005110649)