SMILA 1.0 API documentation

org.eclipse.smila.security
Class SecurityAttribute

java.lang.Object
  extended by org.eclipse.smila.security.SecurityAttribute

public final class SecurityAttribute
extends java.lang.Object


Constructor Summary
SecurityAttribute(AnyMap metadata)
          Conversion Constructor.
SecurityAttribute(AnyMap metadata, DataFactory factory)
          Conversion Constructor.
SecurityAttribute(Record record)
          Conversion Constructor.
 
Method Summary
 void add(SecurityAttributes.AccessRightType accessRightType, SecurityAttributes.EntityType entityType, java.lang.String entity)
          Adds the given entity as a value to the security attribute specified by SecurityAttributes.AccessRightType and SecurityAttributes.EntityType.
 AnyMap getAccessRights()
          Returns the SecurityAttributes.ACCESS_RIGHTS attribute.
 AnyMap getAccessRights(SecurityAttributes.AccessRightType accessRightType)
          Returns the security attribute of the given SecurityAttributes.AccessRightType.
 AnySeq getAccessRights(SecurityAttributes.AccessRightType accessRightType, SecurityAttributes.EntityType entityType)
          Returns the security attribute of the given SecurityAttributes.AccessRightType and SecurityAttributes.EntityType.
 void remove()
          Removes the SecurityAttributes.ACCESS_RIGHTS attribute and all sub attribute.
 void remove(SecurityAttributes.AccessRightType accessRightType)
          Removes the security attribute with the given SecurityAttributes.AccessRightType and all it's sub attribute.
 void remove(SecurityAttributes.AccessRightType accessRightType, SecurityAttributes.EntityType entityType)
          Removes the security attribute with the given SecurityAttributes.AccessRightType and SecurityAttributes.EntityType and all it's sub attributes.
 void remove(SecurityAttributes.AccessRightType accessRightType, SecurityAttributes.EntityType entityType, java.lang.String entity)
          Removes the given entity from the security attribute of the given SecurityAttributes.AccessRightType and SecurityAttributes.EntityType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityAttribute

public SecurityAttribute(Record record)
Conversion Constructor.

Parameters:
record - the Record to contain the security attribute

SecurityAttribute

public SecurityAttribute(AnyMap metadata)
Conversion Constructor.

Parameters:
metadata - the AnyMap to contain the security attribute

SecurityAttribute

public SecurityAttribute(AnyMap metadata,
                         DataFactory factory)
Conversion Constructor.

Parameters:
metadata - the AnyMap to contain the security attribute
factory - the RecordFactory to use for attribute creation
Method Detail

getAccessRights

public AnyMap getAccessRights()
Returns the SecurityAttributes.ACCESS_RIGHTS attribute. If it does not exist it is created.

Returns:
the SecurityAttributes.ACCESS_RIGHTS attribute

getAccessRights

public AnyMap getAccessRights(SecurityAttributes.AccessRightType accessRightType)
Returns the security attribute of the given SecurityAttributes.AccessRightType. If it does not exist it is created.

Parameters:
accessRightType - the AccessRightType
Returns:
the security attribute

getAccessRights

public AnySeq getAccessRights(SecurityAttributes.AccessRightType accessRightType,
                              SecurityAttributes.EntityType entityType)
Returns the security attribute of the given SecurityAttributes.AccessRightType and SecurityAttributes.EntityType. If it does not exist it is created.

Parameters:
accessRightType - the AccessRightType
entityType - the EntityType
Returns:
the security attribute

add

public void add(SecurityAttributes.AccessRightType accessRightType,
                SecurityAttributes.EntityType entityType,
                java.lang.String entity)
Adds the given entity as a value to the security attribute specified by SecurityAttributes.AccessRightType and SecurityAttributes.EntityType. Non existing attributes are created.

Parameters:
accessRightType - the AccessRightType
entityType - the EntityType
entity - the value to add

remove

public void remove()
Removes the SecurityAttributes.ACCESS_RIGHTS attribute and all sub attribute.


remove

public void remove(SecurityAttributes.AccessRightType accessRightType)
Removes the security attribute with the given SecurityAttributes.AccessRightType and all it's sub attribute.

Parameters:
accessRightType - the AccessRightType

remove

public void remove(SecurityAttributes.AccessRightType accessRightType,
                   SecurityAttributes.EntityType entityType)
Removes the security attribute with the given SecurityAttributes.AccessRightType and SecurityAttributes.EntityType and all it's sub attributes.

Parameters:
accessRightType - the AccessRightType
entityType - the EntityType

remove

public void remove(SecurityAttributes.AccessRightType accessRightType,
                   SecurityAttributes.EntityType entityType,
                   java.lang.String entity)
Removes the given entity from the security attribute of the given SecurityAttributes.AccessRightType and SecurityAttributes.EntityType.

Parameters:
accessRightType - the AccessRightType
entityType - the EntityType
entity - the value to remove

SMILA 1.0 API documentation