public class ElementList extends Resource implements IElementList
Copyright (C) Micro Focus
ID_PREFIX| Constructor and Description |
|---|
ElementList(ElementListStructure pElementListStructure,
ActionDescriptor pAction)
Creates a new list with no parent and a default generated ID.
|
ElementList(ElementListStructure pElementListStructure,
ActionDescriptor pAction,
IResource pParent)
Creates a new list with a default generated ID.
|
ElementList(ElementListStructure pElemetListStructure,
ActionDescriptor pAction,
java.lang.String pElementListID)
Creates a new list with no parent.
|
ElementList(ElementListStructure pElemetListStructure,
ActionDescriptor pAction,
java.lang.String pElementListID,
IResource pParent)
creates a new list.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addElementListEntries(java.util.List<IElementListEntry> pElementListEntries)
Add the given list of element list entries to this element list's entry
list.
|
void |
addElementListEntry(IElementListEntry pElementListEntry)
Add the given element list entry to this element list's entry list.
|
void |
addElementListEntry(IElementListEntry pElementListEntry,
int index)
Add the given element list entry to this element list's entry list at the
given position.
|
boolean |
addResourceChild(IResource pRes)
Adds a resource to the list of children resources.
|
void |
delete()
Removes this resource and all its children resources from cache.
|
void |
deleteList()
Remove the li_....xml-file belonging to this element list from the
workspace.
|
static IElementList |
emptyElementList(ActionDescriptor pAct)
Convenience method to create a new list with no parent, a generated
default ID an a default
ElementListStructure without any columns |
ActionDescriptor |
getAction()
Gets the action descriptor which created this element list.
|
java.util.List<IElementListEntry> |
getElementListEntries()
Gets the list of element list entries.
|
IElementListEntry |
getElementListEntry(IElement pElment)
Gets the element list entry of this list for the given element.
|
ElementListStructure |
getElementListStructure()
Get the element list structure of this element list.
|
IResource |
getParentResource()
Returns the parent of this resource or
null if there is
none. |
java.lang.String |
getParentResourceID()
Used to return the parent resource ID before the resource itself was
loaded from cache.
|
IResource |
getResource()
Returns the resource that was selected when the element list was created.
|
java.lang.String |
getTableViewID()
Get the id (secondary) of the view where this element list will be shown.
|
java.lang.String |
getTableViewLabel()
Get the label that will be shown as view part name by loading of this
element list.
|
java.lang.String |
getTitle()
Gets the title of this element list.
|
int |
indexOf(IElementListEntry pEntry)
Returns the index of the given element list entry or
-1 if
it is not in the element list. |
boolean |
isTreeDisplay() |
boolean |
isVisible() |
void |
removeElementListEntries(java.util.List<IElementListEntry> pElementListEntries)
Remove the given list of element list entries from this element list's
entry list.
|
void |
removeElementListEntry(IElementListEntry pElementListEntry)
Remove the given element list entry from this element lists's entry list.
|
boolean |
removeResourceChild(IResource pRes)
Removes a resource of the list of children resources.
|
void |
setElementListEntries(java.util.List<IElementListEntry> pElementListEntries)
Sets the element list entries of this element list.
|
void |
setResource(IResource pResource)
Gets the resource that was used to create the element list.
|
void |
setResource(java.lang.String pResourceID)
Same as
IElementList.setResource(IResource) but uses the resource ID instead. |
void |
setTableViewID(java.lang.String pTableViewID)
Get the (secondary) id of the view where this element list will be shown.
|
void |
setTableViewLabel(java.lang.String pTableViewLabel)
Set the label that will be showing as view part name by loading of this
element list.
|
void |
setTitle(java.lang.String pTitle)
Sets the title of this element list.
|
void |
setTreeDisplay(boolean pTreeDisplay)
If set the element list is be displayed in tree format; if not set the
element list is displayed as flat table.
|
void |
setVisible(boolean pShow)
If set to
true the element list will be shown in table
views. |
java.lang.String |
toString() |
addChildResource, addPropertyValue, equals, getAllPropertyValues, getChildrenResources, getID, getName, getPropertyValue, getPropertyValueFromHierarchy, getResourceChildren, getValueOfLinkedProperty, hashCode, removeProperty, setName, setPropertyValuesaddChildResource, addPropertyValue, getAllPropertyValues, getChildrenResources, getID, getName, getPropertyValue, getPropertyValueFromHierarchy, getResourceChildren, setName, setPropertyValuespublic ElementList(ElementListStructure pElementListStructure, ActionDescriptor pAction)
pElementListStructure - the ElementList's StructurepAction - the action which created the element listpublic ElementList(ElementListStructure pElementListStructure, ActionDescriptor pAction, IResource pParent)
pElementListStructure - the ElementList's StructurepAction - the action which created the element listpParent - the resource that was selected when the element list was
created or null if there was no selected resource
(e.g. list was created by global action)public ElementList(ElementListStructure pElemetListStructure, ActionDescriptor pAction, java.lang.String pElementListID)
pElemetListStructure - the ElementList's StructurepAction - the action which created the element listpElementListID - resource ID for this list or null for a generated
default IDpublic ElementList(ElementListStructure pElemetListStructure, ActionDescriptor pAction, java.lang.String pElementListID, IResource pParent)
pElemetListStructure - the ElementList's StructurepAction - the action which created the element listpElementListID - resource ID for this list or null for a generated
default IDpParent - the resource that was selected when the element list was
created or null if there was no selected resource
(e.g. list was created by global action)public void deleteList()
throws TaurusCoreException
IElementListdeleteList in interface IElementListTaurusCoreException - if deleting the list failspublic ElementListStructure getElementListStructure()
IElementListgetElementListStructure in interface IElementListpublic void setElementListEntries(java.util.List<IElementListEntry> pElementListEntries)
IElementListsetElementListEntries in interface IElementListpElementListEntries - the new element list entries.public java.util.List<IElementListEntry> getElementListEntries()
IElementListThe returned list must not be modified directly since children resources would not be maintained.
getElementListEntries in interface IElementListpublic void addElementListEntry(IElementListEntry pElementListEntry)
IElementListaddElementListEntry in interface IElementListpElementListEntry - element list entry to be addedpublic boolean addResourceChild(IResource pRes)
IResourceaddResourceChild in interface IResourceaddResourceChild in class ResourcepRes - the IResource to be added as child of this resource.true if an element was added as a result of this
callIResource.getResourceChildren()public boolean removeResourceChild(IResource pRes)
IResourceremoveResourceChild in interface IResourceremoveResourceChild in class ResourcepRes - the IResource to be added as child of this resource.true if an element was removed as a result of this
callIResource.getResourceChildren()public void addElementListEntry(IElementListEntry pElementListEntry, int index)
IElementListaddElementListEntry in interface IElementListpElementListEntry - element list entry to be addedindex - position at which the element list entry should be addedpublic void addElementListEntries(java.util.List<IElementListEntry> pElementListEntries)
IElementListaddElementListEntries in interface IElementListpElementListEntries - list of element list entries to be addedpublic void removeElementListEntry(IElementListEntry pElementListEntry)
IElementListremoveElementListEntry in interface IElementListpElementListEntry - element list entry to be removedpublic void removeElementListEntries(java.util.List<IElementListEntry> pElementListEntries)
IElementListremoveElementListEntries in interface IElementListpElementListEntries - list of element list entries to be removedpublic IElementListEntry getElementListEntry(IElement pElment)
IElementListgetElementListEntry in interface IElementListpElment - the elementnull if the list does not
have an entry for the given elementpublic ActionDescriptor getAction()
IElementListgetAction in interface IElementListpublic IResource getResource()
IElementListIResource.getParentResource(). This
method will return null if the element list was created with
no selected resource (e.g. through a global action).getResource in interface IElementListnull).public void setResource(IResource pResource)
IElementListsetResource in interface IElementListpResource - the context resource (can be null e.g. if the
element list was created by a global action)public java.lang.String getTitle()
IElementListgetTitle in interface IElementListpublic java.lang.String getTableViewLabel()
IElementListgetTableViewLabel in interface IElementListpublic void setTableViewLabel(java.lang.String pTableViewLabel)
IElementListsetTableViewLabel in interface IElementListpTableViewLabel - the view label of this listpublic void setTitle(java.lang.String pTitle)
IElementListsetTitle in interface IElementListpTitle - the new titlepublic boolean isVisible()
isVisible in interface IElementListtrue if the element list shall be shown in a table
view. false otherwise.public void setVisible(boolean pShow)
IElementListtrue the element list will be shown in table
views.setVisible in interface IElementListpShow - whether the element list should be displayed in table viewspublic boolean isTreeDisplay()
isTreeDisplay in interface IElementListtrue the element list is be displayed in tree
format; if false the element list is displayed as
flat table.public void setTreeDisplay(boolean pTreeDisplay)
IElementListsetTreeDisplay in interface IElementListpTreeDisplay - whether the element list should be displayed in tree formatpublic int indexOf(IElementListEntry pEntry)
IElementList-1 if
it is not in the element list.indexOf in interface IElementListpEntry - the ElementListEntry-1public static IElementList emptyElementList(ActionDescriptor pAct)
ElementListStructure without any columnspAct - action performed on a resource which generated the element
listpublic void delete()
throws TaurusCoreException
IResourcedelete in interface IResourcedelete in class ResourceTaurusCoreException - if the deletion of the resource failsIResource.getChildrenResources()public void setResource(java.lang.String pResourceID)
IElementListIElementList.setResource(IResource) but uses the resource ID instead.
This is useful on startup when the cache is not completely loaded and the
resource IDs cannot be resolved.setResource in interface IElementListpResourceID - the ID of an IResourcepublic IResource getParentResource()
IResourcenull if there is
none.
Note: Parent/Child relationships will only be maintained if the
"Linked Element List" attribute (
ActionDescriptor.isLinkElementList()) is set to
true.
getParentResource in interface IResourcegetParentResource in class Resourcenull.public java.lang.String getParentResourceID()
IElementListgetParentResourceID in interface IElementListpublic java.lang.String getTableViewID()
IElementListgetTableViewID in interface IElementListpublic void setTableViewID(java.lang.String pTableViewID)
IElementListsetTableViewID in interface IElementListpTableViewID - the view id of this listpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2015 Micro Focus GmbH. All rights reserved.