|
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.IlrPackageDataProvider
public class IlrPackageDataProvider
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();
IlrElementSummary
Field Summary | |
---|---|
protected IlrTreeController |
fController
|
protected ilog.rules.teamserver.model.IlrSessionEx |
fSession
|
Constructor Summary | |
---|---|
IlrPackageDataProvider(IlrSession session,
IlrTreeController controller)
Creates a tree data provider for a given session and a given tree controller. |
Method Summary | |
---|---|
protected List<IlrElementSummary> |
computeBranchRootPackages(IlrElementSummary summary)
|
List<org.eclipse.emf.ecore.EClass> |
getArtifactEClasses()
Returns a list of types to show in the tree component. |
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 |
isIncludeProjectDependencies()
Returns the includeProjectDependencies property. |
boolean |
isShowArtifacts()
Gets the showArtifacts property. |
void |
removeNode(IlrTreeNode node)
Removes a node and its children recursively in the tree's model. |
void |
reset()
Resets the tree's model. |
void |
setArtifactEClasses(List<org.eclipse.emf.ecore.EClass> artifactEClasses)
Sets a list of types to show in the tree component. |
void |
setIncludeProjectDependencies(boolean includeProjectDependencies)
Sets the includeProjectDependencies property. |
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 |
Field Detail |
---|
protected IlrTreeController fController
protected ilog.rules.teamserver.model.IlrSessionEx fSession
Constructor Detail |
---|
public IlrPackageDataProvider(IlrSession session, IlrTreeController controller)
session
- The sessioncontroller
- The controllerIlrTreeController
Method Detail |
---|
public boolean isShowArtifacts()
showArtifacts
property.
true
to render the artifacts in the tree component, and false
otherwise. The default implementation returns false
.public void setShowArtifacts(boolean showArtifacts)
Sets the showArtifacts
property.
showArtifacts
- true
to render the artifacts in the tree component, and false
otherwise.public boolean isIncludeProjectDependencies()
includeProjectDependencies
property.
true
is returned.
The default implementation returns false
.public void setIncludeProjectDependencies(boolean includeProjectDependencies)
includeProjectDependencies
property.
includeProjectDependencies
- Set to true
so artifacts
from dependent projects are included.public List<org.eclipse.emf.ecore.EClass> getArtifactEClasses()
The default implementation returns a list containing the type for class 'Package Element
'. This method is relevant only if the showArtifacts
attribute is set to true
.
isShowArtifacts()
,
setShowArtifacts(boolean)
,
setArtifactEClasses(List)
public void setArtifactEClasses(List<org.eclipse.emf.ecore.EClass> artifactEClasses)
This method is relevant only if the showArtifacts
attribute is set to true
.
isShowArtifacts()
,
setShowArtifacts(boolean)
,
getArtifactEClasses()
public void reset()
IlrTreeDataProvider
This method is intended to clear caches potentially used by the implementation.
reset
in interface IlrTreeDataProvider
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
protected List<IlrElementSummary> computeBranchRootPackages(IlrElementSummary summary) throws IlrApplicationException
IlrApplicationException
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 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 getRoot()
IlrTreeDataProvider
This node is given to the IlrTreeDataProvider.getChildren(IlrTreeNode)
method to start to render the tree component.
getRoot
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 void removeNode(IlrTreeNode node)
node
- The parent node of the children to remove.
|
Decision Center API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |