|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.policy.bean.basic.BasicPart
org.openpermis.policy.bean.basic.BasicPartBean
org.openpermis.policy.bean.basic.BasicAbstractCollection<P>
P
- generic type.public abstract class BasicAbstractCollection<P extends PartBean>
Abstract basic collection.
Constructor Summary | |
---|---|
protected |
BasicAbstractCollection(SerialNumber serialNumber)
|
protected |
BasicAbstractCollection(SerialNumber serialNumber,
Collection<P> collection)
|
Method Summary | |
---|---|
void |
accept(List<PartBean> parents,
MultiPartBeanVisitor visitor)
Allows traversing the model according to the visitor pattern. |
protected void |
appendPartDetails(StringBuilder sb)
Appends the details of this extended part for the string representation of this part. |
protected boolean |
comparablePart(BasicPart part)
Check if the part specified is comparable to this part. |
protected boolean |
equalPart(BasicPart part)
Compares another part to this part. |
PartBean |
findBySerialNumber(SerialNumber partSerialNumber)
Returns the part bean corresponding to the specified serial number. |
protected Collection<P> |
getCollection()
Returns the internal collection. |
protected abstract boolean |
isCollectionType(BasicPart part)
Returns true if collection type of part is an instance of this collection. |
Iterator<P> |
iterator()
Returns an iterator for this collection. |
protected int |
partHashCode()
Returns the hash code of the extended part state. |
List<P> |
toList()
Returns a modifiable list of part beans. |
Methods inherited from class org.openpermis.policy.bean.basic.BasicPartBean |
---|
accept, addPropertyChangeListener, equalSerialNumber, firePropertyChange, getPartBeanType, getSerialNumber, getSerialNumberString, instanceOf, notifyIdentityChange, notifyNameChange, removePropertyChangeListener, toShortString |
Methods inherited from class org.openpermis.policy.bean.basic.BasicPart |
---|
appendDetails, areIdentitiesUnique, areNamesUnique, checkLocalConsistency, checkLocalPartConsistency, equals, getIdentity, getName, getSimpleClassName, hashCode, hasPartIdentity, hasPartName, isIdentityValid, isNameValid, reportProblem, setIdentity, setName, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.openpermis.policy.bean.BeanCollection |
---|
create |
Methods inherited from interface org.openpermis.policy.bean.PartBean |
---|
accept, addPropertyChangeListener, checkLocalPartConsistency, equalSerialNumber, getPartBeanType, getSerialNumber, instanceOf, removePropertyChangeListener, toShortString |
Methods inherited from interface org.openpermis.policy.Part |
---|
equals, hashCode, toString |
Constructor Detail |
---|
protected BasicAbstractCollection(SerialNumber serialNumber)
protected BasicAbstractCollection(SerialNumber serialNumber, Collection<P> collection)
Method Detail |
---|
protected Collection<P> getCollection()
public Iterator<P> iterator()
iterator
in interface Iterable<P extends PartBean>
iterator
in interface BeanCollection<P extends PartBean>
public List<P> toList()
BeanCollection
toList
in interface BeanCollection<P extends PartBean>
protected abstract boolean isCollectionType(BasicPart part)
part
- a BasicPart
.
public void accept(List<PartBean> parents, MultiPartBeanVisitor visitor)
PartBean
Each part bean must call method visitor.visit(this)
accept
in interface PartBean
parents
- the path of parents of this part.visitor
- a PartBeanVisitor
.protected boolean comparablePart(BasicPart part)
BasicPart
comparablePart
in class BasicPart
part
- the part to check.BasicPart
true
if the part supplied is comparable to this part.protected boolean equalPart(BasicPart part)
BasicPart
equalPart
in class BasicPart
part
- the part to compare to this part.BasicUtilities.equalObjects(Object, Object)
,
BasicPart
true
if the part supplied is considered equivalent to this part.protected int partHashCode()
BasicPart
partHashCode
in class BasicPart
BasicPart
,
BasicUtilities.multiHashCode(int...)
protected void appendPartDetails(StringBuilder sb)
BasicPart
appendPartDetails
in class BasicPart
sb
- the string builder to add the details to.BasicPart
,
BasicPart.appendDetails(StringBuilder, String, Object)
public PartBean findBySerialNumber(SerialNumber partSerialNumber)
BasicPartBean
If the part bean contains other part beans, it searches its child beans recursively.
The basic implementation returns this bean if its serial number matches
the one passed in or null
if not. Subclasses that contain other
parts must traverse their children.
findBySerialNumber
in interface PartBean
findBySerialNumber
in class BasicPartBean
partSerialNumber
- the SerialNumber
of the part bean to return.
PartBean
or null
if no
matching part bean is found.
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:16:59
Copyright (c) 2002-2007 Ergon Informatik AG