|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.nim.DataControl
com.nitido.nimx.services.simbackend.DataControlImpl
public class DataControlImpl
This DataControl implementation stores user space entries to the directory server if the class configuration contains a "mapping entry" for the given key. Otherwise, this DataControl stores the user space entry in memory. On the other hand, Credential space entries are always kept in memory.
Field Summary | |
---|---|
static java.lang.String |
CONF_KEY_ALLOW_ALL
The configuration key for indicating if the simulator backend will allow all login and binding without being provisioned before. |
static java.lang.String |
CONF_KEY_PREFIX_ATTRIBUTEMAP
The configuration key prefix for the mapping settings from a user space key to a LDAP attribute name. |
static java.lang.String |
CONF_KEY_PREFIX_NUGGETSETTING
The key prefix of the nugget settings information. |
static java.lang.String |
CONF_KEY_PREFIX_NUGGETTYPE
The key prefix of the nugget class information. |
static java.lang.String |
CONF_KEY_PREFIX_TYPEMAP
The configuration key prefix for the mapping settings from a user space key to a LDAP attribute name. |
static int |
LEN_CONF_KEY_PREFIX_TYPEMAP
The length of the string CONF_KEY_PREFIX_TYPEMAP. |
Fields inherited from interface com.nitido.nim.CredentialConstants |
---|
CRED_ADMIN, CRED_CONTAINER, CRED_HELPDESK, CRED_SYSTEM, CRED_USER, KEY_PASSWORD |
Constructor Summary | |
---|---|
protected |
DataControlImpl(Credential credential,
java.util.HashMap settings)
This constructor returns an instance of the DataControl that is binded to the given credential. |
Method Summary | |
---|---|
protected void |
acquire()
This method is used to establish a connection to the back-end data store. |
protected void |
activate()
This method is used to activates the DataControl after the Entity object containing this DataControl is deserialized. |
void |
bind(Credential cred)
This method is used to bind the given credential to the DataControl if the credential can be authenticated against the directory server. |
protected void |
changeDataControlCredential(Credential newCred,
boolean modBackend)
This method changes and rebinds the "login" credential of the DataControl. |
protected void |
deactivate()
This method is called to deactivate the DataControl. |
void |
destroy()
This method is invoked when the associated Entity has been signaled as dying. |
protected java.lang.String[] |
getCredentialSpaceKeysImpl(java.lang.String startsWith)
This method contains the actual implementation for the getCredentialSpaceKeys( startsWith ) method. |
protected java.util.Vector |
getFromCredentialSpaceImpl(java.lang.String key)
This method contains the actual implementation for the getFromCredentialSpace( key ) method. |
protected java.util.Vector |
getFromUserSpaceImpl(java.lang.String key)
This method contains the actual implementation for the getFromUserSpace() method. |
protected java.lang.String[] |
getUserSpaceKeysImpl(java.lang.String startsWith)
This method contains the actual implementation for the getUserSpaceKeys() method. |
protected Credential |
getValueFromCredentialSpaceImpl(java.lang.String key)
This method contains the actual implementation for the getValueFromCredentialSpace( key ) method. |
protected java.io.Serializable |
getValueFromUserSpaceImpl(java.lang.String key)
This method contains the actual implementation for the getValueFromUserSpace() method. |
protected void |
initialize(java.util.HashMap settings)
This method is used to initialize the DataControl with the given settings. |
protected void |
modifyCredentialSpaceImpl(ModifierContainer container)
This method provides the actual implementation to the modifyCredentialSpace() method. |
protected void |
modifyUserSpaceImpl(ModifierContainer container)
This method contains the actual implementation for the modifyUserSpace( container ) method. |
protected void |
release()
This method is used to release a connection to the back-end data store. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CONF_KEY_ALLOW_ALL
public static final java.lang.String CONF_KEY_PREFIX_ATTRIBUTEMAP
public static final java.lang.String CONF_KEY_PREFIX_NUGGETTYPE
public static final java.lang.String CONF_KEY_PREFIX_NUGGETSETTING
public static final java.lang.String CONF_KEY_PREFIX_TYPEMAP
public static final int LEN_CONF_KEY_PREFIX_TYPEMAP
Constructor Detail |
---|
protected DataControlImpl(Credential credential, java.util.HashMap settings) throws IllegalCredentialException, DataControlException
This method is declared protected to ensure that only the corresponding DataControlService can be used to get an instance of a DataControl.
credential
- A reference to the Credential object used to authenticate
against the back-end data store.settings
- A reference to the HashMap object that contains
parameters to initialize the DataControl.
Please refer to the initialize( HashMap settings ) for the list
of settings expected by this implementation.
IllegalCredentialException
- If the given credential are not supported by the concrete
DataControl implementation.
DataControlException
- If unable to instantiate the DataControl objectinitialize( HashMap settings )
Method Detail |
---|
protected void initialize(java.util.HashMap settings) throws DataControlException
initialize
in class DataControl
settings
- Reference to the HashMap object that contains the
parameters used to initialize the DataControl. This
DataControl implementation requires the following
initialization parameters:
DataControlException
- If unable to initialize the DataControlpublic void bind(Credential cred) throws IllegalCredentialException, DataControlException
bind
in class DataControl
cred
- Reference to the credential object used to authenticate the
entity to the back-end data store.
IllegalCredentialException
- If the given credential is not supported by the
DataControl.
DataControlException
- If unable to bind the credential to the DataControl.protected void acquire() throws DataControlException
DataControl
acquire
in class DataControl
DataControlException
- If unable to establish connection to the back-end data
store.protected void release() throws DataControlException
DataControl
release
in class DataControl
DataControlException
- If unable to close the connection to the back-end data
store.protected void activate() throws ActivationException
DataControl
activate
in class DataControl
ActivationException
- If unable to activate the DataControlprotected void deactivate() throws ActivationException
DataControl
deactivate
in class DataControl
ActivationException
- If unable to de-activate the DataControl.protected void modifyCredentialSpaceImpl(ModifierContainer container) throws DataControlException
DataControl
Since the modifyCredentialSpace() method has already called the acquire() and release() methods, implementations of this method only need to handle the core modification logic. It does not need to worry about connection and other low level system resource management.
modifyCredentialSpaceImpl
in class DataControl
container
- Encapsulates the list of modifications to be executed on the
Credential space.
DataControlException
- This exception is thrown if unable to perform the requested
modifications.protected Credential getValueFromCredentialSpaceImpl(java.lang.String key) throws DataControlException
DataControl
getValueFromCredentialSpaceImpl
in class DataControl
key
- The key that uniquely identifies a set of credentials.
DataControlException
- If unable to retrieve a credential from the credential store.protected java.util.Vector getFromCredentialSpaceImpl(java.lang.String key) throws DataControlException
DataControl
getFromCredentialSpaceImpl
in class DataControl
key
- The key used to identify the requested credentials.
DataControlException
- If unable to retrieve the credentials from the credential
store.protected java.lang.String[] getCredentialSpaceKeysImpl(java.lang.String startsWith) throws DataControlException
DataControl
getCredentialSpaceKeysImpl
in class DataControl
startsWith
- The prefix of the requested credential keys.
DataControlException
- If unable to fetch the credential space.protected void modifyUserSpaceImpl(ModifierContainer container) throws DataControlException
DataControl
modifyUserSpaceImpl
in class DataControl
container
- Encapsulates the list of modifications to be executed on
the user space of the entity.
DataControlException
- If unable to perform any of the requested modifications.protected java.io.Serializable getValueFromUserSpaceImpl(java.lang.String key) throws DataControlException
DataControl
getValueFromUserSpaceImpl
in class DataControl
key
- The key that uniquely idenfifies a set of objects in the
user space.
DataControlException
- If unable to retrieve the requested object from the user
space.protected java.util.Vector getFromUserSpaceImpl(java.lang.String key) throws DataControlException
DataControl
getFromUserSpaceImpl
in class DataControl
key
- The key used to identify the set of objects in the user
space.
DataControlException
- If Unable to retrieve requested information from the user space.protected java.lang.String[] getUserSpaceKeysImpl(java.lang.String startsWith) throws DataControlException
DataControl
getUserSpaceKeysImpl
in class DataControl
startsWith
- The prefix string used to search for the currently
available user space keys. If no key matches the given
prefix, this method returns an empty array
DataControlException
- If unable to retrieve the requested information from the
user spaceprotected void changeDataControlCredential(Credential newCred, boolean modBackend) throws IllegalCredentialException, DataControlException
DataControl
changeDataControlCredential
in class DataControl
newCred
- The new credential to be changed for the currently binded user.modBackend
- If this flag is set to true, this method should change the login
credential in the backend server as specified. Otherwise, this
method only need to change how this DataControl establish the
connection to the backend.
IllegalCredentialException
- If the given credentials is not supported by the
DataControl.
DataControlException
- If unable to bind the credential to the DataControl.public void destroy()
DataControl
destroy
in class DataControl
|
Nitido NiM 2.5 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.