com.sun.identity.wss.provider
Class ProviderConfig

java.lang.Object
  extended bycom.sun.identity.wss.provider.ProviderConfig

public abstract class ProviderConfig
extends java.lang.Object

This class ProviderConfig represents the web services server provider or the web services client provider configuration.

All the static methods in this class are for the persistent operations.


Field Summary
static java.lang.String WSC
          Constant to define the web services client type.
static java.lang.String WSP
          Constant to define the web services provider type.
 
Constructor Summary
ProviderConfig()
           
 
Method Summary
static void deleteProvider(java.lang.String providerName, java.lang.String providerType)
          Removes the provider configuration.
static java.util.List getAllMessageLevelSecurityMech()
          Returns the list of message level security mechanism objects.
static java.util.List getAllSupportedSecurityMech()
          Returns the list of all available security mechanism objects.
 java.lang.String getKeyAlias()
          Returns the key alias for this provider.
 java.lang.String getKeyEncryptedPassword()
          Returns the keystore encrypted password.
 java.lang.String getKeyPassword()
          Returns the key password in the keystore.
 java.security.KeyStore getKeyStore()
          Returns the provider JKS KeyStore
 java.lang.String getKeyStoreEncryptedPasswd()
          Returns the keystore encrypted password.
 java.lang.String getKeyStoreFile()
          Returns the keystore file.
 java.lang.String getKeyStorePassword()
          Returns the keystore password.
 java.lang.String getProperty(java.lang.String property)
          Returns the value of the property.
static ProviderConfig getProvider(java.lang.String providerName, java.lang.String providerType)
          Returns the provider configuration for a given provider name.
 java.lang.String getProviderName()
          Returns the name of the Provider.
 java.lang.String getProviderType()
          Returns the provider type.
 java.util.List getSecurityMechanisms()
          Returns the list of security mechanims that the provider is configured.
 java.lang.String getServiceType()
          Returns the service type.
 java.util.List getTrustAuthorityConfigList()
          Returns the provider's trusted authorities list.
 java.util.List getUsers()
          Returns the list of PasswordCredentials of the user.
 java.lang.String getWSPEndpoint()
          Returns the endpoint of the web services provider.
static boolean isProviderExists(java.lang.String providerName, java.lang.String providerType)
          Checks if the provider of given type does exists.
 boolean isResponseSignEnabled()
          Checks if the response needs to be signed or not.
static void saveProvider(ProviderConfig config)
          Saves the Provider in the configuration repository.
 void setDefaultKeyStore(boolean set)
          Sets the provider to use the default keystore.
 void setKeyAlias(java.lang.String alias)
          Sets the key alias for this provider.
 void setKeyStore(java.security.KeyStore keyStore, java.lang.String password)
          Sets the keystore for this provider.
 void setKeyStore(java.lang.String fileName, java.lang.String keyStorePassword, java.lang.String keyPassword)
          Sets the keystore for this provider.
 void setProperty(java.lang.String property, java.lang.String value)
          Sets the value for the given property in Provider Configuration.
 void setResponseSignEnabled(boolean enable)
          Sets the response sign enable flag.
 void setSecurityMechanisms(java.util.List authMech)
          Sets the list of security mechanisms.
 void setServiceType(java.lang.String serviceType)
          Sets the service type.
 void setTrustAuthorityConfigList(java.util.List trustedAuthorities)
          Sets the trusted authority configurations.
 void setUsers(java.util.List usercredentials)
          Sets the user credentials list.
 void setWSPEndpoint(java.lang.String endpoint)
          Sets the web services provider endpoint.
 boolean useDefaultKeyStore()
          Returns true if the provider uses default keystore.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WSC

public static final java.lang.String WSC
Constant to define the web services client type.

See Also:
Constant Field Values

WSP

public static final java.lang.String WSP
Constant to define the web services provider type.

See Also:
Constant Field Values
Constructor Detail

ProviderConfig

public ProviderConfig()
Method Detail

getSecurityMechanisms

public java.util.List getSecurityMechanisms()
Returns the list of security mechanims that the provider is configured.

Returns:
list of security mechanisms.

setSecurityMechanisms

public void setSecurityMechanisms(java.util.List authMech)
Sets the list of security mechanisms.

Parameters:
authMech - the list of security mechanisms.

getProviderName

public java.lang.String getProviderName()
Returns the name of the Provider.

Returns:
the provider name.

getProperty

public java.lang.String getProperty(java.lang.String property)
Returns the value of the property.

Returns:
the value of the property.

setProperty

public void setProperty(java.lang.String property,
                        java.lang.String value)
Sets the value for the given property in Provider Configuration.

Parameters:
property - the name of the being set.
value - the property value being set.

getWSPEndpoint

public java.lang.String getWSPEndpoint()
Returns the endpoint of the web services provider.

Returns:
the endpoint of the web services provider.

setWSPEndpoint

public void setWSPEndpoint(java.lang.String endpoint)
Sets the web services provider endpoint.

Parameters:
endpoint - the web services provider endpoint.

