com.bea.wli.tpm.management.configuration
Interface CertificateMBean

All Superinterfaces:
weblogic.management.configuration.ConfigurationMBean, weblogic.descriptor.DescriptorBean, javax.management.DynamicMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, weblogic.descriptor.SettableBean, TPMBaseMBean, weblogic.management.WebLogicMBean

public interface CertificateMBean
extends TPMBaseMBean

The class represents the reference for the certificate along with the private key associated with it imported, into the Keystore for WLI. There are 4 types of certificate types, supported by WLI

CLIENT - Digital certificate for a remote or local trading partner. Required when the SSL protocol with mutual authentication is used. This certificate is also used for one way or SSL_CERT authentication mode.

SERVER - Digital certificate for a remote trading partner. Required when the SSL protocol is used

ENCRYPTION - Required for each trading partner when business message encryption is used. Note that encryption support is available only with the RosettaNet protocols.

SIGNATURE - Required for each trading partner if nonrepudiation is configured.

See Also:
TradingPartnerMBean

Field Summary
static String CLIENT_CERTIFICATE
           
static String ENCRYPTION_CERTIFICATE
           
static String SERVER_CERTIFICATE
           
static String SIGNATURE_CERTIFICATE
           
 
Fields inherited from interface weblogic.management.configuration.ConfigurationMBean
DEFAULT_EMPTY_BYTE_ARRAY
 
Method Summary
 Certificate getCertificate()
          Retrieves the X509 Certificate from the Java Key store configured to be used with WLI The certificate name specified for this object, would be used as the alias to retrieve the certificate.
 String getCertificateName()
          Returns the name of the certificate in the WebLogic Integration repository.
 String getCertificateType()
          Returns the type of the certificate in the WebLogic Integration repository.
 String getPassword()
          Returns the password for the private key of the certificate.
 String getPasswordAlias()
          Returns the password alias for the private key of the certificate.
 void importCertificate(InputStream inputStream)
          Internal Use Only - This method is used to read the certificate from the input stream file and import into the Java Key store configured to be used with WLI.
 void importCertificateAndKeyFromFile(String certFile, String keyFile, String password)
          This method is used to read the certificate and private key from the file and import into the Java Key store configured to be used with WLI.
 void importCertificateFromFile(String fileName)
          This method is used to read the certificate from the file and import into the Java Key store configured to be used with WLI.
 boolean isPasswordEncrypted()
          Deprecated.  
 TradingPartnerMBean retrieveTradingPartner()
          Retrieves the TradingPartnerMBean associated for this certificate.
 void setCertificateName(String newValue)
          Registers the name of this certificate type.
 void setCertificateType(String newValue)
          Specifies the type of the certificate in the WebLogic Integration repository.
 void setPassword(String newValue)
          Deprecated. remove when pw store completed
 void setPasswordAlias(String newValue)
          Registers the password alias for the private key used for the importing certificate.
 void setPasswordEncrypted(boolean newValue)
          Deprecated.  
 void updateAll(String passwordAlias, String certFile, String keyFile, boolean importInKeyStore)
          Updates the certificate.
 
Methods inherited from interface com.bea.wli.tpm.management.configuration.TPMBaseMBean
fromXML, getDelegateObject, isActive, publish, remove, setActive, setDelegateObject, toXML, toXMLInternal, update, updateInternal
 
Methods inherited from interface weblogic.management.configuration.ConfigurationMBean
freezeCurrentValue, getComments, getName, getNotes, isDefaultedMBean, isPersistenceEnabled, isSet, restoreDefaultValue, setComments, setDefaultedMBean, setName, setNotes, setPersistenceEnabled, touch, unSet
 
Methods inherited from interface weblogic.management.WebLogicMBean
getMBeanInfo, getObjectName, getParent, getType, isCachingDisabled, isRegistered, setParent
 
Methods inherited from interface javax.management.DynamicMBean
getAttribute, getAttributes, invoke, setAttribute, setAttributes
 
Methods inherited from interface javax.management.MBeanRegistration
postDeregister, postRegister, preDeregister, preRegister
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 
Methods inherited from interface weblogic.descriptor.DescriptorBean
addBeanUpdateListener, addPropertyChangeListener, createChildCopy, createChildCopyIncludingObsolete, getDescriptor, getParentBean, isEditable, removeBeanUpdateListener, removePropertyChangeListener
 

Field Detail

CLIENT_CERTIFICATE

static final String CLIENT_CERTIFICATE
See Also:
Constant Field Values

SERVER_CERTIFICATE

static final String SERVER_CERTIFICATE
See Also:
Constant Field Values

SIGNATURE_CERTIFICATE

static final String SIGNATURE_CERTIFICATE
See Also:
Constant Field Values

ENCRYPTION_CERTIFICATE

static final String ENCRYPTION_CERTIFICATE
See Also:
Constant Field Values
Method Detail

getCertificateName

String getCertificateName()
Returns the name of the certificate in the WebLogic Integration repository.

Returns:
Name of certificate or alias in keystore

setCertificateName

void setCertificateName(String newValue)
                        throws javax.management.InvalidAttributeValueException
