|
![]() |
|||||||||
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.datacontrol.sim.DataControlImpl
public class DataControlImpl
A simulator implementation of DataControl.
This implementation will store all data in memory.
Field Summary |
---|
Constructor Summary | |
---|---|
DataControlImpl(Credential credential,
java.util.HashMap settings)
Default constructor that does nothing. |
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 credential)
This method is used to bind the given credential to the DataControl. |
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. |
protected 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 |
Constructor Detail |
---|
public DataControlImpl(Credential credential, java.util.HashMap settings) throws IllegalCredentialException, DataControlException
IllegalCredentialException
DataControlException
Method Detail |
---|
protected void initialize(java.util.HashMap settings) throws DataControlException
DataControl
initialize
in class DataControl
settings
- Reference to the HashMap object that contains the
parameters used to initialize the DataControl. The
contents of this container are specific to the
implementation of the class.
DataControlException
- If unable to initialize the DataControlpublic void bind(Credential credential) throws IllegalCredentialException, DataControlException
DataControl
bind
in class DataControl
credential
- Reference to the credential object used to authenticate the
entity to the DataControl back-end data store.
IllegalCredentialException
- If the given credentials is not supported by the
concrete DataControl implementation.
DataControlException
- If unable to bind the credential to the back-end data storeprotected 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.protected 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.