Nitido Inc.

com.nitido.nim
Class ContainerEntity

java.lang.Object
  extended by com.nitido.nim.Entity
      extended by com.nitido.nim.ContainerEntity
All Implemented Interfaces:
NiMConstants, java.io.Serializable

public class ContainerEntity
extends Entity
implements java.io.Serializable

The ContainerEntity class is the Entity that represents an authenticated Nimlet container.

This class disables all the Entity credential space and user space access methods. It also disables the nugget management methods. Instead, it provides a method "getNimletClass( String name )" for loading Nimlets.

The reason for this ban is because the ContainerEntity may be using the backend administrator privilege, which may not have any corresponding user profile. For example, if both AuthenticationService and DataControlService are using the same backend LDAP server, we may be creating ContainerEntity with the "cn=Directory Manager" credential. The directory manager does not have any user profile and any attempt to access its user profile will fail.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.nitido.nim.Entity
_datacontrol, _identifyingCred, _nuggets, _released, _requestCount
 
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
ContainerEntity(NiMKernelServiceVisa visa, Credential credential, DataControl datacontrol)
           
 
Method Summary
 void addToCredentialSpace(java.lang.String key, Credential value)
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 void addToUserSpace(java.lang.String key, java.io.Serializable value)
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 Nugget createNugget(java.lang.String nuggetName, java.lang.String nuggetType, java.util.Hashtable settings)
          This method always throw PermissionDeniedException because ContainerEntity has no privilege to create or access nuggets.
 Nugget createNugget(java.lang.String nuggetName, java.lang.String nuggetType, java.util.Hashtable settings, Credential credential)
          This method always throw PermissionDeniedException because ContainerEntity has no privilege to create or access nuggets.
 java.lang.String[] getCredentialSpaceKeys()
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 java.lang.String[] getCredentialSpaceKeys(java.lang.String startsWith)
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 java.util.Vector getFromCredentialSpace(java.lang.String key)
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 java.util.Vector getFromUserSpace(java.lang.String key)
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 java.lang.Class getNimletClass(java.lang.String className)
          This method returns the class object for the given class name.
 Nugget getNugget(java.lang.String nuggetName)
          This method always throw PermissionDeniedException because ContainerEntity has no privilege to create or access nuggets.
 java.lang.String[] getUserSpaceKeys()
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 java.lang.String[] getUserSpaceKeys(java.lang.String startsWith)
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 Credential getValueFromCredentialSpace(java.lang.String key)
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 java.io.Serializable getValueFromUserSpace(java.lang.String key)
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 void modifyCredentialSpace(ModifierContainer container)
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 void modifyUserSpace(ModifierContainer container)
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 void removeFromCredentialSpace(java.lang.String key)
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 void removeFromCredentialSpace(java.lang.String key, Credential value)
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 void removeFromUserSpace(java.lang.String key)
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 void removeFromUserSpace(java.lang.String key, java.io.Serializable value)
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 void replaceInCredentialSpace(java.lang.String key, Credential value)
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 void replaceInUserSpace(java.lang.String key, java.io.Serializable value)
          This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.
 
Methods inherited from class com.nitido.nim.Entity
changeDataControlCredential, changeIdentifyingCredential, finalize, getID, getIdentifyingCredential, getNiM, getNuggetNames, releaseEntity, releaseNugget, requestBegin, requestEnd, setIdentifyingCredential, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContainerEntity

public ContainerEntity(NiMKernelServiceVisa visa,
                       Credential credential,
                       DataControl datacontrol)
                throws NiMRuntimeException
Throws:
NiMRuntimeException
Method Detail

getNimletClass

public java.lang.Class getNimletClass(java.lang.String className)
                               throws IllegalNimletClassException
This method returns the class object for the given class name.

Parameters:
className - The class name of the Nimlet to be loaded.
Throws:
IllegalNimletClassException - This exception is thrown if:
  • The given class name can not be found.
  • The given class name does not implement the Nimlet interface.

modifyCredentialSpace

public void modifyCredentialSpace(ModifierContainer container)
                           throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
modifyCredentialSpace in class Entity
Parameters:
container - Encapsulates the list of modifications to be executed on the Credential space.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the operations described by the given container.

addToCredentialSpace

public void addToCredentialSpace(java.lang.String key,
                                 Credential value)
                          throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
addToCredentialSpace in class Entity
Parameters:
key - The key used to identify the given credential
value - The credential to be added to the credential space of the entity.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the requested action.

replaceInCredentialSpace

public void replaceInCredentialSpace(java.lang.String key,
                                     Credential value)
                              throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
replaceInCredentialSpace in class Entity
Parameters:
key - The key used to identify the given credential
value - The credential to be added to the credential space of the entity.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the requested action.

removeFromCredentialSpace

public void removeFromCredentialSpace(java.lang.String key,
                                      Credential value)
                               throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
removeFromCredentialSpace in class Entity
Parameters:
key - The key used to identify the credential to be removed.
value - The credential object to be removed from the credential space.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the requested action.

removeFromCredentialSpace

public void removeFromCredentialSpace(java.lang.String key)
                               throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
