public class ElementDirectory extends TaurusDirectory implements IElementDirectory
IElementDirectory.ATTRIBUTE_CHILD_RESOURCE_ID, ELEMENT_CHILD_RESOURCE| Constructor and Description |
|---|
ElementDirectory() |
| 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)
Add the given element list entry in the element list entries map.
|
void |
addElementListEntry(IElementListEntry pEntry)
Adds a new
IElementListEntry to the cache. |
boolean |
changeElementType(IElement pElement,
ElementType newElementType)
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.
|
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)
Returns the Taurus element belonging to the given file in the internal
Taurus project.
|
IElement |
getElementForPath(org.eclipse.core.runtime.IPath pFullPath)
Returns the Taurus element belonging to the given path in the internal
Taurus project.
|
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 belonging to the specified type
|
static ElementDirectory |
getInstance()
Returns this singleton's instance.
|
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.
|
addChild, getResourceID, notifyObservers, saveChildrenaddObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObserversequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddObserver, deleteObserverpublic static ElementDirectory getInstance()
public boolean addElement(IElement pElement)
IElementDirectoryaddElement in interface IElementDirectorypElement - element to be addedpublic boolean changeElementType(IElement pElement, ElementType newElementType)
IElementDirectorychangeElementType in interface IElementDirectorypElement - the elementnewElementType - the new element typetrue if the element type was successfully changedpublic void removeElement(IElement pElement) throws TaurusCoreException
IElementDirectoryremoveElement in interface IElementDirectorypElement - TAURUS element to be removedTaurusCoreException - if the element could not be removed or the cache could not be
updatedpublic boolean addElementList(IElement pElement, java.lang.String pElementListID)
IElementDirectoryaddElementList in interface IElementDirectorypElement - TAURUS elementpElementListID - element list idpublic boolean addElementListEntries(IElementListEntry pElementListEntry, IElement pElement)
IElementDirectoryaddElementListEntries in interface IElementDirectorypElementListEntry - 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 otherwisepublic java.util.Set<IElementListEntry> getElementListEntries(IElement pElement)
IElementDirectoryNote: Modifying the set will not have any effect on the element list cache.
getElementListEntries in interface IElementDirectorypElement - the element to get element list entries frompublic IElement getElement(java.lang.String pElementId) throws TaurusCoreException
IElementDirectorygetElement in interface IElementDirectorypElementId - the element's idTaurusCoreException - if loading the element cache failspublic java.util.Set<IElement> getElements(ElementType pElementTyp)
getElements in interface IElementDirectorypElementTyp - element typepublic IElement getElementForFile(org.eclipse.core.resources.IFile pFile) throws TaurusCoreException
IElementDirectorygetElementForFile in interface IElementDirectorypFile - file in the internal Taurus projectTaurusCoreException - if loading the element cache failspublic IElement getElementForPath(org.eclipse.core.runtime.IPath pFullPath) throws TaurusCoreException
IElementDirectorygetElementForPath in interface IElementDirectorypFullPath - full path in the internal Taurus projectTaurusCoreException - if loading the element cache failspublic void loadElements()
throws TaurusCoreException
IElementDirectoryloadElements in interface IElementDirectoryTaurusCoreException - if loading the element cache failspublic void saveElements()
throws TaurusCoreException
IElementDirectorysaveElements in interface IElementDirectoryTaurusCoreException - if saving the element cache failspublic void loadElementListMap()
throws TaurusCoreException
IElementDirectoryloadElementListMap in interface IElementDirectoryTaurusCoreException - if loading the element list cache failspublic void saveElementListMap()
throws TaurusCoreException
IElementDirectorysaveElementListMap in interface IElementDirectoryTaurusCoreException - if saving the element list cache failspublic void deleteElementListMap()
throws TaurusCoreException
IElementDirectorydeleteElementListMap in interface IElementDirectoryTaurusCoreException - if updating the element list cache failspublic void deleteElements()
throws TaurusCoreException
IElementDirectorydeleteElements in interface IElementDirectoryTaurusCoreException - if updating the cache failspublic IElementListEntry getElementListEntry(java.lang.String pID)
IElementDirectoryIElementListEntry or null if no
entry with the given ID was found.getElementListEntry in interface IElementDirectorypID - an ID of an element list entrynullpublic java.util.Map<java.lang.String,IElementListEntry> getElementListEntries()
getElementListEntries in interface IElementDirectorypublic void addElementListEntry(IElementListEntry pEntry)
IElementDirectoryIElementListEntry to the cache. This is necessary if
any IElementListEntry is created (usually done in the
constructor).addElementListEntry in interface IElementDirectorypEntry - the entry to be added to the directoryCopyright © 2015 Micro Focus GmbH. All rights reserved.