public class NuxeoArtifactContentProvider extends Object implements ContentProvider
Constructor and Description |
---|
NuxeoArtifactContentProvider(DistributionSnapshot ds) |
Modifier and Type | Method and Description |
---|---|
Object[] |
getChildren(Object ob)
Gets the children for the given object.
|
Object[] |
getElements(Object input)
Gets the top level items.
|
String[] |
getFacets(Object object)
Gets the object facets.
|
String |
getLabel(Object obj)
Gets the label to be used when displaying the given object.
|
String |
getName(Object obj)
Gets the name of the object.
|
boolean |
isContainer(Object ob)
Whether the given object may have children (e.g it's a container).
|
public NuxeoArtifactContentProvider(DistributionSnapshot ds)
public Object[] getElements(Object input)
ContentProvider
The items will be shown on the top level of the tree. These items are computed from the tree input that will be considered the tree root. The tree root is not visible.
getElements
in interface ContentProvider
input
- the tree view inputpublic Object[] getChildren(Object ob)
ContentProvider
This method is used to populate the nested branches of the tree.
getChildren
in interface ContentProvider
ob
- the objectpublic String[] getFacets(Object object)
ContentProvider
Facets are arbitrary strings that should describe object capabilities and can be used to decorate later the item.
In a web environment they may be translated to CSS classes.
getFacets
in interface ContentProvider
public String getLabel(Object obj)
ContentProvider
getLabel
in interface ContentProvider
obj
- the objectpublic String getName(Object obj)
ContentProvider
The name must be an unique identifier relative to the parent item. It will be used as node names in the tree so that they will construct the item path.
getName
in interface ContentProvider
obj
- the objectpublic boolean isContainer(Object ob)
ContentProvider
isContainer
in interface ContentProvider
ob
- the object to testCopyright © 2013 Nuxeo SA. All Rights Reserved.