Registers the name of this certificate type. The name you specify is also used as the Keystore alias. The name can be max of 254 characters and cannot be null. The name must not have any blank spaces.

Parameters:
newValue - - the name of the certificate
Throws:
javax.management.InvalidAttributeValueException - - If the name cannot be set or the name has invalid characters.

getCertificateType

String getCertificateType()
Returns the type of the certificate in the WebLogic Integration repository.

Returns:
type of the certificate. Possible return types are
  • CLIENT
  • SERVER
  • ENCRYPTION
  • SIGNATURE
If no certificate type is associated, NONE would be returned

setCertificateType

void setCertificateType(String newValue)
                        throws javax.management.InvalidAttributeValueException
Specifies the type of the certificate in the WebLogic Integration repository. Certificate must be one of the following types

Parameters:
newValue - - type of the certificate
Throws:
javax.management.InvalidAttributeValueException - - If none of the above valid types

getPassword

String getPassword()
Returns the password for the private key of the certificate. The password returned is encryped using BASE64 encoding

Returns:
Base64 encoded password

setPassword

void setPassword(String newValue)
                 throws javax.management.InvalidAttributeValueException
Deprecated. remove when pw store completed

Registers the password for private key used for the importing certificate. The value specified should be in clear text. The passwords specified would be BASE 64 encoded while updating the repository The method throws InvalidAttributeValueException if the password specified is null.

Parameters:
newValue - the password to be set
Throws:
javax.management.InvalidAttributeValueException - - If the specified value is null or has blank spaces

getPasswordAlias

String getPasswordAlias()
Returns the password alias for the private key of the certificate. The password alias is used to access the password in the password store.

Returns:
alias name for the password store entry

setPasswordAlias

void setPasswordAlias(String newValue)
                      throws javax.management.InvalidAttributeValueException
Registers the password alias for the private key used for the importing certificate. The password alias is used to retrieve the actual password from the password store. The method throws InvalidAttributeValueException if the alias specified is null.

Parameters:
newValue - the password alias to be set
Throws:
javax.management.InvalidAttributeValueException - - If the specified value is null or has blank spaces

isPasswordEncrypted

boolean isPasswordEncrypted()
Deprecated. 

For Internal Use Only - Specifies whether the password is Base 64 encoded

Returns:
boolean - true if password is encrypted - false if not

setPasswordEncrypted

void setPasswordEncrypted(boolean newValue)
                          throws javax.management.InvalidAttributeValueException
Deprecated. 

For Internal Use Only - Registers whether the password should be encoded or not

Parameters:
newValue - - wether the password is encrypted
Throws:
javax.management.InvalidAttributeValueException

getCertificate

Certificate getCertificate()
                           throws ManagementException
Retrieves the X509 Certificate from the Java Key store configured to be used with WLI The certificate name specified for this object, would be used as the alias to retrieve the certificate.

Throws:
ManagementException - - If unable to retrieve certificate or certificate with alias does not exists

importCertificateFromFile

void importCertificateFromFile(String fileName)
                               throws ManagementException
This method is used to read the certificate from the file and import into the Java Key store configured to be used with WLI.

Parameters:
fileName - - Absolute path of the file
Throws:
ManagementException - - If unable to read from the file or unable to load the certificate to keystore

importCertificateAndKeyFromFile

void importCertificateAndKeyFromFile(String certFile,
                                     String keyFile,
                                     String password)
                                     throws ManagementException
This method is used to read the certificate and private key from the file and import into the Java Key store configured to be used with WLI.

Parameters:
certFile - - Absolute path of the file
keyFile - - Absolute path of the private key file
password - - password of the private key in clear text
Throws:
ManagementException - - If unable to read from the file or unable to load the certificate to keystore

importCertificate

void importCertificate(InputStream inputStream)
                       throws ManagementException
Internal Use Only - This method is used to read the certificate from the input stream file and import into the Java Key store configured to be used with WLI.

Parameters:
inputStream - -
Throws:
ManagementException - - If unable to read from stream or unable to load the certificate to keystore

retrieveTradingPartner

TradingPartnerMBean retrieveTradingPartner()
                                           throws ManagementException
Retrieves the TradingPartnerMBean associated for this certificate.

Returns:
- trading partner for the certificate. null is no trading partner is associated with this certificate
Throws:
ManagementException - - If unable to find the the trading partner for this certificate type.

updateAll

void updateAll(String passwordAlias,
               String certFile,
               String keyFile,
               boolean importInKeyStore)
               throws javax.management.InvalidAttributeValueException,
                      UpdateException,
                      ObjectActiveException
Updates the certificate.

Parameters:
password - - No longer used. Provided value is ignored.
passwordEncrypted - - No longer used. Provided value is ignored.
passwordAlias - - alias name in password store
certFile - - Absolute file location on the file system. This can be null. In this case, no certificate would be imported to the key store. The certificate could be imported at a later stage, using the CertificateMBean.
keyFile - - Absolute file location of the private key for the certificate. if this is specified then certFile must also be provided.
importInKeyStore - - Should the certificate be imported into keystore
Throws:
javax.management.InvalidAttributeValueException
UpdateException
ObjectActiveException