de.cau.cs.kieler.sim.kiem.config.data
Class ScheduleData

java.lang.Object
  extended by de.cau.cs.kieler.sim.kiem.config.data.ScheduleData

public class ScheduleData
extends Object

Holds all data needed to manage a specific schedule.

Rating proposed yellow
(2010-01-27)

Field Summary
static int DEFAULT_PRIORITY
          default priority on schedule creation.
static int MIN_PRIORITY
          The minimum priority of supported editors.
 
Constructor Summary
ScheduleData(IPath newLocation)
          Create a new Scheduling data.
 
Method Summary
static ScheduleData fromString(String input)
          Parses a ScheduleData object from an input String that was constructed with the toString() method.
static int getDefaultPriority()
          Returns the default priority.
 String getExtendedName()
          Getter for a user friendly name.
 String getId()
          Getter for the id.
 IPath getLocation()
          Getter for the location.
 String getName()
          Getter for a user friendly name.
 String getPluginId()
          Getter for the pluginId.
 String getShortName()
          Creates a short version of the name.
 int getSupportedPriority(EditorIdWrapper editorId)
          Get the supported priority of the given editor.
 boolean isImported()
          Checks whether this ScheduleData is imported (fixed added schedule).
 boolean isLocked()
          Determines whether this schedule is an imported one and thus should not be removed or changed.
 void removeEditor(EditorIdWrapper editorId)
          Remove an editor from the list of supported priorities.
 void setEditorSupport(EditorIdWrapper editorId, int newPriority)
          Set the supported priority of the given editor.
 void setLocation(IPath locationParam)
          Set the location of the schedule.
 void setPluginId(String pluginIdParam)
          Setter for the pluginId.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_PRIORITY

public static final int DEFAULT_PRIORITY
default priority on schedule creation.

See Also:
Constant Field Values

MIN_PRIORITY

public static final int MIN_PRIORITY
The minimum priority of supported editors.

See Also:
Constant Field Values
Constructor Detail

ScheduleData

public ScheduleData(IPath newLocation)
Create a new Scheduling data.

Parameters:
newLocation - the new id and location
Method Detail

getId

public String getId()
Getter for the id.

Returns:
the id

getLocation

public IPath getLocation()
Getter for the location.

Returns:
the location

isLocked

public boolean isLocked()
Determines whether this schedule is an imported one and thus should not be removed or changed.

Returns:
true if the schedule was imported

setPluginId

public void setPluginId(String pluginIdParam)
Setter for the pluginId.

Parameters:
pluginIdParam - the pluginId to set

getPluginId

public String getPluginId()
Getter for the pluginId.

Returns:
the pluginId

getName

public String getName()
Getter for a user friendly name.

Returns:
filename

getExtendedName

public String getExtendedName()
Getter for a user friendly name.

Returns:
filename[project name]

isImported

public boolean isImported()
Checks whether this ScheduleData is imported (fixed added schedule).

Returns:
true, if is imported

getShortName

public String getShortName()
Creates a short version of the name.

Returns:
filename

getSupportedPriority

public int getSupportedPriority(EditorIdWrapper editorId)
Get the supported priority of the given editor.

The priority indicates the usefulness of a schedule for a given editor type.

Parameters:
editorId - the id of the editor to look for
Returns:
the supported priority of the given editor.

setEditorSupport

public void setEditorSupport(EditorIdWrapper editorId,
                             int newPriority)
Set the supported priority of the given editor.

The priority indicates the usefulness of a schedule for a given editor type.

Parameters:
editorId - the editor id to change.
newPriority - the new priority of the editor.

setLocation

public void setLocation(IPath locationParam)
Set the location of the schedule.

Parameters:
locationParam - the new location

fromString

public static ScheduleData fromString(String input)
                               throws KiemParserException
Parses a ScheduleData object from an input String that was constructed with the toString() method.

Parameters:
input - the input string.
Returns:
the parsed object.
Throws:
KiemParserException - if the input is empty

toString

public String toString()

Overrides:
toString in class Object

removeEditor

public void removeEditor(EditorIdWrapper editorId)
Remove an editor from the list of supported priorities.

Parameters:
editorId - The id of the editor to remove.

getDefaultPriority

public static int getDefaultPriority()
Returns the default priority. Either stored or hard coded.

Returns:
the default priority.