Nitido Inc.

com.nitido.nimx.services.simbackend
Class ProvisionServiceImpl

java.lang.Object
  extended by com.nitido.nim.NiMKernelService
      extended by com.nitido.nim.ProvisionService
          extended by com.nitido.nimx.services.simbackend.ProvisionServiceImpl
All Implemented Interfaces:
NiMConstants

public class ProvisionServiceImpl
extends ProvisionService

This class implements a simulator for the ProvionService to provision entities in memory.

When this service is started, there are no users created. The application can only logs in with the administrator's credential (type=admin, id=admin, password=password).


Field Summary
static java.lang.String ACTION_DEPROVISION
           
static java.lang.String ACTION_PROVISION
           
static java.lang.String KEY_TIMEZONE
           
 
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
ProvisionServiceImpl(NiMKernelServiceVisa visa)
          This class constructor is used by NiMKernel to instantiate a new ProvisionService.
 
Method Summary
 void changeProvisionCredential(Credential oldCred, Credential newCred)
          Change the provision credential.
 void deprovisionEntity(Credential targetCred, Entity adminEntity)
          This method will de-provision the entity associated to the given target credential.
protected  void init(NiMKernel kernel, ConfigurationService confService)
          This method is used by the NiMKernel to initialize the ProvisionService.
protected  boolean isProvisioned(Credential targetCred)
          This method is used to verify if the given credential has already been provisioned.
 void provisionEntity(EntityProvisionDescriptor descriptor, Entity adminEntity)
          This method is used to provision a new entity and stored in memory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_PROVISION

public static final java.lang.String ACTION_PROVISION
See Also:
Constant Field Values

ACTION_DEPROVISION

public static final java.lang.String ACTION_DEPROVISION
See Also:
Constant Field Values

KEY_TIMEZONE

public static final java.lang.String KEY_TIMEZONE
See Also:
Constant Field Values
Constructor Detail

ProvisionServiceImpl

public ProvisionServiceImpl(NiMKernelServiceVisa visa)
This class constructor is used by NiMKernel to instantiate a new ProvisionService.

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 by the NiMKernel to initialize the ProvisionService.

Specified by:
init in class ProvisionService
Parameters:
kernel - Reference to the kernel that instantiated this service.
confService - Reference to the ConfigurationService
Throws:
InitializationFailedException - This exception is never thrown by this service implementation.
NiMException - This exception is never thrown by this service implementation.

provisionEntity

public void provisionEntity(EntityProvisionDescriptor descriptor,
                            Entity adminEntity)
                     throws java.lang.IllegalArgumentException,
                            EntityProvisionException,
                            PermissionDeniedException,
                            NiMException
This method is used to provision a new entity and stored in memory.

Specified by:
provisionEntity in class ProvisionService
Parameters:
descriptor - The entity descriptor is data container that holds all the information necessary to provision the required Entity
adminEntity - The entity object of the administrator. The identifying credential of this entity object should have enough privilege for provisioning other entities.
Throws:
java.lang.IllegalArgumentException - If any of the given arguments are null.
EntityProvisionException - If unable to cprovision the entity due to inconsistencies on the data in the EntityProvisionDescriptor and the back-end requirements.
PermissionDeniedException - If given Entity does not have permission to perform the required action.
NiMException - If unable to establish a connection with the back-end provisioning service.

deprovisionEntity

public void deprovisionEntity(Credential targetCred,
                              Entity adminEntity)
                       throws java.lang.IllegalArgumentException,
                              PermissionDeniedException,
                              NiMException
Description copied from class: ProvisionService
This method will de-provision the entity associated to the given target credential.

Specified by:
deprovisionEntity in class ProvisionService
Parameters:
targetCred - The identifying credential of the entity being de-provisioned.
adminEntity - The entity object of the administrator. The identifying credential of this administrator entity object should have enough privilege for provisioning a new entity
Throws:
java.lang.IllegalArgumentException - If any of the given arguments are null.
PermissionDeniedException - If the given credential does not have permission for the action.
NiMException - If unable to establish a connection with the back-end de-provisioning service.

isProvisioned

protected boolean isProvisioned(Credential targetCred)
                         throws java.lang.IllegalArgumentException,
                                NiMException
This method is used to verify if the given credential has already been provisioned.

Specified by:
isProvisioned in class ProvisionService
Parameters:
targetCred - The credential of an entity
Returns:
True if the entity with the given credential has been provisioned, otherwise it returns false.
Throws:
java.lang.IllegalArgumentException - If any of the given arguments are null.
NiMException - If unable to establish a connection with the back-end provisioning service.

changeProvisionCredential

public void changeProvisionCredential(Credential oldCred,
                                      Credential newCred)
                               throws IllegalCredentialException,
                                      NiMException
Description copied from class: ProvisionService
Change the provision credential. This method is called by the EntityService implementation if it is configured to change the provision credential when the application calls the method Entity.changeIdentifyingCredential().

Specified by:
changeProvisionCredential in class ProvisionService
Parameters:
oldCred - The original credential.
newCred - The new credential.
Throws:
IllegalCredentialException - If the credentials are incorrect.
NiMException - If some other unexpected error has occured.

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.