setServiceType

public void setServiceType(java.lang.String serviceType)
Sets the service type.

Parameters:
serviceType - the service type.

getServiceType

public java.lang.String getServiceType()
Returns the service type.

Returns:
the service type.

setUsers

public void setUsers(java.util.List usercredentials)
Sets the user credentials list.


getUsers

public java.util.List getUsers()
Returns the list of PasswordCredentials of the user.

Returns:
the list of PasswordCredential objects.

getProviderType

public java.lang.String getProviderType()
Returns the provider type. It will be WSP or WSC

Returns:
the provider type.

getKeyStore

public java.security.KeyStore getKeyStore()
Returns the provider JKS KeyStore

Returns:
the JKS KeyStore

getKeyStoreFile

public java.lang.String getKeyStoreFile()
Returns the keystore file.

Returns:
the keystore file name.

getKeyStorePassword

public java.lang.String getKeyStorePassword()
Returns the keystore password.

Returns:
the keystore password.

getKeyStoreEncryptedPasswd

public java.lang.String getKeyStoreEncryptedPasswd()
Returns the keystore encrypted password.

Returns:
the keystore encrypted password.

getKeyPassword

public java.lang.String getKeyPassword()
Returns the key password in the keystore.

Returns:
the key password in the keystore.

getKeyEncryptedPassword

public java.lang.String getKeyEncryptedPassword()
Returns the keystore encrypted password.

Returns:
the keystore encrypted password.

setKeyStore

public void setKeyStore(java.lang.String fileName,
                        java.lang.String keyStorePassword,
                        java.lang.String keyPassword)
                 throws com.sun.identity.wss.provider.ProviderException
Sets the keystore for this provider.

Parameters:
fileName - the provider key store fully qualified file name.
keyStorePassword - the password required to access the key store file.
keyPassword - the password required to access the key from the keystore.
Throws:
ProviderException - if the key store file does not exist or an invalid password.

setKeyStore

public void setKeyStore(java.security.KeyStore keyStore,
                        java.lang.String password)
Sets the keystore for this provider.

Parameters:
keyStore - the provider key store.
password - the password required to access the key store file.

getKeyAlias

public java.lang.String getKeyAlias()
Returns the key alias for this provider.

Returns:
the key alias of the provider.

setKeyAlias

public void setKeyAlias(java.lang.String alias)
Sets the key alias for this provider.

Parameters:
alias - the key alias for this provider.

useDefaultKeyStore

public boolean useDefaultKeyStore()
Returns true if the provider uses default keystore.

Returns:
true if the provider uses default keystore.

setDefaultKeyStore

public void setDefaultKeyStore(boolean set)
Sets the provider to use the default keystore.

Parameters:
set - boolean variable to enable or disable to use the default keystore.

getTrustAuthorityConfigList

public java.util.List getTrustAuthorityConfigList()
Returns the provider's trusted authorities list.

Returns:
the list of the TrustAuthorityConfig s.

setTrustAuthorityConfigList

public void setTrustAuthorityConfigList(java.util.List trustedAuthorities)
Sets the trusted authority configurations.

Parameters:
trustedAuthorities - the list of TrustAuthorityConfig s.

isResponseSignEnabled

public boolean isResponseSignEnabled()
Checks if the response needs to be signed or not.

Returns:
true if the response need to be signed.

setResponseSignEnabled

public void setResponseSignEnabled(boolean enable)
Sets the response sign enable flag.

Parameters:
enable - enable the response signing.

saveProvider

public static void saveProvider(ProviderConfig config)
                         throws com.sun.identity.wss.provider.ProviderException
Saves the Provider in the configuration repository.

Parameters:
config - the provider configuration.
Throws:
ProviderException - if the creation is failed.

getProvider

public static ProviderConfig getProvider(java.lang.String providerName,
                                         java.lang.String providerType)
                                  throws com.sun.identity.wss.provider.ProviderException
Returns the provider configuration for a given provider name.

Parameters:
providerName - the provider name.
providerType - the provider type.
Throws:
ProviderException - if unable to retrieve.

isProviderExists

public static boolean isProviderExists(java.lang.String providerName,
                                       java.lang.String providerType)
Checks if the provider of given type does exists.

Parameters:
providerName - the name of the provider.
providerType - type of the provider.
Returns:
true if the provider exists with a given name and type.

deleteProvider

public static void deleteProvider(java.lang.String providerName,
                                  java.lang.String providerType)
                           throws com.sun.identity.wss.provider.ProviderException
Removes the provider configuration.

Parameters:
providerName - the name of the provider.
providerType - the type of the provider.
Throws:
ProviderException - if any failure.

getAllSupportedSecurityMech

public static java.util.List getAllSupportedSecurityMech()
Returns the list of all available security mechanism objects.

Returns:
the list of SecurityMechanism objects.

getAllMessageLevelSecurityMech

public static java.util.List getAllMessageLevelSecurityMech()
Returns the list of message level security mechanism objects.

Returns:
the list of message level SecurityMechanism objects.


Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.