Nitido Inc.

com.nitido.nimx.services.entity.generic
Class EntityServiceImpl

java.lang.Object
  extended by com.nitido.nim.NiMKernelService
      extended by com.nitido.nim.EntityService
          extended by com.nitido.nimx.services.entity.generic.EntityServiceImpl
All Implemented Interfaces:
NiMConstants

public class EntityServiceImpl
extends EntityService

A generic implementation of the EntityService. It expects the following configuration has setting for the following keys:

Constant Name Value Description
CONF_KEY_CHANGE_PWD_DATACONTROL A string of "true" or "false" Tells whether this EntityService will call the DataControl to change the password when a user has asked for changing the password. You may need to set this to "true" if the DataControlService is not using the same backend used by AuthenticationService.
CONF_KEY_CHANGE_PWD_ENTITLEMENT A string of "true" or "false" Tells whether this EntityService will call the DataControl to change the password when a user has asked for changing the password. You may need to set this to "true" if the EntitlementService is not using the same backend used by AuthenticationService.
CONF_KEY_CHANGE_PWD_PROVISION A string of "true" or "false" Tells whether this EntityService will call the DataControl to change the password when a user has asked for changing the password. You may need to set this to "true" if the ProvisionService is not using the same backend used by AuthenticationService.
CONF_KEY_CONTAINER_ENTITY A comma separated string This contains a list of credential identifying groups that this EntityService will create a ContainerEntity instead of User object when getEntity() is called.


Field Summary
static java.lang.String CONF_KEY_CHANGE_PWD_AUTHENTICATION
          Configuration key for the flag to indicate whether we should change the Authentication credential when the application changes the Entity's identifying credential.
static java.lang.String CONF_KEY_CHANGE_PWD_DATACONTROL
          Configuration key for the flag to indicate whether we should change the DataControl credential when the application changes the Entity's identifying credential.
static java.lang.String CONF_KEY_CHANGE_PWD_ENTITLEMENT
          Configuration key for the flag to indicate whether we should change the Entitlement credential when the application changes the Entity's identifying credential.
static java.lang.String CONF_KEY_CHANGE_PWD_PROVISION
          Configuration key for the flag to indicate whether we should change the Provision credential when the application changes the Entity's identifying credential.
static java.lang.String CONF_KEY_CONTAINER_ENTITY
          Configuration key for the "comma separated list" of the identifying groups that the getEntity( Credential ) method should return a ContainerEntity object instead of the regular User object.
 
Fields inherited from interface com.nitido.nim.NiMConstants
ACTION_CREATE_NUGGET, ACTION_CREATE_NUGGET_BY_NAME, ACTION_CRED_SPACE_ADD, ACTION_CRED_SPACE_GET_KEYS, ACTION_CRED_SPACE_GET_KEYS_START_WITH, ACTION_CRED_SPACE_GET_VALUE, ACTION_CRED_SPACE_GET_VALUES, ACTION_CRED_SPACE_MODIFY, ACTION_CRED_SPACE_REMOVE_VALUE, ACTION_CRED_SPACE_REMOVE_VALUES, ACTION_CRED_SPACE_REPLACE, ACTION_DEPROVISION_ENTITY, ACTION_ENTITY_CHANGE_CRED, ACTION_LOG_EVENT, ACTION_PROVISION_ENTITY, ACTION_USER_SPACE_ADD, ACTION_USER_SPACE_GET_KEYS, ACTION_USER_SPACE_GET_KEYS_START_WITH, ACTION_USER_SPACE_GET_VALUE, ACTION_USER_SPACE_GET_VALUES, ACTION_USER_SPACE_MODIFY, ACTION_USER_SPACE_REMOVE_VALUE, ACTION_USER_SPACE_REMOVE_VALUES, ACTION_USER_SPACE_REPLACE, CONF_PREFIX_SECURITY_ACCESS, CONF_PREFIX_SECURITY_ALLOW, CONF_PREFIX_SECURITY_ASSIGN, CONF_PREFIX_SECURITY_RESOURCE, PARAM_CHANGE_CRED, PARAM_DEPROVISION_CREDENTIAL, PARAM_EVENT_NAME, PARAM_MODIFIER_CONTAINER, PARAM_NUGGET_CREATE_CRED, PARAM_NUGGET_NAME, PARAM_NUGGET_SETTINGS, PARAM_NUGGET_TYPE, PARAM_PROVISION_DESCRIPTOR, PARAM_SPACE_KEY, PARAM_SPACE_KEYS_START_WITH, PARAM_SPACE_VALUE, PREFIX_ACCESS_CLASS_IN_PACKAGE
 
Constructor Summary
EntityServiceImpl(NiMKernelServiceVisa visa)
          This class constructor is used by NiMKernel to instantiate a new EntityService
 
