Package com.sun.identity.sm.flatfile
Class SMSFlatFileTreeNode
- java.lang.Object
 - 
- com.sun.identity.sm.flatfile.SMSFlatFileTreeNode
 
 
- 
public class SMSFlatFileTreeNode extends Object
This is a node in the directory tree that theSMSEnhancedFlatFileObjectclass holds to track the directory structure of the data. 
- 
- 
Constructor Summary
Constructors Constructor Description SMSFlatFileTreeNode(String dn)Creates a new instance of SMSFlatFileTreeNode 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddChild(SMSFlatFileTreeNode child)Adds child.static SMSFlatFileTreeNodecreateTree(String xml, Debug debug)Creates directory tree from a XML.booleanequals(Object o)Returnstrueif this node is identical to other.StringgetAttributeFilename(String baseDir)Returns the attribute file name of this node.StringgetAttributeFilename(String dn, String baseDir)Returns the attribute file name of a node.SMSFlatFileTreeNodegetChild(String dn)Returns the node of a given distinguished name.StringgetDN()Returns distinguished name.StringgetName()Returns name.SMSFlatFileTreeNodegetParentNode()Returns parent node.inthashCode()Returns hash code.booleanisExists(String baseDir, String dn)Returnstrueis a node of a givendnexists.booleanremoveChild(SMSFlatFileTreeNode node, String baseDir)Removes a child node from the tree.SetsearchChildren(NodeNameFilter filter, boolean recursive)Searches for nodes that matches with a given filter.StringtoXML()Returns XML String of this tree. 
 - 
 
- 
- 
Constructor Detail
- 
SMSFlatFileTreeNode
public SMSFlatFileTreeNode(String dn)
Creates a new instance of SMSFlatFileTreeNode 
 - 
 
- 
Method Detail
- 
getParentNode
public SMSFlatFileTreeNode getParentNode()
Returns parent node.- Returns:
 - parent node.
 
 
- 
addChild
public boolean addChild(SMSFlatFileTreeNode child)
Adds child.- Parameters:
 child- Child node.- Returns:
 trueif child is added to the tree.- Throws:
 SMSException- if the dn of the child is not prefix with this node.
 
- 
removeChild
public boolean removeChild(SMSFlatFileTreeNode node, String baseDir)
Removes a child node from the tree.- Parameters:
 node- Node of to be removed.baseDir- Base directory where data files are stored.
 
- 
getAttributeFilename
public String getAttributeFilename(String dn, String baseDir)
Returns the attribute file name of a node.- Parameters:
 dn- Distinguished Name of the node.baseDir- Base Directory.- Returns:
 - the attribute file name of a node.
 
 
- 
getAttributeFilename
public String getAttributeFilename(String baseDir)
Returns the attribute file name of this node.- Parameters:
 baseDir- Base Directory.- Returns:
 - the attribute file name of a node.
 
 
- 
isExists
public boolean isExists(String baseDir, String dn)
Returnstrueis a node of a givendnexists.- Parameters:
 baseDir- Base Directory.dn- Distinguished name of the node.- Returns:
 trueis a node of a givendnexists.
 
- 
getChild
public SMSFlatFileTreeNode getChild(String dn)
Returns the node of a given distinguished name.- Parameters:
 dn- Distinguished Name of the node.- Returns:
 - the node of a given distinguished name.
 
 
- 
searchChildren
public Set searchChildren(NodeNameFilter filter, boolean recursive)
Searches for nodes that matches with a given filter.- Parameters:
 filter- Search filter.recursive-trueto perform search recursively.- Returns:
 - a set of node of class, 
SMSFlatFileTreeNode. 
 
- 
getDN
public String getDN()
Returns distinguished name.- Returns:
 - distinguished name.
 
 
- 
getName
public String getName()
Returns name.- Returns:
 - name.
 
 
- 
equals
public boolean equals(Object o)
Returnstrueif this node is identical to other. 
- 
hashCode
public int hashCode()
Returns hash code. 
- 
toXML
public String toXML()
Returns XML String of this tree.- Returns:
 - XML String of this tree.
 
 
- 
createTree
public static SMSFlatFileTreeNode createTree(String xml, Debug debug) throws Exception
Creates directory tree from a XML.- Parameters:
 xml- XML string.debug- Debugger.- Returns:
 - the root node of the tree.
 - Throws:
 Exception
 
 - 
 
 -