Class BasicNode
- java.lang.Object
-
- javax.swing.tree.DefaultMutableTreeNode
-
- org.opends.guitools.controlpanel.ui.nodes.BasicNode
-
- All Implemented Interfaces:
Serializable,Cloneable,MutableTreeNode,TreeNode
- Direct Known Subclasses:
SuffixNode
public class BasicNode extends DefaultMutableTreeNode
The basic node used to render entries in the 'Manage Entries' tree.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDisplayName()Returns the label that will be used to display the entry.DNgetDN()Returns the DN of the local entry.BasicNodeErrorgetError()Returns the error that occurred when updating the node.intgetFontStyle()Returns the font style to be used to render this node.IcongetIcon()Returns the icon associated with this node.intgetNumSubOrdinates()Returns the number of subordinates of the entry.String[]getObjectClassValues()Returns the object class values associated with the entry.StringgetRDN()Returns the RDN value of the local entry.StringgetRDNWithAttributeName()Returns the RDN (with the attribute name) of the local entry.String[]getReferral()Returns the referrals of the entry.StringgetRemoteRDN()Returns the RDN value of the remote entry.StringgetRemoteRDNWithAttributeName()Returns the RDN value of the remote entry (with the name of the attribute).LDAPURLgetRemoteUrl()Returns the URL of the remote entry (if the node does not represent a referral it will benull).booleanhasSubOrdinates()Returns whether the entry has subordinates or not.booleanisLeaf()Returnstrueif the node is a leaf andfalseotherwise.booleanisObsolete()Returns whether the node is obsolete (and must be refreshed) or not.booleanisRefreshNeededOnExpansion()Returnstrueif the node must be refreshed when it is expanded andfalseotherwise.booleanisSizeLimitReached()Returnstrueif the size limit was reached updating this node (and searching its children) andfalseotherwise.voidsetDisplayName(String name)Sets the label that will be used to display the entry.voidsetError(BasicNodeError error)Sets the error that occurred when updating the node.voidsetFontStyle(int style)Sets the font style to be used to render this node.voidsetHasSubOrdinates(boolean hasSubOrdinates)Sets the whether the entry has subordinates or not.voidsetIcon(Icon icon)Sets the icon associated with this node.voidsetLeaf(boolean isLeaf)Sets whether the node is a leaf or not.voidsetNumSubOrdinates(int number)Sets the number of subordinates of the entry.voidsetObjectClassValues(String[] objectClassValues)Sets the object class values associated with the entry.voidsetObsolete(boolean obsolete)Sets whether this is node is obsolete (and must be refreshed) or not.voidsetReferral(String[] referral)Sets the referrals of the entry.voidsetRefreshNeededOnExpansion(boolean refreshNeededOnExpansion)Sets whether the node must be refreshed when it is expanded or not.voidsetRemoteUrl(String url)Sets the remote URL of the node.voidsetRemoteUrl(LDAPURL url)Sets the remote URL of the node.voidsetSizeLimitReached(boolean sizeLimitReached)Sets whether the size limit was reached updating this node (and searching its children).StringtoString()-
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
-
-
-
-
Constructor Detail
-
BasicNode
public BasicNode(DN dn)
Constructor.- Parameters:
dn- the DN of the entry.
-
-
Method Detail
-
getDN
public DN getDN()
Returns the DN of the local entry.- Returns:
- the DN of the local entry.
-
getRDN
public String getRDN()
Returns the RDN value of the local entry.- Returns:
- the RDN value of the local entry.
-
getRDNWithAttributeName
public String getRDNWithAttributeName()
Returns the RDN (with the attribute name) of the local entry.- Returns:
- the RDN (with the attribute name) of the local entry.
-
getRemoteUrl
public LDAPURL getRemoteUrl()
Returns the URL of the remote entry (if the node does not represent a referral it will benull).- Returns:
- the URL of the remote entry (if the node does not represent a
referral it will be
null).
-
setRemoteUrl
public void setRemoteUrl(LDAPURL url)
Sets the remote URL of the node.- Parameters:
url- the remote URL of the node.
-
setRemoteUrl
public void setRemoteUrl(String url)
Sets the remote URL of the node.- Parameters:
url- the remote URL of the node.
-
getRemoteRDN
public String getRemoteRDN()
Returns the RDN value of the remote entry. If the node does not represent a referral it will returnnull.- Returns:
- the RDN value of the remote entry.
-
getRemoteRDNWithAttributeName
public String getRemoteRDNWithAttributeName()
Returns the RDN value of the remote entry (with the name of the attribute). If the node does not represent a referral it will returnnull.- Returns:
- the RDN value of the remote entry (with the name of the attribute).
-
setLeaf
public void setLeaf(boolean isLeaf)
Sets whether the node is a leaf or not.- Parameters:
isLeaf- whether the node is a leaf or not.
-
isLeaf
public boolean isLeaf()
Returnstrueif the node is a leaf andfalseotherwise.- Specified by:
isLeafin interfaceTreeNode- Overrides:
isLeafin classDefaultMutableTreeNode- Returns:
trueif the node is a leaf andfalseotherwise.
-
isRefreshNeededOnExpansion
public boolean isRefreshNeededOnExpansion()
Returnstrueif the node must be refreshed when it is expanded andfalseotherwise.- Returns:
trueif the node must be refreshed when it is expanded andfalseotherwise.
-
setRefreshNeededOnExpansion
public void setRefreshNeededOnExpansion(boolean refreshNeededOnExpansion)
Sets whether the node must be refreshed when it is expanded or not.- Parameters:
refreshNeededOnExpansion- whether the node must be refreshed when it is expanded or not.
-
isObsolete
public boolean isObsolete()
Returns whether the node is obsolete (and must be refreshed) or not.- Returns:
trueif the node is obsolete andfalseotherwise.
-
setObsolete
public void setObsolete(boolean obsolete)
Sets whether this is node is obsolete (and must be refreshed) or not.- Parameters:
obsolete- whether this is node is obsolete (and must be refreshed) or not.
-
getError
public BasicNodeError getError()
Returns the error that occurred when updating the node. Returnsnullif no error occurred.- Returns:
- the error that occurred when updating the node. Returns
nullif no error occurred.
-
setError
public void setError(BasicNodeError error)
Sets the error that occurred when updating the node.- Parameters:
error- the error.
-
getNumSubOrdinates
public int getNumSubOrdinates()
Returns the number of subordinates of the entry.- Returns:
- the number of subordinates of the entry.
-
setNumSubOrdinates
public void setNumSubOrdinates(int number)
Sets the number of subordinates of the entry.- Parameters:
number- the number of subordinates of the entry.
-
hasSubOrdinates
public boolean hasSubOrdinates()
Returns whether the entry has subordinates or not.- Returns:
trueif the entry has subordinates andfalseotherwise.
-
setHasSubOrdinates
public void setHasSubOrdinates(boolean hasSubOrdinates)
Sets the whether the entry has subordinates or not.- Parameters:
hasSubOrdinates- whether the entry has subordinates or not.
-
getReferral
public String[] getReferral()
Returns the referrals of the entry. Returnsnullif this node is not a referral.- Returns:
- the referrals of the entry. Returns
nullif this node is not a referral.
-
setReferral
public void setReferral(String[] referral)
Sets the referrals of the entry.- Parameters:
referral- the referrals of the entry.
-
toString
public String toString()
- Overrides:
toStringin classDefaultMutableTreeNode
-
getDisplayName
public String getDisplayName()
Returns the label that will be used to display the entry.- Returns:
- the label that will be used to display the entry.
-
setDisplayName
public void setDisplayName(String name)
Sets the label that will be used to display the entry.- Parameters:
name- the label that will be used to display the entry.
-
getIcon
public Icon getIcon()
Returns the icon associated with this node.- Returns:
- the icon associated with this node.
-
setIcon
public void setIcon(Icon icon)
Sets the icon associated with this node.- Parameters:
icon- the icon associated with this node.
-
getFontStyle
public int getFontStyle()
Returns the font style to be used to render this node.- Returns:
- the font style to be used to render this node.
-
setFontStyle
public void setFontStyle(int style)
Sets the font style to be used to render this node.- Parameters:
style- the font style to be used to render this node.
-
getObjectClassValues
public String[] getObjectClassValues()
Returns the object class values associated with the entry.- Returns:
- the object class values associated with the entry.
-
setObjectClassValues
public void setObjectClassValues(String[] objectClassValues)
Sets the object class values associated with the entry.- Parameters:
objectClassValues- the object class values associated with the entry.
-
isSizeLimitReached
public boolean isSizeLimitReached()
Returnstrueif the size limit was reached updating this node (and searching its children) andfalseotherwise.- Returns:
trueif the size limit was reached updating this node (and searching its children) andfalseotherwise.
-
setSizeLimitReached
public void setSizeLimitReached(boolean sizeLimitReached)
Sets whether the size limit was reached updating this node (and searching its children).- Parameters:
sizeLimitReached- whether the size limit was reached updating this node (and searching its children).
-
-