ilog.rules.teamserver.web.tree.impl.ruleexplorer

Class IlrRuleExplorerDataProvider

  • java.lang.Object
    • ilog.rules.teamserver.web.tree.impl.ruleexplorer.IlrRuleExplorerDataProvider
  • All Implemented Interfaces:
    ilog.rules.teamserver.web.event.ContentChangeListener, ilog.rules.teamserver.web.event.SelectionChangeListener, ilog.rules.teamserver.web.event.SmartViewCreatedListener, IlrTreeDataProvider, ilog.rules.teamserver.web.tree.util.IlrExtendedFeature, java.util.EventListener


    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
    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:

    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();
        // ...
      }
     
    See Also:
    IlrNodeData, IlrSmartViewNodeData, IlrElementNodeData, IlrElementSummary
    • Constructor Detail

      • IlrRuleExplorerDataProvider

        public IlrRuleExplorerDataProvider(IlrRuleExplorerController treeController)
        Creates a tree data provider for a given tree controller.

        Parameters:
        treeController - The controller
        See Also:
        IlrTreeController
    • Method Detail

      • isShowArtifacts

        public boolean isShowArtifacts()
        Gets the showArtifacts property.

        Returns:
        true to render the rule artifacts in the tree component, and false otherwise. The default implementation returns false.
      • setShowArtifacts

        public void setShowArtifacts(boolean showArtifacts)
        Sets the showArtifacts property.

        Parameters:
        showArtifacts - true to render the rule artifacts in the tree component, and false otherwise.
      • includeMissingPkgInRootArtifactsCount

        public void includeMissingPkgInRootArtifactsCount(boolean includeMissingPkgInRootArtifactsCount)
        Sets the includeMissingPkgInRootArtifactsCount property

        Parameters:
        includeMissingPkgInRootArtifactsCount - to include in root package artifacts count in the tree component the artifacts whose package is deleted. Those elements are displayed as root elements since their package is deleted, however including those elements in the count calculation may use complex SQL queries which perform too slowly ==> set this argument to false to avoid performance issues.
      • isIncludeMissingPkgInRootArtifactsCount

        public boolean isIncludeMissingPkgInRootArtifactsCount()
      • reset

        public void reset()
        Description copied from interface: IlrTreeDataProvider
        Resets the tree's model.

        This method is intended to clear caches potentially used by the implementation.

        Specified by:
        reset in interface IlrTreeDataProvider
      • hasChildren

        public boolean hasChildren(IlrTreeNode node)
        Description copied from interface: IlrTreeDataProvider
        Indicates if a node has children.

        Specified by:
        hasChildren in interface IlrTreeDataProvider
        Parameters:
        node - The node.
        Returns:
        true if the given node has children, and false otherwise.
      • getChildren

        public java.util.List<IlrTreeNode> getChildren(IlrTreeNode parent,
                                              boolean refresh)
        Returns the children of a node.

        Parameters:
        parent - The parent node to get the children from.
        refresh - If true, the children are refreshed from the database.
        Returns:
        A list of IlrTreeNode.
        See Also:
        IlrTreeNode
      • getNodeById

        public IlrTreeNode getNodeById(java.lang.String id)
        Description copied from interface: IlrTreeDataProvider
        Returns a node with a given ID.

        It is up to the user to manage the mapping between a node and its ID.

        Specified by:
        getNodeById in interface IlrTreeDataProvider
        Parameters:
        id - The ID of the node.
        Returns:
        The node with a given ID.

© Copyright IBM Corp. 1987, 2017