Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.slide.security
Class NodePermission

    java.lang.Object
      org.apache.slide.security.NodePermission

All Implemented Interfaces:
  java.lang.Cloneable, java.io.Serializable

public final class NodePermission
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Permission object.

Version:
  $Revision: 1.18 $
See Also:
  Serialized Form

Field Summary
`protected java.lang.String` | `actionUri` Action Uri.
`protected boolean` | `inheritable` Inheritance flag.
`protected java.lang.String` | `inheritedFrom` URI of the resource this permission was inherited from NOT TO BE MADE PERSISTENT
`protected boolean` | `invert` Invert permission flag.
`protected boolean` | `negative` Negative permission flag.
`protected java.lang.String` | `objectUri` Object Uri.
`protected boolean` | `protect` Protected flag
`protected NodeRevisionNumber` | `revisionNumber` Revision number.
`protected java.lang.String` | `subjectUri` Subject Uri.

Constructor Summary
`NodePermission(ObjectNode object, NodeRevisionNumber revisionNumber, SubjectNode subject, ActionNode action, boolean inheritable, boolean negative)` Constructor 7.
`NodePermission(ObjectNode object, SubjectNode subject, ActionNode action)` Constructor 4.
`NodePermission(ObjectNode object, SubjectNode subject, ActionNode action, boolean inheritable)` Constructor 5.
`NodePermission(ObjectNode object, SubjectNode subject, ActionNode action, boolean inheritable, boolean negative)` Constructor 6.
`NodePermission(java.lang.String objectUri, java.lang.String subjectUri, java.lang.String actionUri)` Constructor 1.
`NodePermission(java.lang.String objectUri, java.lang.String subjectUri, java.lang.String actionUri, boolean inheritable)` Constructor 2.
`NodePermission(java.lang.String objectUri, java.lang.String subjectUri, java.lang.String actionUri, boolean inheritable, boolean negative)` Constructor 3.
`NodePermission(java.lang.String objectUri, java.lang.String revisionNumber, java.lang.String subjectUri, java.lang.String actionUri, boolean inheritable, boolean negative)` Constructor 8.

Method Summary
`NodePermission` | `cloneObject()` Clone.
`boolean` | `equals(java.lang.Object obj)` Equals.
`(package private) ActionNode` | `getActionNode()`
`java.lang.String` | `getActionUri()` Action Uri accessor.
`java.lang.String` | `getInheritedFrom()` Method getInheritedFrom
`java.lang.String` | `getObjectUri()` Object Uri accessor.
`NodeRevisionNumber` | `getRevisionNumber()` Revision number accessor.
`(package private) SubjectNode` | `getSubjectNode()`
`java.lang.String` | `getSubjectUri()` Subject Uri mutator.
`int` | `hashCode()` Hash Code.
`boolean` | `isInheritable()` Inheritance flag accessor.
`boolean` | `isInvert()` Method isInvert
`boolean` | `isNegative()` Negative flag accessor.
`boolean` | `isProtected()` Method isProtected
`(package private) void` | `setAction(ActionNode action)` Action Uri mutator.
`(package private) void` | `setAction(java.lang.String actionUri)` Action Uri mutator.
`void` | `setInheritable(boolean inheritable)` Inheritance flag mutator.
`void` | `setInheritedFrom(java.lang.String uri)` Method setInheritedFrom
`void` | `setInvert(boolean invert)` Method setInvert
`void` | `setNegative(boolean negative)` Negative flag mutator.
`(package private) void` | `setObject(ObjectNode object)` Object Uri mutator.
`void` | `setObject(java.lang.String objectUri)` Object Uri mutator
`void` | `setProtected(boolean protect)` Method setProtected
`(package private) void` | `setRevisionNumber(NodeRevisionNumber revisionNumber)` Revision number mutator.
`(package private) void` | `setSubject(java.lang.String subjectUri)` Subject Uri mutator.
`(package private) void` | `setSubject(SubjectNode subject)` Subject Uri mutator.
`java.lang.String` | `toString()` String representation of the permission.
`void` | `validate(java.lang.String expectedUri)` Validate.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### objectUri

    protected java.lang.String objectUri

  Object Uri.

### revisionNumber

    protected NodeRevisionNumber revisionNumber

  Revision number.

### subjectUri

    protected java.lang.String subjectUri

  Subject Uri.

### actionUri

    protected java.lang.String actionUri

  Action Uri.

### inheritable

    protected boolean inheritable

  Inheritance flag. True if permission is inheritable.

### inheritedFrom

    protected transient java.lang.String inheritedFrom

  URI of the resource this permission was inherited from NOT TO BE MADE PERSISTENT

### negative

    protected boolean negative

  Negative permission flag.

### invert

    protected boolean invert

  Invert permission flag.

### protect

    protected boolean protect

  Protected flag

Constructor Detail

### NodePermission

    public NodePermission(java.lang.String objectUri,
                          java.lang.String subjectUri,
                          java.lang.String actionUri)

  Constructor 1.

Parameters:
  `objectUri` - Object Uri
  `subjectUri` - Subject Uri
  `actionUri` - Action Uri

### NodePermission

    public NodePermission(java.lang.String objectUri,
                          java.lang.String subjectUri,
                          java.lang.String actionUri,
                          boolean inheritable)

  Constructor 2.

Parameters:
  `objectUri` - Object Uri
  `subjectUri` - Subject Uri
  `actionUri` - Action Uri
  `inheritable` - Inheritance flag

### NodePermission

    public NodePermission(java.lang.String objectUri,
                          java.lang.String subjectUri,
                          java.lang.String actionUri,
                          boolean inheritable,
                          boolean negative)

  Constructor 3.

