public class IlrRuleExplorerDataProvider extends java.lang.Object implements IlrTreeDataProvider, ilog.rules.teamserver.web.tree.util.IlrExtendedFeature, ilog.rules.teamserver.web.event.SelectionChangeListener, ilog.rules.teamserver.web.event.ContentChangeListener, ilog.rules.teamserver.web.event.SmartViewCreatedListener
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();
// ...
}
| Constructor and Description |
|---|
IlrRuleExplorerDataProvider(IlrRuleExplorerController treeController)
Creates a tree data provider for a given tree controller.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<IlrTreeNode> |
getChildren(IlrTreeNode parent)
Returns the children of a node.
|
java.util.List<IlrTreeNode> |
getChildren(IlrTreeNode parent,
boolean refresh)
Returns the children of a node.
|
IlrTreeNode |
getNodeById(java.lang.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.
|
void |
includeMissingPkgInRootArtifactsCount(boolean includeMissingPkgInRootArtifactsCount)
Sets the
includeMissingPkgInRootArtifactsCount property |
boolean |
isIncludeMissingPkgInRootArtifactsCount() |
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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitselectionChangepublic IlrRuleExplorerDataProvider(IlrRuleExplorerController treeController)
treeController - The controllerIlrTreeControllerpublic 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 void includeMissingPkgInRootArtifactsCount(boolean includeMissingPkgInRootArtifactsCount)
includeMissingPkgInRootArtifactsCount property
includeMissingPkgInRootArtifactsCount - public boolean isIncludeMissingPkgInRootArtifactsCount()
public IlrTreeNode getRoot()
IlrTreeDataProvider
This node is given to the IlrTreeDataProvider.getChildren(IlrTreeNode) method to start to render the tree component.
getRoot in interface IlrTreeDataProviderpublic void reset()
IlrTreeDataProviderThis method is intended to clear caches potentially used by the implementation.
reset in interface IlrTreeDataProviderpublic boolean hasChildren(IlrTreeNode node)
IlrTreeDataProviderhasChildren in interface IlrTreeDataProvidernode - The node.true if the given node has children, and false otherwise.public java.util.List<IlrTreeNode> getChildren(IlrTreeNode parent)
IlrTreeDataProvidergetChildren in interface IlrTreeDataProviderparent - The parent node to get the children from.IlrTreeNode.public java.util.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.IlrTreeNodepublic IlrTreeNode getParent(IlrTreeNode child)
IlrTreeDataProvidergetParent in interface IlrTreeDataProviderchild - The node to get the parent from.null if it has none or if the parent cannot be computed.public IlrTreeNode getNodeById(java.lang.String id)
IlrTreeDataProviderIt is up to the user to manage the mapping between a node and its ID.
getNodeById in interface IlrTreeDataProviderid - The ID of the node.public void refresh(IlrTreeNode node) throws IlrApplicationException
IlrApplicationExceptionnode - The node where to start to refresh.© Copyright IBM Corp. 1987, 2017