|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.domain.SimpleDomainObjectTraversalAdapter
This is a general purpose traversal adaptor that allows/denies processing of a property based on the path to the property, and its presence in an inclusion/exclusion set. Instances of this class can be configured using the DomainObjectTraversalInitializer
See com.arsdigita.cms.installer.DomainObjectTraversalInitializer
.
Field Summary | |
static int |
RULE_EXCLUDE
Rule that indicates the set of properties should be treated as an exclusion list. |
static int |
RULE_INCLUDE
Rule that indicates the set of properties should be treated as an inclusion list. |
Constructor Summary | |
SimpleDomainObjectTraversalAdapter()
Creates a new traversal adapter, with no parent delegate. |
|
SimpleDomainObjectTraversalAdapter(SimpleDomainObjectTraversalAdapter parent)
Creates a new traversal adapter, extending the rules defined by a parent. |
Method Summary | |
void |
addAssociationProperty(String prop)
Add a property to the association property set. |
void |
addAttributeProperty(String prop)
Add a property to the attribute property set. |
boolean |
processProperty(DomainObject obj,
String path,
Property prop,
String context)
Determines whether or not to allow processing of a property, based on the property set and the processing rule |
void |
setAssociationRule(int rule)
Set the rule for processing associations |
void |
setAttributeRule(int rule)
Set the rule for processing attributes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int RULE_INCLUDE
public static final int RULE_EXCLUDE
Constructor Detail |
public SimpleDomainObjectTraversalAdapter()
public SimpleDomainObjectTraversalAdapter(SimpleDomainObjectTraversalAdapter parent)
parent
- the parent adapter to delegate toMethod Detail |
public void setAttributeRule(int rule)
rule
- the new processing rulepublic void setAssociationRule(int rule)
rule
- the new processing rulepublic void addAttributeProperty(String prop)
public void addAssociationProperty(String prop)
public boolean processProperty(DomainObject obj, String path, Property prop, String context)
processProperty
in interface DomainObjectTraversalAdapter
obj
- the domain object currently being processedpath
- the path to the current domain object from
the root object being traversedprop
- the property about to be processedcontext
- the context in which the object is traversed
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |