|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hippoecm.hst.configuration.model.HstNodeImpl
public class HstNodeImpl
A HstNodeImpl
is a node that during initialization fetches everything it needs, after which, it detaches its backing
content provider. A HstNodeImpl
is suitable for (event) caching.
Constructor Summary | |
---|---|
HstNodeImpl(boolean inherited,
HstNodeImpl node,
HstNode parent)
This is a copy constructor. |
|
HstNodeImpl(HstNodeImpl node,
HstNode parent)
This is a copy constructor. |
|
HstNodeImpl(javax.jcr.Node jcrNode,
HstNode parent,
boolean loadChilds)
|
Method Summary | |
---|---|
void |
addNode(String name,
HstNode hstNode)
add a child hstNode with name . |
protected HstNode |
createNew(javax.jcr.Node jcrNode,
HstNode parent,
boolean loadChilds)
|
Map<String,HstNode> |
getChildren()
|
HstNode |
getNode(String relPath)
|
List<HstNode> |
getNodes()
|
List<HstNode> |
getNodes(String configNodeTypeName)
|
String |
getNodeTypeName()
|
HstNode |
getParent()
|
ValueProvider |
getValueProvider()
|
boolean |
isInherited()
|
boolean |
isStale()
|
protected void |
loadChilds(javax.jcr.Node jcrNode,
HstNode parent)
|
void |
markStale()
marks the HstNode as stale: The JCRValueProvider is out-of-date |
void |
removeNode(String name)
removes child node with name and does nothing if not present |
void |
setJCRValueProvider(JCRValueProvider valueProvider)
sets the new valueProvider |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HstNodeImpl(javax.jcr.Node jcrNode, HstNode parent, boolean loadChilds) throws HstNodeException
HstNodeException
public HstNodeImpl(HstNodeImpl node, HstNode parent)
node
is created
Note: This deep copy does NOT copy the parent field, as this constructor is used to copy descendant structures.
Also it does not make a kind of clone of the JCRValueProvider: that one is still shared.
It is something between a deep and shallow copy: The descendant are copied.
Inherited is marked as false
node
- public HstNodeImpl(boolean inherited, HstNodeImpl node, HstNode parent)
node
is created
Note: This deep copy does NOT copy the parent field, as this constructor is used to copy descendant structures.
Also it does not make a kind of clone of the JCRValueProvider: that one is still shared.
It is something between a deep and shallow copy: The descendant are copied
If inherited
equals true
, the HstNode's are marked as inherited.
node
- Method Detail |
---|
protected void loadChilds(javax.jcr.Node jcrNode, HstNode parent) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected HstNode createNew(javax.jcr.Node jcrNode, HstNode parent, boolean loadChilds) throws HstNodeException
HstNodeException
public ValueProvider getValueProvider()
getValueProvider
in interface HstNode
HstNode
public Map<String,HstNode> getChildren()
public HstNode getNode(String relPath) throws IllegalArgumentException
getNode
in interface HstNode
relPath
- a path that does not start with a slash, for example 'foo' or 'foo/bar'
relPath
or null
if it does not exist
IllegalArgumentException
- if relPath
is not a valid relPathpublic void addNode(String name, HstNode hstNode)
HstNode
name
. If there already exists an HstNode with name equal name
, the
existing HstNode is replaced. Since the HstNode's are used
for the HST config model that does not support same name sibblings this is not a problem
addNode
in interface HstNode
public void removeNode(String name)
HstNode
name
and does nothing if not present
removeNode
in interface HstNode
public List<HstNode> getNodes()
getNodes
in interface HstNode
HstNode
> of all the child nodespublic List<HstNode> getNodes(String configNodeTypeName)
getNodes
in interface HstNode
HstNode
> of all the child nodes with HstNode.getNodeTypeName()
equals to nodeTypeName
public String getNodeTypeName()
getNodeTypeName
in interface HstNode
public HstNode getParent()
getParent
in interface HstNode
HstNode
or null
when there is no parent.public void markStale()
HstNode
markStale
in interface HstNode
public boolean isStale()
isStale
in interface HstNode
true
when this HstNode is stalepublic boolean isInherited()
isInherited
in interface HstNode
true
when this HstNode is inheritedpublic void setJCRValueProvider(JCRValueProvider valueProvider)
HstNode
setJCRValueProvider
in interface HstNode
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |