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

Class IlrPackageDataProvider

  • java.lang.Object
    • ilog.rules.teamserver.web.tree.impl.ruleexplorer.IlrPackageDataProvider
  • All Implemented Interfaces:
    IlrTreeDataProvider, ilog.rules.teamserver.web.tree.util.IlrExtendedFeature


    public class IlrPackageDataProvider
    extends java.lang.Object
    implements IlrTreeDataProvider, ilog.rules.teamserver.web.tree.util.IlrExtendedFeature
    An implementation to provide the tree's model with a hierarchy of packages and its rule artifacts.

    The user data of a node is an instance of IlrElementSummary, which is either a project, a package, or a rule artifact. A subclass of this class must always use an instance of IlrElementSummary as the user object of a node. The following snippet shows you how to retrieve the user data of a node:

      IlrTreeNode node = ...
      IlrElementSummary summary = (IlrElementSummary) node.getClientData();
     
    See Also:
    IlrElementSummary
    • Field Detail

      • fSession

        protected ilog.rules.teamserver.model.IlrSessionEx fSession
    • Constructor Detail

      • IlrPackageDataProvider

        public IlrPackageDataProvider(IlrSession session,
                              IlrTreeController controller)
        Creates a tree data provider for a given session and a given tree controller.

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

      • isShowArtifacts

        public boolean isShowArtifacts()
        Gets the showArtifacts property.

        Returns:
        true to render the 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 artifacts in the tree component, and false otherwise.
      • isIncludeProjectDependencies

        public boolean isIncludeProjectDependencies()
        Returns the includeProjectDependencies property.
        Returns:
        If artifacts from dependent projects are included, true is returned. The default implementation returns false.
      • setIncludeProjectDependencies

        public void setIncludeProjectDependencies(boolean includeProjectDependencies)
        Sets the includeProjectDependencies property.
        Parameters:
        includeProjectDependencies - Set to true so artifacts from dependent projects are included.
      • setArtifactEClasses

        public void setArtifactEClasses(java.util.List<org.eclipse.emf.ecore.EClass> artifactEClasses)
        Sets a list of types to show in the tree component.

        This method is relevant only if the showArtifacts attribute is set to true.

        See Also:
        isShowArtifacts(), setShowArtifacts(boolean), getArtifactEClasses()
      • 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
      • 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.
      • 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.
      • removeNode

        public void removeNode(IlrTreeNode node)
        Removes a node and its children recursively in the tree's model.

        Parameters:
        node - The parent node of the children to remove.

© Copyright IBM Corp. 1987, 2017