public class ElementListDirectory extends TaurusDirectory implements IElementListDirectory
Copyright (C) Micro Focus
ATTRIBUTE_CHILD_RESOURCE_ID, ELEMENT_CHILD_RESOURCE| Modifier and Type | Method and Description |
|---|---|
void |
addElementListDependency(IElementList pElementList,
IElementList pPrevElementList)
Add an element list id to the map which contains the sequential
dependency between element lists.
|
void |
addElementListEntries(IElementList pElementList,
java.util.List<IElementListEntry> pElementListEntries,
boolean pRefreshList)
Add the given element list entry list to the given element list at the
given position.
|
void |
addElementListEntry(IElementList pElementList,
IElementListEntry pElementListEntry,
boolean pRefreshList)
Add the given element list entry to the given element list.
|
void |
addElementListEntry(IElementList pElementList,
IElementListEntry pElementListEntry,
int pIndex,
boolean pRefreshList)
Add the given element list entry to the given element list at the given
position.
|
void |
addList(IElementList pElementList,
java.lang.String pPrevListID,
boolean pNotify)
add a new element list to the element list map and maintain the related
internal data structures
|
void |
addList(IElementList pElementList,
java.lang.String pPrevListID,
java.lang.String pTableViewSecondaryId,
boolean pNotify)
Add a new element list to the element list map and table view secondary
id map and maintain the related internal data structures.
|
void |
addResourceActionList(ActionDescriptor pActionDescriptor,
IResource pIResource,
java.lang.String pElementListID)
Deprecated.
|
boolean |
containsKey(IElementListKey pKey)
Check of the element list directory contains the given logical element
list key.
|
void |
deleteElementLists()
Delete all li_....xml files belonging to the active application from the
workspace.
|
boolean |
elementListExists(IElementListKey pKey)
Check if the element list to the given logical key exists physically.
|
IElementListKey |
getElementListKey(java.lang.String pElementlistID)
Get the key under which the given element list id is stored in the
element list directory.
|
java.util.List<IElementList> |
getElementLists()
Gets a list of all
IElementList. |
java.util.List<IElementList> |
getElementLists(IResource pResource)
Gets element lists which were created with the given resource.
|
java.lang.String |
getFirstListID()
return the first key of the element list map
|
static ElementListDirectory |
getInstance()
singleton method getInstance
|
java.lang.String |
getLastListID()
return the last key of the element list map
|
IElementList |
getList(IElementListKey pKey)
Returns the element list for the given logical element list key.
|
IElementList |
getList(java.lang.String pElementListID)
Returns the
IElementList for the given ID or null if
no element list with the given ID exists. |
IElementList |
getNextList(IElementList pEleList)
Gets the element list which follows the given element list.
|
java.lang.String |
getNextListID(java.lang.String pElementListID)
get the key of the next entry in element list map
|
IElementList |
getPreviousList(IElementList pEleList)
Gets the element list which precedes the given element list.
|
java.lang.String |
getPreviousListID(java.lang.String pElementListID)
get the key of the previous entry in element list map
|
IResource |
getResource(java.lang.String pElementListID)
return the TAURUS resource to which the corresponding element list is
associated
|
IElementList |
getSelectedList()
Gets the element list which is currently selected in a table view.
|
IElementList |
loadElementList(java.lang.String pElementListID)
Load the element list belonging to the given element list id from the
workspace.
|
void |
loadElementListDependency()
Load the lm_elementlists.xml-file from the workspace containing the
sequential dependencies between the element lists.
|
void |
notifyObservers(java.lang.Object pData) |
void |
notifyObservers(TaurusNotification pTaurusNotification)
Sets the changed flag of this observable and notifies observers.
|
void |
notifyRefresh()
Deprecated.
|
void |
removeElementListEntries(IElementList pElementList,
java.util.List<IElementListEntry> pElementListEntries,
boolean pRefreshList)
Remove the given element list entry list from the given element list.
|
void |
removeElementListEntry(IElementList pElementList,
IElementListEntry pElementListEntry,
boolean pRefreshList)
Remove the given element list entry from the given element list.
|
void |
removeList(IElementList pElementList)
remove an element list from the element list map and maintain the related
internal data structures
|
void |
removeLists(IResource pResource)
Remove all element lists belonging to the given TAURUS resource.
|
IElementList |
restoreList(ActionDescriptor pAct,
IResource pRes)
Tries to restore a Element List for the given parameters.
|
void |
saveElementList(IElementList pElementList)
Save the li_....xml file for the given element list id to the workspace.
|
void |
saveElementListDependency()
Save the lm_elementlists.xml-file to the workspace containing the
sequential dependencies between the element lists.
|
void |
saveElementLists()
Save all element lists of the element list directory to the workspace.
|
void |
setSelectedListID(java.lang.String pElementListID)
Sets the ID of the element list which is (or should be) selected in the
main table view.
|
void |
showList(IElementList pElementList)
Notify the observers of the element list directory of a change in the
element list with the given element list id.
|
void |
showList(IElementList pElementList,
java.lang.String pTableViewSecondaryId)
Show the given element list in the table view with given secondary id.
|
addChild, getResourceID, saveChildrenaddObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObserversequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddObserver, deleteObserverpublic static ElementListDirectory getInstance()
public void addList(IElementList pElementList, java.lang.String pPrevListID, boolean pNotify) throws TaurusCoreException
addList in interface IElementListDirectorypElementList - element list to be storedpPrevListID - ID of the list that should be the predecessor of the new listpNotify - whether observers should be notified about the actionTaurusCoreException - if the element list could not be recoveredpublic void addList(IElementList pElementList, java.lang.String pPrevListID, java.lang.String pTableViewSecondaryId, boolean pNotify)
IElementListDirectoryaddList in interface IElementListDirectorypElementList - element list to be added to the TAURUS element list directory
and table view directorypPrevListID - element list which precedes this element list in the element
list directory; maybe null, in this case the element list is
added to the end of the element list directorypTableViewSecondaryId - secondary id of the table view in which the element list will
be mapped, if null, the element list will be
added to the main table viewpNotify - whether the observer of this class will be
notifiedpublic void addElementListEntry(IElementList pElementList, IElementListEntry pElementListEntry, boolean pRefreshList)
IElementListDirectoryaddElementListEntry in interface IElementListDirectorypElementList - element listpElementListEntry - element list entrypRefreshList - true, if the observers of the element list
directory should be notified for a refresh; otherwise
falsepublic void addElementListEntry(IElementList pElementList, IElementListEntry pElementListEntry, int pIndex, boolean pRefreshList)
IElementListDirectoryaddElementListEntry in interface IElementListDirectorypElementList - element listpElementListEntry - element list entrypIndex - position in the element list at which the element list entry
should be addedpRefreshList - true, if the observers of the element list
directory should be notified for a refresh; otherwise
falsepublic void removeElementListEntry(IElementList pElementList, IElementListEntry pElementListEntry, boolean pRefreshList) throws TaurusCoreException
IElementListDirectoryremoveElementListEntry in interface IElementListDirectorypElementList - element listpElementListEntry - element list entrypRefreshList - true, if the observers of the element list
directory should be notified for a refresh; otherwise
falseTaurusCoreException - if the deletion failspublic void addElementListEntries(IElementList pElementList, java.util.List<IElementListEntry> pElementListEntries, boolean pRefreshList)
IElementListDirectoryaddElementListEntries in interface IElementListDirectorypElementList - element listpElementListEntries - list of element list entriespRefreshList - true, if the observers of the element list
directory should be notified for a refresh; otherwise
falsepublic void removeElementListEntries(IElementList pElementList, java.util.List<IElementListEntry> pElementListEntries, boolean pRefreshList)
IElementListDirectoryremoveElementListEntries in interface IElementListDirectorypElementList - element listpElementListEntries - list of element list entriespRefreshList - true, if the observers of the element list
directory should be notified for a refresh; otherwise
falsepublic void showList(IElementList pElementList)
IElementListDirectoryshowList in interface IElementListDirectorypElementList - the ElementList@Deprecated public void notifyRefresh()
IElementListDirectorynotifyRefresh in interface IElementListDirectory@Deprecated public void addResourceActionList(ActionDescriptor pActionDescriptor, IResource pIResource, java.lang.String pElementListID)
IElementListDirectoryaddResourceActionList in interface IElementListDirectorypActionDescriptor - action of the map's keypIResource - resource of the map's keypElementListID - element list to be addedpublic void removeList(IElementList pElementList)
removeList in interface IElementListDirectorypElementList - key under which the element list is storedpublic void removeLists(IResource pResource)
IElementListDirectoryremoveLists in interface IElementListDirectorypResource - TAURUS resource for which the element list are to be deletedpublic java.util.List<IElementList> getElementLists(IResource pResource)
IElementListDirectorygetElementLists in interface IElementListDirectorypResource - the resourcepublic void addElementListDependency(IElementList pElementList, IElementList pPrevElementList)
IElementListDirectoryaddElementListDependency in interface IElementListDirectorypElementList - element list to be addedpPrevElementList - element list which precedes the element list id to be added;
can be null, in this case the element list id is
added at the end of the dependency mappublic void setSelectedListID(java.lang.String pElementListID)
IElementListDirectorysetSelectedListID in interface IElementListDirectorypElementListID - the ID of the selected element listpublic java.lang.String getPreviousListID(java.lang.String pElementListID)
getPreviousListID in interface IElementListDirectorypElementListID - actual key to the element list mapnullpublic java.lang.String getNextListID(java.lang.String pElementListID)
getNextListID in interface IElementListDirectorypElementListID - actual key to the element list mapnullpublic IElementList getPreviousList(IElementList pEleList)
getPreviousList in interface IElementListDirectorypEleList - an element listnull if there is none.public IElementList getNextList(IElementList pEleList)
getNextList in interface IElementListDirectorypEleList - an element listnull if there is none.public IElementList getList(java.lang.String pElementListID)
IElementList for the given ID or null if
no element list with the given ID exists.getList in interface IElementListDirectorypElementListID - the ID of an element list.nullpublic IResource getResource(java.lang.String pElementListID)
getResource in interface IElementListDirectorypElementListID - key in the element list mappublic IElementList getSelectedList()
IElementListDirectorygetSelectedList in interface IElementListDirectorynullpublic IElementListKey getElementListKey(java.lang.String pElementlistID)
IElementListDirectorygetElementListKey in interface IElementListDirectorypElementlistID - the element list's idpublic boolean containsKey(IElementListKey pKey)
IElementListDirectorycontainsKey in interface IElementListDirectorypKey - logical element list keytrue, if the element list directory contains the
given key, otherwise falsepublic IElementList getList(IElementListKey pKey)
IElementListDirectorygetList in interface IElementListDirectorypKey - logical element list keynull, if the
element list directory does not contain a list with the given keypublic boolean elementListExists(IElementListKey pKey)
IElementListDirectoryelementListExists in interface IElementListDirectorypKey - logical element list keytrue, if the element list exists physically,
otherwise falsepublic java.lang.String getFirstListID()
getFirstListID in interface IElementListDirectorynull if the
element list map is emptypublic java.lang.String getLastListID()
getLastListID in interface IElementListDirectorypublic IElementList loadElementList(java.lang.String pElementListID)
IElementListDirectoryloadElementList in interface IElementListDirectorypElementListID - id of the element listnullpublic void saveElementList(IElementList pElementList) throws TaurusCoreException
IElementListDirectorysaveElementList in interface IElementListDirectorypElementList - element listTaurusCoreException - if saving the element lists into cache failspublic void saveElementLists()
throws TaurusCoreException
IElementListDirectorysaveElementLists in interface IElementListDirectoryTaurusCoreException - if saving the element lists failspublic void loadElementListDependency()
throws TaurusCoreException
IElementListDirectoryloadElementListDependency in interface IElementListDirectoryTaurusCoreException - if loading the element list dependencies failspublic void saveElementListDependency()
throws TaurusCoreException
IElementListDirectorysaveElementListDependency in interface IElementListDirectoryTaurusCoreException - if saving the element list dependencies failspublic void deleteElementLists()
throws TaurusCoreException
IElementListDirectorydeleteElementLists in interface IElementListDirectoryTaurusCoreException - if deleting the element list cache failspublic void notifyObservers(java.lang.Object pData)
notifyObservers in class java.util.Observablepublic IElementList restoreList(ActionDescriptor pAct, IResource pRes)
IElementListDirectorynull will be
returned in that case).restoreList in interface IElementListDirectorypAct - the ActionDescriptor which creates the Element ListpRes - the parent IResource of the Element Listnull if the element list
didn't exist in the cacheIElementListKeypublic java.util.List<IElementList> getElementLists()
IElementListDirectoryIElementList.getElementLists in interface IElementListDirectorypublic void notifyObservers(TaurusNotification pTaurusNotification)
TaurusDirectorynotifyObservers in interface IElementListDirectorynotifyObservers in class TaurusDirectorypTaurusNotification - the notification. Can be null (not recommended).Observable.notifyObservers(Object)public void showList(IElementList pElementList, java.lang.String pTableViewSecondaryId)
IElementListDirectoryshowList in interface IElementListDirectorypElementList - the element list to showpTableViewSecondaryId - the secondary id of the table view in which the list will be
shown, if null the list will be shown in the main
table viewCopyright © 2015 Micro Focus GmbH. All rights reserved.