|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.nim.NiMKernelService
com.nitido.nim.EntityService
public abstract class EntityService
The EntityService is the NiMKernel module resopnsible for managing entity instantiation.
Field Summary |
---|
Constructor Summary | |
---|---|
EntityService(NiMKernelServiceVisa visa)
This class constructor is used by NiMKernel to instantiate a new EntityService |
Method Summary | |
---|---|
protected void |
changeDataControlCredential(Entity entity,
Credential newDCCred,
boolean modBackend)
This is a redirector method to entity's changeDataControlCredential method. |
abstract void |
changeIdentifyingCredential(Entity entity,
Credential newCred)
This method is used to change the identifying credential of an entity (this is usually called for changing the user's password). |
abstract Entity |
getEntity(Credential credential)
This method returns an instance of an Entity associated to the given credential. |
protected abstract void |
init(NiMKernel kernel,
ConfigurationService confService)
This method is used to initialize the kernel service. |
protected abstract void |
releaseEntity(Entity entity)
This method signals the EntityService implementation that the specified Entity is "dying". |
protected void |
setEntityIdentifyingCredential(Entity entity,
Credential authCred)
This is a redirector method to allow the EntityService to change the IdentifyingCredential of the entity object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EntityService(NiMKernelServiceVisa visa)
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 |
---|
protected abstract void init(NiMKernel kernel, ConfigurationService confService) throws InitializationFailedException, NiMException
NiMKernelService
init
in class NiMKernelService
kernel
- Reference to the NiMKernel object that instantiated the
service.confService
- A reference to the configuration service. All the service
implementations (except ConfigurationService)
should retrieve the setting information from it.
InitializationFailedException
- If unable to initialize the kernel service.
NiMException
- If service initialization can not be done due to failure in
establish a connection to the back-end service. Not all
service implementation will throw this exception.public abstract Entity getEntity(Credential credential) throws AuthenticationFailedException, IllegalCredentialException, NiMException
credential
- The credential that uniquely identifies the requested
Entity
AuthenticationFailedException
- If unable to authenticate the given credential.
IllegalCredentialException
- If the given credential is null or determined to be
invalid by the underlying implementations of the
Authentication Service or the DataControl Service.
NiMException
- If a generic error occurred.public abstract void changeIdentifyingCredential(Entity entity, Credential newCred) throws AuthenticationFailedException, IllegalCredentialException, DataControlException, NiMException
entity
- The entity for which the credential is replaced. All
implementation can expect this parameter to be valid. It is
because the application cannot access this method directly.
This method is redirected by
Entity.changeIdentifyingCredential( Credential newCred )
only.newCred
- The new identifying credential for the entity.
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 back-end
services.protected abstract void releaseEntity(Entity entity)
entity
- The entity object that is marked as "dying".protected final void changeDataControlCredential(Entity entity, Credential newDCCred, boolean modBackend) throws IllegalCredentialException, DataControlException
entity
- Reference to the entity for which the credential is being
replaced.newDCCred
- Reference to the new credential for the data control.modBackend
- Flag used to inform the DataControl implementation to modify
it back-end when the data control credentials are replaced.
IllegalCredentialException
- If the given credential is invalid.
DataControlException
- If unable to establish a connection to the data control's
back-end.protected final void setEntityIdentifyingCredential(Entity entity, Credential authCred)
entity
- Reference to the entity whose identifying credential is
being set.authCred
- The new identifying credential of the entity. This
credential must be previously authenticated.
|
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.