Parameters:
  `objectUri` - Object Uri
  `subjectUri` - Subject Uri
  `actionUri` - Action Uri
  `inheritable` - Inheritance flag
  `negative` - Negative flag

### NodePermission

    public NodePermission(ObjectNode object,
                          SubjectNode subject,
                          ActionNode action)

  Constructor 4.

Parameters:
  `object` - Object
  `subject` - Subject
  `action` - Action

### NodePermission

    public NodePermission(ObjectNode object,
                          SubjectNode subject,
                          ActionNode action,
                          boolean inheritable)

  Constructor 5.

Parameters:
  `object` - Object
  `subject` - Subject
  `action` - Action
  `inheritable` - Inheritance flag

### NodePermission

    public NodePermission(ObjectNode object,
                          SubjectNode subject,
                          ActionNode action,
                          boolean inheritable,
                          boolean negative)

  Constructor 6.

Parameters:
  `object` - Object
  `subject` - Subject
  `action` - Action
  `inheritable` - Inheritance flag
  `negative` - Negative flag

### NodePermission

    public NodePermission(ObjectNode object,
                          NodeRevisionNumber revisionNumber,
                          SubjectNode subject,
                          ActionNode action,
                          boolean inheritable,
                          boolean negative)

  Constructor 7.

Parameters:
  `object` - Object
  `revisionNumber` - Revision number
  `subject` - Subject
  `action` - Action
  `inheritable` - Inheritance flag
  `negative` - Negative flag

### NodePermission

    public NodePermission(java.lang.String objectUri,
                          java.lang.String revisionNumber,
                          java.lang.String subjectUri,
                          java.lang.String actionUri,
                          boolean inheritable,
                          boolean negative)

  Constructor 8.

Parameters:
  `objectUri` - Object Uri
  `subjectUri` - Subject Uri
  `actionUri` - Action Uri
  `inheritable` - Inheritance flag
  `negative` - Negative flag

Method Detail

### setInheritable

    public void setInheritable(boolean inheritable)

  Inheritance flag mutator.

  Parameters:
    `inheritable` - New flag value

### isInheritable

    public boolean isInheritable()

  Inheritance flag accessor.

  Returns:
    boolean True if permission is inheritable

### setInheritedFrom

    public void setInheritedFrom(java.lang.String uri)

  Method setInheritedFrom

  Parameters:
    `uri` - the URI this permission will be inherited from

### getInheritedFrom

    public java.lang.String getInheritedFrom()

  Method getInheritedFrom

  Returns:
    the URI this permission was inherited from

### setNegative

    public void setNegative(boolean negative)

  Negative flag mutator.

  Parameters:
    `negative` - New negative value

### isNegative

    public boolean isNegative()

  Negative flag accessor.

  Returns:
    boolean True if permission is negative

### setInvert

    public void setInvert(boolean invert)

  Method setInvert

  Parameters:
    `invert` - a boolean

### isInvert

    public boolean isInvert()

  Method isInvert

  Returns:
    a boolean

### setProtected

    public void setProtected(boolean protect)

  Method setProtected

  Parameters:
    `protect` - a boolean

### isProtected

    public boolean isProtected()

  Method isProtected

  Returns:
    true, if this permission cannot be removed

### getObjectUri

    public java.lang.String getObjectUri()

  Object Uri accessor.

  Returns:
    String Object Uri

### setObject

    void setObject(ObjectNode object)

  Object Uri mutator.

  Parameters:
    `object` - New object

### setObject

    public void setObject(java.lang.String objectUri)

  Object Uri mutator

  Parameters:
    `objectUri` - New object Uri

### getSubjectUri

    public java.lang.String getSubjectUri()

  Subject Uri mutator.

  Returns:
    String Subject Uri

### setSubject

    void setSubject(SubjectNode subject)

  Subject Uri mutator.

  Parameters:
    `subject` - New subject

### setSubject

    void setSubject(java.lang.String subjectUri)

  Subject Uri mutator.

  Parameters:
    `subjectUri` - New subject Uri

### getSubjectNode

    SubjectNode getSubjectNode()

### getRevisionNumber

    public NodeRevisionNumber getRevisionNumber()

  Revision number accessor.

  Returns:
    Revision number to which this permission applies

### setRevisionNumber

    void setRevisionNumber(NodeRevisionNumber revisionNumber)

  Revision number mutator.

  Parameters:
    `revisionNumber` - Revision number

### getActionUri

    public java.lang.String getActionUri()

  Action Uri accessor.

  Returns:
    String Action Uri

### getActionNode

    ActionNode getActionNode()

### setAction

    void setAction(ActionNode action)

  Action Uri mutator.

  Parameters:
    `action` - New action

### setAction

    void setAction(java.lang.String actionUri)

  Action Uri mutator.

  Parameters:
    `actionUri` - New action Uri

### equals

    public boolean equals(java.lang.Object obj)

  Equals.

  Parameters:
    `obj` - Object to test
  Returns:
    boolean True if the two object are equal :
    - obj is of type SlidePermission and is not null
    - All three Uris are equal

### hashCode

    public int hashCode()

  Hash Code.

  Returns:
    int Hash code value

### toString

    public java.lang.String toString()

  String representation of the permission.

  Format : ObjectUri-SubjectUri-ActionUri-InheritanceFlag

  Returns:
    String String representation

### cloneObject

    public NodePermission cloneObject()

  Clone.

  Returns:
    Object clone

### validate

    public void validate(java.lang.String expectedUri)

  Validate.

  Parameters:
    `expectedUri` - Uri

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD