org.openpermis.policy.bean
Interface PartBean

All Superinterfaces:
Part, Serializable
All Known Subinterfaces:
ActionBean, ActionBeanCollection, AuthorityBean, BeanCollection<P>, DomainBean, ObligationBean, ObligationBeanCollection, PolicyBean, PredicateBean, RoleAssignmentRuleBean, RoleAssignmentRuleBeanCollection, RoleHierarchyBean, RoleHierarchyBeanCollection, TargetAccessRuleBean, TargetAccessRuleBeanCollection, TargetBean, TargetBeanCollection
All Known Implementing Classes:
AbstractPredicate, And, BasicAbstractCollection, BasicAction, BasicActionCollection, BasicAuthority, BasicDomain, BasicObligation, BasicObligationCollection, BasicPartBean, BasicPolicy, BasicRoleAssignmentRule, BasicRoleAssignmentRuleCollection, BasicRoleHierarchy, BasicRoleHierarchyCollection, BasicTarget, BasicTargetAccessRule, BasicTargetAccessRuleCollection, BasicTargetCollection, False, Not, Or, Present, SubstringOf, True, ValueRelationalPredicate, ValueSetRelationalPredicate

public interface PartBean
extends Part

Mutable part that has JavaBean property and serial number support.

Since:
0.1.0

Method Summary
 void accept(List<PartBean> parents, MultiPartBeanVisitor visitor)
          Allows traversing the model according to the visitor pattern.
 void accept(PartBeanVisitor visitor)
          Allows traversing the model according to the visitor pattern.
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a property change listener to this part bean.
 boolean checkLocalPartConsistency(PartProblemReporter reporter)
          Checks the local consistency of this part.
 boolean equalSerialNumber(PartBean part)
          Compares the serial number of this part to the one of the specified part.
 PartBean findBySerialNumber(SerialNumber serialNumber)
          Returns the part bean corresponding to the specified serial number.
 Class<? extends PartBean> getPartBeanType()
          Returns the primary part bean interface class that this part implements.
 SerialNumber getSerialNumber()
          Returns the serial number of this part.
 boolean instanceOf(Class<? extends PartBean> type)
          Returns true if this part bean is instance of type.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a property change listener from this part bean.
 String toShortString()
          Returns the serial number string representation of this class.
 
Methods inherited from interface org.openpermis.policy.Part
equals, hashCode, toString
 

Method Detail

checkLocalPartConsistency

boolean checkLocalPartConsistency(PartProblemReporter reporter)
Checks the local consistency of this part.

Nothing is said about consistency of this part in a global policy wide sense. This function is used to implement Policy.isPolicyConsistent()

Since:
0.9.0

getSerialNumber

SerialNumber getSerialNumber()
Returns the serial number of this part.

Returns:
the serial number of this part.
Since:
0.1.0

getPartBeanType

Class<? extends PartBean> getPartBeanType()
Returns the primary part bean interface class that this part implements.

Returns:
the primary part bean interface class that this part implements.
Since:
0.3.0

instanceOf

boolean instanceOf(Class<? extends PartBean> type)
Returns true if this part bean is instance of type.

Parameters:
type - the type to check for.
Returns:
true if this part bean is instance of type.
Since:
0.9.0

equalSerialNumber

boolean equalSerialNumber(PartBean part)
Compares the serial number of this part to the one of the specified part.

Parameters:
part - the part bean whose serial number to compare to this one.
Returns:
true if the specified part has the same serial number as this one, false otherwise.
Since:
0.1.0

findBySerialNumber

PartBean findBySerialNumber(SerialNumber serialNumber)
Returns the part bean corresponding to the specified serial number.

If the part bean contains other part beans, it searches its child beans recursively.

Parameters:
serialNumber - the SerialNumber of the part bean to return.
Returns:
the matching PartBean or null if no matching part bean is found.
Since:
0.1.0

toShortString

String toShortString()
Returns the serial number string representation of this class.

The simplified string representation only consists only of the simple implementation class name of this part followed by the serial number in square brackets.

Returns:
the serial number string representation of this class.
Since:
0.1.0

accept

void accept(PartBeanVisitor visitor)
Allows traversing the model according to the visitor pattern. Visit is called exactly ones one each part in the domain model.

Each part bean must call method visitor.visit(this)

Parameters:
visitor - a PartBeanVisitor.
Since:
0.9.0

accept

void accept(List<PartBean> parents,
            MultiPartBeanVisitor visitor)
Allows traversing the model according to the visitor pattern. Visit may be called more than once on each part in the domain model, but it is called exactly once for each tuple (parent path, part).

Each part bean must call method visitor.visit(this)

Parameters:
parents - the path of parents of this part.
visitor - a PartBeanVisitor.
Since:
0.9.0

addPropertyChangeListener

void addPropertyChangeListener(PropertyChangeListener listener)
Adds a property change listener to this part bean.

The change listener will be notified whenever this part or a sub part that is contained in this part changes.

Changes of parts contained are forwarded with a property change event that is using null as old and new value.

The same listener object may be added more than once, and will be called as many times as it is added.

If the listener is null, no action is taken.

Parameters:
listener - the listener to be added, may be null.
Since:
0.1.0

removePropertyChangeListener

void removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener from this part bean.

If the same listener was added more than once, it will be notified one less time after being removed.

If the listener is null, or was never added, no action is taken.

Parameters:
listener - the listener to be removed, may be null.
Since:
0.1.0


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:16:59
Copyright (c) 2002-2007 Ergon Informatik AG