|
Decision Center API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ilog.rules.teamserver.web.tree.impl.ruleexplorer.IlrRuleExplorerDataProvider
public class IlrRuleExplorerDataProvider
An implementation to provide the tree's model with the smart views as in Decision Center.
The user data of a node is an instance of the IlrNodeData
abstract class.
The following current implementations are supported:
IlrSmartViewNodeData
represents a node that handles smart views.IlrFeatureNodeData
represents a node that handles a property of the artifact managed by the smart view.IlrElementNodeData
represents a node that handles an artifact.The following snippet shows you how to retrieve the user data of a node:
IlrTreeNode node = ... IlrNodeData nodeData = (IlrNodeData) node.getClientData(); if (nodeData instanceof IlrSmartViewNodeData) { IlrSmartView smartView = ((IlrSmartViewNodeData) nodeData).getSmartView(); // ... } else if (clientData instanceof IlrFeatureNodeData) { EStructuralFeature feature = ((IlrFeatureNodeData) nodeData).getFeature(); // ... Object value = ((IlrFeatureNodeData) nodeData).getValue(); } else if (clientData instanceof IlrElementNodeData) { IlrElementSummary summary = ((IlrElementNodeData) nodeData).getElement(); // ... }
IlrNodeData
,
IlrSmartViewNodeData
,
IlrElementNodeData
,
IlrElementSummary
Constructor Summary | |
---|---|
IlrRuleExplorerDataProvider(IlrRuleExplorerController treeController)
Creates a tree data provider for a given tree controller. |
Method Summary | |
---|---|
List<IlrTreeNode> |
getChildren(IlrTreeNode parent)
Returns the children of a node. |
List<IlrTreeNode> |
getChildren(IlrTreeNode parent,
boolean refresh)
Returns the children of a node. |
IlrTreeNode |
getNodeById(String id)
Returns a node with a given ID. |
IlrTreeNode |
getParent(IlrTreeNode child)
Returns the parent of a node. |
IlrTreeNode |
getRoot()
Returns the root node of the tree's model. |
boolean |
hasChildren(IlrTreeNode node)
Indicates if a node has children. |
boolean |
isShowArtifacts()
Gets the showArtifacts property. |
void |
refresh(IlrTreeNode node)
Refreshes the children of a given node recursively. |
void |
reset()
Resets the tree's model. |
void |
setShowArtifacts(boolean showArtifacts)
Sets the showArtifacts property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ilog.rules.teamserver.web.tree.util.IlrExtendedFeature |
---|
initState, removeChildren |
Methods inherited from interface ilog.rules.teamserver.web.event.SelectionChangeListener |
---|
selectionChange |
Methods inherited from interface ilog.rules.teamserver.web.event.ContentChangeListener |
---|
contentChange |
Methods inherited from interface ilog.rules.teamserver.web.event.SmartViewCreatedListener |
---|
smartViewCreated |
Constructor Detail |
---|
public IlrRuleExplorerDataProvider(IlrRuleExplorerController treeController)
treeController
- The controllerIlrTreeController
Method Detail |
---|
public boolean isShowArtifacts()
showArtifacts
property.
true
to render the rule artifacts in the tree component, and false
otherwise. The default implementation returns false
.public void setShowArtifacts(boolean showArtifacts)
showArtifacts
property.
showArtifacts
- true
to render the rule artifacts in the tree component, and false
otherwise.public IlrTreeNode getRoot()
IlrTreeDataProvider
This node is given to the IlrTreeDataProvider.getChildren(IlrTreeNode)
method to start to render the tree component.
getRoot
in interface IlrTreeDataProvider
public void reset()
IlrTreeDataProvider
This method is intended to clear caches potentially used by the implementation.
reset
in interface IlrTreeDataProvider
public boolean hasChildren(IlrTreeNode node)
IlrTreeDataProvider
hasChildren
in interface IlrTreeDataProvider
node
- The node.
true
if the given node has children, and false
otherwise.public List<IlrTreeNode> getChildren(IlrTreeNode parent)
IlrTreeDataProvider
getChildren
in interface IlrTreeDataProvider
parent
- The parent node to get the children from.
IlrTreeNode
.public List<IlrTreeNode> getChildren(IlrTreeNode parent, boolean refresh)
parent
- The parent node to get the children from.refresh
- If true
, the children are refreshed from the database.
IlrTreeNode
.IlrTreeNode
public IlrTreeNode getParent(IlrTreeNode child)
IlrTreeDataProvider
getParent
in interface IlrTreeDataProvider
child
- The node to get the parent from.
null
if it has none or if the parent cannot be computed.public IlrTreeNode getNodeById(String id)
IlrTreeDataProvider
It is up to the user to manage the mapping between a node and its ID.
getNodeById
in interface IlrTreeDataProvider
id
- The ID of the node.
public void refresh(IlrTreeNode node) throws IlrApplicationException
IlrApplicationException
node
- The node where to start to refresh.
|
Decision Center API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |