de.cau.cs.kieler.ksbase.core
Class TransformationManager

java.lang.Object
  extended by de.cau.cs.kieler.ksbase.core.TransformationManager

public final class TransformationManager
extends Object

The main storage and management class. Contains a list of currently registered editors. Handles import and export.

Rating yellow
(2010-01-22) review by msp, skn

Field Summary
static TransformationManager INSTANCE
          Transformation-Manager instance.
 
Method Summary
 void addEditor(EditorTransformationSettings editor)
          Adds a new editor to the list of user defined editors.
 EditorTransformationSettings addEditor(String editorId)
          Adds a new editor to the list of user defined editors.
 Collection<EditorTransformationSettings> getEditors()
          Gets the currently registered editors.
 EditorTransformationSettings getEditorSettingsById(String editorId)
          Tries to find an editor with it's id.
 EditorTransformationSettings getUserDefinedEditorById(String editorId)
          Tries to find an user defined editor with its id.
 Collection<EditorTransformationSettings> getUserDefinedEditors()
          Gets the list of user defined editors.
 void initializeTransformations()
          Initializes the transformation manager by reading the extension points and the user defined settings.
 void removeEditor(String editorId)
          Removes an editor from the list of user defined editors.
 void storeUserDefinedTransformations()
          Stores the user defined settings in the KSbasE state location folder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final TransformationManager INSTANCE
Transformation-Manager instance.

Method Detail

getEditors

public Collection<EditorTransformationSettings> getEditors()
Gets the currently registered editors.

Returns:
A list of EditorTransformationSettings

getUserDefinedEditors

public Collection<EditorTransformationSettings> getUserDefinedEditors()
Gets the list of user defined editors. This is done by checking if the contributor is 'null' and is used by the preference page.

Returns:
A list of EditorTransformationSettings

getEditorSettingsById

public EditorTransformationSettings getEditorSettingsById(String editorId)
Tries to find an editor with it's id.

Parameters:
editorId - The editor's id.
Returns:
The first editor in the list of registered editors which has the given name

getUserDefinedEditorById

public EditorTransformationSettings getUserDefinedEditorById(String editorId)
Tries to find an user defined editor with its id.

Parameters:
editorId - The editor's id.
Returns:
The first editor in the list of registered editors which has the given name

addEditor

public void addEditor(EditorTransformationSettings editor)
Adds a new editor to the list of user defined editors.

Parameters:
editor - The EditorTransformationSetting that describes the editor

addEditor

public EditorTransformationSettings addEditor(String editorId)
Adds a new editor to the list of user defined editors. This class creates an empty EditorTransformationSetting with the given editorId.

Parameters:
editorId - The name of the new editor
Returns:
The newly created EditorTransformationSettings

removeEditor

public void removeEditor(String editorId)
Removes an editor from the list of user defined editors.

Parameters:
editorId - The id of the editor

storeUserDefinedTransformations

public void storeUserDefinedTransformations()
Stores the user defined settings in the KSbasE state location folder.


initializeTransformations

public void initializeTransformations()
Initializes the transformation manager by reading the extension points and the user defined settings.