SMILA (incubation) API documentation

org.eclipse.smila.security
Class SecurityAnnotation

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

public final class SecurityAnnotation
extends java.lang.Object


Constructor Summary
SecurityAnnotation(MObject mObject)
          Conversion Constructor.
SecurityAnnotation(MObject mObject, RecordFactory factory)
          Conversion Constructor.
SecurityAnnotation(Record record)
          Conversion Constructor.
 
Method Summary
 void add(SecurityAnnotations.AccessRightType accessRightType, SecurityAnnotations.EntityType entityType, java.lang.String entity)
          Adds the given entity as a value to the security annotation specified by accessRightType and entityType.
 Annotation getAccessRights()
          Returns the SecurityAnnotations.ACCESS_RIGHTS annotation.
 Annotation getAccessRights(SecurityAnnotations.AccessRightType accessRightType)
          Returns the security annotation of the given accessRightType.
 Annotation getAccessRights(SecurityAnnotations.AccessRightType accessRightType, SecurityAnnotations.EntityType entityType)
          Returns the security annotation of the given accessRightType and entityType.
 void remove()
          Removes the SecurityAnnotations.ACCESS_RIGHTS annotation and all sub annotations.
 void remove(SecurityAnnotations.AccessRightType accessRightType)
          Removes the security annotation with the given accessRightType and all it's sub annotations.
 void remove(SecurityAnnotations.AccessRightType accessRightType, SecurityAnnotations.EntityType entityType)
          Removes the security annotation with the given accessRightType and entityType and all it's sub annotations.
 void remove(SecurityAnnotations.AccessRightType accessRightType, SecurityAnnotations.EntityType entityType, java.lang.String entity)
          Removes the given entity from the security annotation of the given accessRightType and entityType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityAnnotation

public SecurityAnnotation(Record record)
Conversion Constructor.

Parameters:
record - the record to contain the security annotation

SecurityAnnotation

public SecurityAnnotation(MObject mObject)
Conversion Constructor.

Parameters:
mObject - the mObject to contain the security annotation

SecurityAnnotation

public SecurityAnnotation(MObject mObject,
                          RecordFactory factory)
Conversion Constructor.

Parameters:
mObject - the mObject to contain the security annotation
factory - the RecordFactory to use for annotation creation
Method Detail

getAccessRights

public Annotation getAccessRights()
Returns the SecurityAnnotations.ACCESS_RIGHTS annotation. If it does not exist it is created.

Returns:
the SecurityAnnotations.ACCESS_RIGHTS annotation

getAccessRights

public Annotation getAccessRights(SecurityAnnotations.AccessRightType accessRightType)
Returns the security annotation of the given accessRightType. If it does not exist it is created.

Parameters:
accessRightType - the AccessRightType
Returns:
the security annotation

getAccessRights

public Annotation getAccessRights(SecurityAnnotations.AccessRightType accessRightType,
                                  SecurityAnnotations.EntityType entityType)
Returns the security annotation of the given accessRightType and entityType. If it does not exist it is created.

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

add

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

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

remove

public void remove()
Removes the SecurityAnnotations.ACCESS_RIGHTS annotation and all sub annotations.


remove

public void remove(SecurityAnnotations.AccessRightType accessRightType)
Removes the security annotation with the given accessRightType and all it's sub annotations.

Parameters:
accessRightType - the AccessRightType

remove

public void remove(SecurityAnnotations.AccessRightType accessRightType,
                   SecurityAnnotations.EntityType entityType)
Removes the security annotation with the given accessRightType and entityType and all it's sub annotations.

Parameters:
accessRightType - the AccessRightType
entityType - the EntityType

remove

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

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

SMILA (incubation) API documentation