Method Summary
 void changeIdentifyingCredential(Entity entity, Credential newCred)
          This method is used to change the identifying credential of an entity (this is usually called when changing the user's password).
 Entity getEntity(Credential credential)
          This method returns an instance of an Entity associated to the given credential.
protected  void init(NiMKernel kernel, ConfigurationService confService)
          This method is used to initialize this implementation of the EntityService.
 void releaseEntity(Entity entity)
          This method signals the EntityService implementation that the specified Entity is "dying".
 
Methods inherited from class com.nitido.nim.EntityService
changeDataControlCredential, setEntityIdentifyingCredential
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONF_KEY_CONTAINER_ENTITY

public static final java.lang.String CONF_KEY_CONTAINER_ENTITY
Configuration key for the "comma separated list" of the identifying groups that the getEntity( Credential ) method should return a ContainerEntity object instead of the regular User object.

See Also:
Constant Field Values

CONF_KEY_CHANGE_PWD_AUTHENTICATION

public static final java.lang.String CONF_KEY_CHANGE_PWD_AUTHENTICATION
Configuration key for the flag to indicate whether we should change the Authentication credential when the application changes the Entity's identifying credential.

See Also:
Constant Field Values

CONF_KEY_CHANGE_PWD_DATACONTROL

public static final java.lang.String CONF_KEY_CHANGE_PWD_DATACONTROL
Configuration key for the flag to indicate whether we should change the DataControl credential when the application changes the Entity's identifying credential.

See Also:
Constant Field Values

CONF_KEY_CHANGE_PWD_ENTITLEMENT

public static final java.lang.String CONF_KEY_CHANGE_PWD_ENTITLEMENT
Configuration key for the flag to indicate whether we should change the Entitlement credential when the application changes the Entity's identifying credential.

See Also:
Constant Field Values

CONF_KEY_CHANGE_PWD_PROVISION

public static final java.lang.String CONF_KEY_CHANGE_PWD_PROVISION
Configuration key for the flag to indicate whether we should change the Provision credential when the application changes the Entity's identifying credential.

See Also:
Constant Field Values
Constructor Detail

EntityServiceImpl

public EntityServiceImpl(NiMKernelServiceVisa visa)
This class constructor is used by NiMKernel to instantiate a new EntityService

Parameters:
visa - Reference to the NiMKernelServiceVisa object required to instantiate the service. This parameter is required to ensure that only the NiMkernel can instantiate a reference to this service.
Method Detail

init

protected void init(NiMKernel kernel,
                    ConfigurationService confService)
             throws InitializationFailedException,
                    NiMException
This method is used to initialize this implementation of the EntityService.

Specified by:
init in class EntityService
Parameters:
kernel - Reference to the kernel that instantitated this service.
confService - Reference to the ConfigurationService. This service implementation expects the following initialization parameters:
  • CONF_KEY_CHANGE_PWD_AUTHENTICATION
  • CONF_KEY_CHANGE_PWD_DATACONTROL
  • CONF_KEY_CHANGE_PWD_ENTITLEMENT
  • CONF_KEY_CHANGE_PWD_PROVISION
Throws:
InitializationFailedException - If unable to initialize the EntityService.
NiMException - This exception is never thrown by this service implementation.

getEntity

public Entity getEntity(Credential credential)
                 throws AuthenticationFailedException,
                        NiMException
This method returns an instance of an Entity associated to the given credential.

Specified by:
getEntity in class EntityService
Parameters:
credential - The credential that uniquely identifies the requested Entity
Returns:
Reference to the newly instantiated entity of type "com.nitido.User". This method should never return null.
Throws:
AuthenticationFailedException - If unable to authenticate the given credential agains the kernel AuthenticationService..
IllegalCredentialException - If the given credential is null or determined to be invalid by the underlying implementations of Authentication Service or the DataControl Service.
NiMException - If unable to connect to the authentication or DataControl back-end servers.

changeIdentifyingCredential

public void changeIdentifyingCredential(Entity entity,
                                        Credential newCred)
                                 throws AuthenticationFailedException,
                                        IllegalCredentialException,
                                        DataControlException,
                                        NiMException
This method is used to change the identifying credential of an entity (this is usually called when changing the user's password).

Specified by:
changeIdentifyingCredential in class EntityService
Parameters:
entity - The entity for which the credential is replaced.
newCred - The new identifying credential for the entity.
Throws:
AuthenticationFailedException - If unable to authenticate the identifying credential of the entity.
IllegalCredentialException - If the given credential is not valid
DataControlException - If unable to bind the DataControl to the entity.
NiMException - If unable to establish a connection to the authentication and data control back-end servers or if the given entity does not currently have an identifying credential associated to it.

releaseEntity

public void releaseEntity(Entity entity)
Description copied from class: EntityService
This method signals the EntityService implementation that the specified Entity is "dying". The EntityService implementation will perform the required clean up and monitoring operations. This method is invoked only by NiM.releaseEntity(). It is not supposed to be invoked by any other NiM core objects or NiMKernelService implementations.

Specified by:
releaseEntity in class EntityService
Parameters:
entity - The entity object that is marked as "dying".

Nitido NiM 2.5 Java API

These JavaDoc pages are generated for release/nim_2_5-2.5.44

Copyright © 1999-2009 Nitido Inc.    Proprietary and Confidential.    All Rights Reserved.