@AccessLevel(value=EXTERNAL) public abstract class ContextNode extends java.lang.Object implements IContextNode, java.lang.Comparable<IContextNode>, curam.contextviewer.impl.IContextLoaderProvider
Constructor and Description |
---|
ContextNode()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(IContextNode citizenContextNode)
Adds a CitizenContextNode implementation as a child.
|
void |
addDefaultChild(IContextNode defaultNode,
java.lang.String childLabel)
Adds a default child using the childLabel param as the label for the child
node.
|
int |
compareTo(IContextNode o) |
java.util.Set<IContextNode> |
getChildren()
Gets the children of the current node.
|
java.lang.String |
getContextID()
Returns the context id to be used when identifying the context item on the
Citizen Context tree.
|
java.util.HashMap<java.lang.String,java.lang.String> |
getExtraData()
Gets the extra data that can be used by the context tree.
|
IContextNode |
getInstance() |
java.lang.String |
getLabel()
Returns the localized label to be used when displaying this node on the
Citizen Context tree.
|
java.lang.String |
getNodeType()
Returns the node type ID for this node.
|
int |
getUnsecureCount()
Returns the number of instances of this node that are unavailable due to
security checks.
|
abstract IContextNode |
load(curam.contextviewer.facade.struct.Context_ID contextID)
Loads this node with the Data required to display the Citizen Context tree.
|
void |
setContextID(java.lang.String contextID)
Sets the context id for the node.
|
void |
setExtraData(java.lang.String attributeName,
java.lang.String attributeValue)
Sets the extra data that can be used by the context tree.
|
void |
setLabel(java.lang.String label)
Sets the label for the node.
|
void |
setLabelAllNotShown(java.lang.String label,
int numberOfChildrenNotShown)
Sets the label for the node when all children are not shown.
|
void |
setLabelIncludingChildren(java.lang.String label,
int numberOfChildren)
Sets the label for the node including the number of children for the node.
|
void |
setLabelIncludingNotShown(java.lang.String label,
int numberOfChildren,
int numberOfChildrenNotShown)
Sets the label for the node including the number of children for the node
and the number of children not shown.
|
void |
setNodeType(java.lang.String citizenContextNodeTypeID)
Sets the node type id to be used for this node.
|
void |
setUnsecureCount(int unsecureCount)
Sets the number of nodes that are unavailable due to security checks.
|
public abstract IContextNode load(curam.contextviewer.facade.struct.Context_ID contextID) throws curam.util.exception.AppException, curam.util.exception.InformationalException
load
in interface IContextNode
contextID
- - the concern role id of the citizen.curam.util.exception.AppException
- Generic Exception Signature.curam.util.exception.InformationalException
- Generic Exception Signature.public void addChild(IContextNode citizenContextNode) throws curam.util.exception.AppException, curam.util.exception.InformationalException
addChild
in interface IContextNode
citizenContextNode
- - the child node to be added.curam.util.exception.AppException
- Generic Exception Signature.curam.util.exception.InformationalException
- Generic Exception Signature.public void addDefaultChild(IContextNode defaultNode, java.lang.String childLabel) throws curam.util.exception.AppException, curam.util.exception.InformationalException
addDefaultChild
in interface IContextNode
defaultNode
- The default childchildLabel
- The label to use for the child nodecuram.util.exception.AppException
- Generic Exception Signature.curam.util.exception.InformationalException
- Generic Exception Signature.public java.util.Set<IContextNode> getChildren() throws curam.util.exception.AppException, curam.util.exception.InformationalException
getChildren
in interface IContextNode
curam.util.exception.AppException
- Generic Exception Signature.curam.util.exception.InformationalException
- Generic Exception Signature.public void setContextID(java.lang.String contextID) throws curam.util.exception.AppException, curam.util.exception.InformationalException
setContextID
in interface IContextNode
contextID
- This is passed as an attribute on the context tree.curam.util.exception.AppException
- Generic Exception Signature.curam.util.exception.InformationalException
- Generic Exception Signature.public java.lang.String getContextID() throws curam.util.exception.AppException, curam.util.exception.InformationalException
getContextID
in interface IContextNode
curam.util.exception.AppException
- Generic Exception Signature.curam.util.exception.InformationalException
- Generic Exception Signature.public void setLabel(java.lang.String label) throws curam.util.exception.AppException, curam.util.exception.InformationalException
setLabel
in interface IContextNode
label
- This is displayed on the Citizen Context Viewer tree.curam.util.exception.AppException
- Generic Exception Signature.curam.util.exception.InformationalException
- Generic Exception Signature.public void setLabelIncludingChildren(java.lang.String label, int numberOfChildren) throws curam.util.exception.AppException, curam.util.exception.InformationalException
setLabelIncludingChildren
in interface IContextNode
label
- This is displayed on the Citizen Context Viewer tree.numberOfChildren
- The number of children to be displayed in the labelcuram.util.exception.AppException
- Generic Exception Signature.curam.util.exception.InformationalException
- Generic Exception Signature.public void setLabelAllNotShown(java.lang.String label, int numberOfChildrenNotShown) throws curam.util.exception.AppException, curam.util.exception.InformationalException
setLabelAllNotShown
in interface IContextNode
label
- This is displayed on the Citizen Context Viewer tree.numberOfChildrenNotShown
- The number of children not displayed in the labelcuram.util.exception.AppException
- Generic Exception Signature.curam.util.exception.InformationalException
- Generic Exception Signature.public void setLabelIncludingNotShown(java.lang.String label, int numberOfChildren, int numberOfChildrenNotShown) throws curam.util.exception.AppException, curam.util.exception.InformationalException
setLabelIncludingNotShown
in interface IContextNode
label
- This is displayed on the Citizen Context Viewer tree.numberOfChildren
- The number of children to be displayed in the labelnumberOfChildrenNotShown
- The number of children not displayed in the labelcuram.util.exception.AppException
- Generic Exception Signature.curam.util.exception.InformationalException
- Generic Exception Signature.public java.lang.String getLabel() throws curam.util.exception.AppException, curam.util.exception.InformationalException
getLabel
in interface IContextNode
curam.util.exception.AppException
- Generic Exception Signature.curam.util.exception.InformationalException
- Generic Exception Signature.public void setNodeType(java.lang.String citizenContextNodeTypeID) throws curam.util.exception.AppException, curam.util.exception.InformationalException
setNodeType
in interface IContextNode
citizenContextNodeTypeID
- - The ID of the node type to be used for this node.curam.util.exception.AppException
- Generic Exception Signature.curam.util.exception.InformationalException
- Generic Exception Signature.public java.lang.String getNodeType() throws curam.util.exception.AppException, curam.util.exception.InformationalException
getNodeType
in interface IContextNode
curam.util.exception.AppException
- Generic Exception Signature.curam.util.exception.InformationalException
- Generic Exception Signature.public int compareTo(IContextNode o)
compareTo
in interface java.lang.Comparable<IContextNode>
public void setUnsecureCount(int unsecureCount) throws curam.util.exception.AppException, curam.util.exception.InformationalException
setUnsecureCount
in interface IContextNode
unsecureCount
- number of nodes that are unavailable due to security checks.curam.util.exception.AppException
- Generic Exception Signature.curam.util.exception.InformationalException
- Generic Exception Signature.public int getUnsecureCount() throws curam.util.exception.AppException, curam.util.exception.InformationalException
getUnsecureCount
in interface IContextNode
curam.util.exception.AppException
- Generic Exception Signature.curam.util.exception.InformationalException
- Generic Exception Signature.public void setExtraData(java.lang.String attributeName, java.lang.String attributeValue) throws curam.util.exception.AppException, curam.util.exception.InformationalException
setExtraData
in interface IContextNode
attributeName
- Name of the extra data attributesattributeValue
- Value of the extra data attributescuram.util.exception.AppException
- Generic Exception Signature.curam.util.exception.InformationalException
- Generic Exception Signature.public java.util.HashMap<java.lang.String,java.lang.String> getExtraData() throws curam.util.exception.AppException, curam.util.exception.InformationalException
getExtraData
in interface IContextNode
curam.util.exception.AppException
- Generic Exception Signature.curam.util.exception.InformationalException
- Generic Exception Signature.public IContextNode getInstance()
getInstance
in interface curam.contextviewer.impl.IContextLoaderProvider