Nitido Inc.

com.nitido.nimx.services.simbackend
Class EntitlementServiceImpl

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

public class EntitlementServiceImpl
extends EntitlementService

This class provides an implemenation of the EntitlementService for simulation purposes.


Field Summary
 
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
EntitlementServiceImpl(NiMKernelServiceVisa visa)
          This class constructor is used by NiMKernel to instantiate a new EntitlementService
 
Method Summary
 void changeEntitlementCredential(Credential oldCred, Credential newCred)
          This method always allow the credential change.
protected  void init(NiMKernel kernel, ConfigurationService confService)
          This method is used by the NiMKernel to initialize the EntitlementService.
 boolean isAllowed(java.lang.String request, java.util.Map params, Credential credential)
          Check whether the given credential is entitled to perform the given request.
 
Methods inherited from class com.nitido.nim.EntitlementService
isAllowedForwarder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntitlementServiceImpl

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

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 EntitlementService. This service implementation does not require any initialization settings.

Specified by:
init in class EntitlementService
Parameters:
kernel - Reference to the kernel object that instantiated this service.
confService - Reference to the ConfigurationService.
Throws:
InitializationFailedException - If unable to initialize this service. This exception is never thrown by this service implementation.
NiMException - If unable to establish connection to the service back-end. This exception is never thrown by this service implementation.

isAllowed

public boolean isAllowed(java.lang.String request,
                         java.util.Map params,
                         Credential credential)
                  throws java.lang.IllegalArgumentException
Check whether the given credential is entitled to perform the given request.

Specified by:
isAllowed in class EntitlementService
Parameters:
request - The string representation of the request being done.
params - Reference to the parameters used to launch the given request.
credential - The credential entitled to make the given request.
Returns:
true if the credential is entitled to make the request otherwise false. This service implementation always returns true.
Throws:
java.lang.IllegalArgumentException - If any of the given arguments are invalid. This exception is never thrown by this service implementation.

changeEntitlementCredential

public void changeEntitlementCredential(Credential oldCred,
                                        Credential newCred)
This method always allow the credential change.

Specified by:
changeEntitlementCredential in class EntitlementService
Parameters:
oldCred - The original credential.
newCred - The new credential.

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.