org.openpermis.policy.bean
Interface PartBean

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

public interface PartBean
extends Part

Mutable part that has JavaBean property and serial number support.

Since:
0.1.0

Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a property change listener to this part bean.
 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.
 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, isValid, toString
 

Method Detail

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

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

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


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