public interface IElementDirectory
IElements and
IElementListEntrys known by a ITaurusApplication.
An ITaurusApplication does not know all the children at the
beginning. IElements and IElementListEntrys become cached
right after the creation. They are created for example by expanding the Tree
in the Team Developer Tree View or by opening or expanding filters.
The IElementListDirectory handles the caching and loading of
IElementListEntrys and IElements. It is intended to use the
eb_elementsinlists.xml and the et_elements.xml-file in the workspace for
caching IElementListEntrys and IElements.
The singleton instance can be acquired with
TaurusFactory.getElementDirectory().
This interface is not intended to be implemented by clients.
| Modifier and Type | Method and Description |
|---|---|
boolean |
addElement(IElement pElement)
Add an element to the TAURUS element directory.
|
boolean |
addElementList(IElement pElement,
java.lang.String pElementListID)
Add the list id to the list of element lists in which the element is
contained.
|
boolean |
addElementListEntries(IElementListEntry pElementListEntry,
IElement pElement)
Deprecated.
Do not use. Not required anymore. Element list entries are
automatically maintained in the directory.
|
void |
addElementListEntry(IElementListEntry pEntry)
Adds a new
IElementListEntry to the cache. |
void |
addObserver(java.util.Observer pObserver)
Add the given observer to this class.
|
boolean |
changeElementType(IElement pElement,
ElementType pNewElementType)
Changes the element type of the given element.
|
void |
deleteElementListMap()
Remove the eb_elementsinlists.xml-file from the workspace.
|
void |
deleteElements()
Remove the et_elements.xml-file from the active application's folder.
|
void |
deleteObserver(java.util.Observer pObserver)
delete the given observer for this class
|
IElement |
getElement(java.lang.String pElementId)
Get the element with the given ID from the TAURUS element directory.
|
IElement |
getElementForFile(org.eclipse.core.resources.IFile pFile)
Deprecated.
not used anymore. There is no safe way to get an element from
a physical file.
|
IElement |
getElementForPath(org.eclipse.core.runtime.IPath pFullPath)
Deprecated.
not used anymore. There is no safe way to get an element from
a physical file.
|
java.util.Map<java.lang.String,IElementListEntry> |
getElementListEntries() |
java.util.Set<IElementListEntry> |
getElementListEntries(IElement pElement)
Gets element list entries that belong to the given element.
|
IElementListEntry |
getElementListEntry(java.lang.String pID)
Returns a cached
IElementListEntry or null if no
entry with the given ID was found. |
java.util.Set<IElement> |
getElements(ElementType pElementTyp)
Get all elements for the specified type.
|
void |
loadElementListMap()
Load the eb_elementsinlists.xml-file from the workspace which contains
the references between elements and element lists in which they are
contained.
|
void |
loadElements()
Load the et_elements.xml file from the workspace.
|
void |
removeElement(IElement pElement)
Remove the given element from the TAURUS element directory and all
element lists in which it is contained.
|
void |
saveElementListMap()
Save the eb_elementsinlists.xml-file in the workspace which contains the
references between elements and element lists in which they are
contained.
|
void |
saveElements()
Save the et_elements.xml file to the workspace.
|
boolean addElement(IElement pElement)
pElement - element to be addedboolean addElementList(IElement pElement, java.lang.String pElementListID)
pElement - TAURUS elementpElementListID - element list idvoid removeElement(IElement pElement) throws TaurusCoreException
pElement - TAURUS element to be removedTaurusCoreException - if the element could not be removed or the cache could not be
updated@Deprecated boolean addElementListEntries(IElementListEntry pElementListEntry, IElement pElement)
pElementListEntry - element list entrypElement - corresponding element of the element list entrytrue if the given element list entry has been added
in the element list map and false otherwisevoid addObserver(java.util.Observer pObserver)
pObserver - observervoid deleteObserver(java.util.Observer pObserver)
pObserver - observerjava.util.Set<IElementListEntry> getElementListEntries(IElement pElement)
Note: Modifying the set will not have any effect on the element list cache.
pElement - the element to get element list entries fromIElement getElement(java.lang.String pElementId) throws TaurusCoreException
pElementId - the element's idTaurusCoreException - if loading the element cache failsjava.util.Set<IElement> getElements(ElementType pElementTyp)
pElementTyp - element typevoid saveElements()
throws TaurusCoreException
TaurusCoreException - if saving the element cache failsvoid loadElements()
throws TaurusCoreException
TaurusCoreException - if loading the element cache failsvoid saveElementListMap()
throws TaurusCoreException
TaurusCoreException - if saving the element list cache failsvoid loadElementListMap()
throws TaurusCoreException
TaurusCoreException - if loading the element list cache fails@Deprecated IElement getElementForFile(org.eclipse.core.resources.IFile pFile) throws TaurusCoreException
pFile - file in the internal Taurus projectTaurusCoreException - if loading the element cache fails@Deprecated IElement getElementForPath(org.eclipse.core.runtime.IPath pFullPath) throws TaurusCoreException
pFullPath - full path in the internal Taurus projectTaurusCoreException - if loading the element cache failsboolean changeElementType(IElement pElement, ElementType pNewElementType)
pElement - the elementpNewElementType - the new element typetrue if the element type was successfully changedvoid deleteElements()
throws TaurusCoreException
TaurusCoreException - if updating the cache failsvoid deleteElementListMap()
throws TaurusCoreException
TaurusCoreException - if updating the element list cache failsIElementListEntry getElementListEntry(java.lang.String pID)
IElementListEntry or null if no
entry with the given ID was found.pID - an ID of an element list entrynulljava.util.Map<java.lang.String,IElementListEntry> getElementListEntries()
void addElementListEntry(IElementListEntry pEntry)
IElementListEntry to the cache. This is necessary if
any IElementListEntry is created (usually done in the
constructor).pEntry - the entry to be added to the directoryCopyright © 2015 Micro Focus GmbH. All rights reserved.