removeFromCredentialSpace in class Entity
Parameters:
key - The key used to identify the credentials to be removed.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the requested action.

getValueFromCredentialSpace

public Credential getValueFromCredentialSpace(java.lang.String key)
                                       throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
getValueFromCredentialSpace in class Entity
Parameters:
key - The key that uniquely identifies a set of credentials.
Returns:
The reference to the first credential instance that was previously associated to the given key. If the given key is not found, the method returns null.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the requested action.

getFromCredentialSpace

public java.util.Vector getFromCredentialSpace(java.lang.String key)
                                        throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
getFromCredentialSpace in class Entity
Parameters:
key - The key used to identify the requested credentials.
Returns:
A Vector with all the credentials associated with the given key. If no credential is found with the given key then this method returns an empty vector.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the requested action.

getCredentialSpaceKeys

public java.lang.String[] getCredentialSpaceKeys()
                                          throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
getCredentialSpaceKeys in class Entity
Returns:
A string array will all the keys currently available in the credential space.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the requested action.

getCredentialSpaceKeys

public java.lang.String[] getCredentialSpaceKeys(java.lang.String startsWith)
                                          throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
getCredentialSpaceKeys in class Entity
Parameters:
startsWith - The prefix string used to search for the currently available credential keys. If no key matches the given prefix, this method returns an empty array
Returns:
A String array with the credential keys that matches the given prefix. If no match is found, the method returns an empty array.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the requested action.

modifyUserSpace

public void modifyUserSpace(ModifierContainer container)
                     throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
modifyUserSpace in class Entity
Parameters:
container - Encapsulates the list of modifications to be executed on the user space of the entity.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the operations described by the given container.

addToUserSpace

public void addToUserSpace(java.lang.String key,
                           java.io.Serializable value)
                    throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
addToUserSpace in class Entity
Parameters:
key - The key used to identify object being added to the user space.
value - The object being added to the user space.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the requested action.

replaceInUserSpace

public void replaceInUserSpace(java.lang.String key,
                               java.io.Serializable value)
                        throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
replaceInUserSpace in class Entity
Parameters:
key - The key used to identify the object being stored.
value - The object to be stored in the user space.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the requested action.

removeFromUserSpace

public void removeFromUserSpace(java.lang.String key,
                                java.io.Serializable value)
                         throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
removeFromUserSpace in class Entity
Parameters:
key - The key used to identify the credential to be removed.
value - The object to be removed.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the requested action.

removeFromUserSpace

public void removeFromUserSpace(java.lang.String key)
                         throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
removeFromUserSpace in class Entity
Parameters:
key - The key used to identify the objects being removed.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the requested action.

getValueFromUserSpace

public java.io.Serializable getValueFromUserSpace(java.lang.String key)
                                           throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
getValueFromUserSpace in class Entity
Parameters:
key - The key that uniquely idenfifies a set of objects in the user space.
Returns:
The first object reference that matches the given key.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the requested action.

getFromUserSpace

public java.util.Vector getFromUserSpace(java.lang.String key)
                                  throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
getFromUserSpace in class Entity
Parameters:
key - The key used to identify the set of objects in the user space.
Returns:
A Vector with all the objects associated with the given key. If the given key is not found, this method returns an empty vector.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the requested action.

getUserSpaceKeys

public java.lang.String[] getUserSpaceKeys()
                                    throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
getUserSpaceKeys in class Entity
Returns:
A String array with all the keys currently available in the user space.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the requested action.

getUserSpaceKeys

public java.lang.String[] getUserSpaceKeys(java.lang.String startsWith)
                                    throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no access to credential space and user space.

Overrides:
getUserSpaceKeys in class Entity
Parameters:
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
Returns:
A String array with the user space keys that matches the given prefix. If no match is found, the method returns an empty array.
Throws:
PermissionDeniedException - This exception is thrown if the Entity is not entitled to perform the requested action.

getNugget

public Nugget getNugget(java.lang.String nuggetName)
                 throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no privilege to create or access nuggets.

Overrides:
getNugget in class Entity
Parameters:
nuggetName - The name of the nugget that was passed when the nugget was created through the createNugget() method on Entity.
Returns:
Reference to the nugget associated to the given name.
Throws:
PermissionDeniedException - If the identifying credential of the entity does not have permission to create the requested nugget.

createNugget

public Nugget createNugget(java.lang.String nuggetName,
                           java.lang.String nuggetType,
                           java.util.Hashtable settings,
                           Credential credential)
                    throws PermissionDeniedException
This method always throw PermissionDeniedException because ContainerEntity has no privilege to create or access nuggets.

Throws:
PermissionDeniedException

createNugget

public Nugget createNugget(java.lang.String nuggetName,
                           java.lang.String nuggetType,
                           java.util.Hashtable settings)
This method always throw PermissionDeniedException because ContainerEntity has no privilege to create or access nuggets.

Overrides:
createNugget in class Entity
Parameters:
nuggetName - The unique name for the nugget within the entity.
nuggetType - The type of the nugget to be instantiated.
settings - The set of name/value pairs that specify the settings of the Nugget being created.
Returns:
Reference to the newly created Nugget.

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.