org.openpermis.policy
Interface Part

All Superinterfaces:
Serializable
All Known Subinterfaces:
Action, ActionBean, ActionBeanCollection, ActionCollection, Authority, AuthorityBean, BeanCollection<P>, Domain, DomainBean, ObligationBean, ObligationBeanCollection, ObligationCollection, PartBean, Policy, PolicyBean, Predicate, RoleAssignmentRule, RoleAssignmentRuleBean, RoleAssignmentRuleBeanCollection, RoleAssignmentRuleCollection, RoleHierarchy, RoleHierarchyBean, RoleHierarchyBeanCollection, RoleHierarchyCollection, Target, TargetAccessRule, TargetAccessRuleBean, TargetAccessRuleBeanCollection, TargetAccessRuleCollection, TargetBean, TargetBeanCollection, TargetCollection
All Known Implementing Classes:
AbstractPredicate, And, BasicAbstractCollection, BasicAction, BasicActionCollection, BasicAuthority, BasicDomain, BasicObligation, BasicObligationCollection, BasicPart, BasicPartBean, BasicPolicy, BasicRoleAssignmentRule, BasicRoleAssignmentRuleCollection, BasicRoleHierarchy, BasicRoleHierarchyCollection, BasicTarget, BasicTargetAccessRule, BasicTargetAccessRuleCollection, BasicTargetCollection, InternalSubject, Not, Or, Present, SubstringOf, ValueRelationalPredicate, ValueSetRelationalPredicate

public interface Part
extends Serializable

Describes a part of a policy.

All complex objects in a policy implement the part interface.

Since:
0.1.0

Method Summary
 boolean equals(Object obj)
          Check if this policy part is equivalent to the one specified.
 int hashCode()
          Returns the hash code of this policy part.
 boolean isValid(PartProblemReporter reporter)
          Check if this part and all parts contained are valid.
 String toString()
          Returns a string representation of this policy part.
 

Method Detail

isValid

boolean isValid(PartProblemReporter reporter)
Check if this part and all parts contained are valid.

Instead of enforcing that a part is valid at all times a part may be invalid (for example while loading a policy from a file or while editing a part). Use this method to assert that a part is valid.

Notes:
Complex parts should also check the validity of parts included.
Parameters:
reporter - optional callback where violiations are reported, may be null if the caller is not interested in details about the violations.
Returns:
true if the part and all parts contained are valid, false if this part or at least one part contained are invalid.
Since:
0.1.0

equals

boolean equals(Object obj)
Check if this policy part is equivalent to the one specified.

A part is considered equivalent to this part if it's state is equivalent to the state of this part and all parts contained are equivalent to the parts contained in this policy part.

Overrides:
equals in class Object
Parameters:
obj - the policy part to compare this policy part to.
See Also:
hashCode()
Since:
0.1.0

hashCode

int hashCode()
Returns the hash code of this policy part.

In addition to the general contract for Object.hashCode() the hash code of a policy part should not make use of the default object hash code. Instead the hash code of a policy part should only be calculated according to the contents of the policy part in such a way that different instances of a policy part with the same content return the same hash code.

Overrides:
hashCode in class Object
See Also:
equals(Object)
Returns:
the hash code of this policy part.
Since:
0.1.0

toString

String toString()
Returns a string representation of this policy part.

The string representation is purely informational and provides summary of the part in the following form: PartName [serial=value, ...]. The string representation starts with the simple implementation class name and is followed by its details in square brackets.

Overrides:
toString in class Object
See Also:
Object.toString()
Returns:
the string representation of this policy part.
Since:
0.1.0


PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:22
Copyright (c) 2002-2007 Ergon Informatik AG