com.tensegrity.skeleton.swing.launch
Class LoadRulesLaunchTask

java.lang.Object
  extended bycom.tensegrity.gui.launch.LaunchTask
      extended bycom.tensegrity.skeleton.swing.launch.AbstractLaunchTask
          extended bycom.tensegrity.skeleton.swing.launch.LoadFileLaunchTask
              extended bycom.tensegrity.skeleton.swing.launch.LoadRulesLaunchTask

public class LoadRulesLaunchTask
extends LoadFileLaunchTask

Loads the rules.xml file.

Version:
$Id: LoadRulesLaunchTask.java,v 1.11 2005/04/05 16:19:58 BurkhardWick Exp $
Author:
GillesIachelini

Field Summary
 
Fields inherited from class com.tensegrity.gui.launch.LaunchTask
lasterror, LAUNCHTASKSTATUS_FATAL, LAUNCHTASKSTATUS_FATAL_RETRY, LAUNCHTASKSTATUS_SERIOUS, LAUNCHTASKSTATUS_SERIOUS_RETRY, LAUNCHTASKSTATUS_SHUTDOWN, LAUNCHTASKSTATUS_SUCCESS, LAUNCHTASKSTATUS_WARNING
 
Constructor Summary
LoadRulesLaunchTask(ApplicationFrame applicationFrame)
          Creates the LoadRulesLaunchTask.
LoadRulesLaunchTask(ApplicationFrame applicationFrame, java.lang.String filename, java.lang.Class loadClass)
          Creates the LoadRulesLaunchTask based on the given filename and Class to load the file.
 
Method Summary
protected  java.lang.String getFilename()
          Returns the filename of the resource, this launchtask should load.
protected  java.lang.Class getLoadClass()
          When loading resource from jar files or other locations you may need a Class instance.
 void postCreate(java.lang.Object object)
          Receives the newly created RuleRegistry and allows modifications before it'll be set at the application frame.
 int run()
          Creates a new RuleRegistry from the given file by using the loadclass and sets it at the applicationframe.
 
Methods inherited from class com.tensegrity.skeleton.swing.launch.LoadFileLaunchTask
getName
 
Methods inherited from class com.tensegrity.skeleton.swing.launch.AbstractLaunchTask
findResourceText, getApplicationFrame, getStatusPrefix, getStatusPrefixResourceKey
 
Methods inherited from class com.tensegrity.gui.launch.LaunchTask
getError, getStatusDetails
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadRulesLaunchTask

public LoadRulesLaunchTask(ApplicationFrame applicationFrame)
Creates the LoadRulesLaunchTask.

Parameters:
applicationFrame - Application context for this LaunchTask.

LoadRulesLaunchTask

public LoadRulesLaunchTask(ApplicationFrame applicationFrame,
                           java.lang.String filename,
                           java.lang.Class loadClass)
Creates the LoadRulesLaunchTask based on the given filename and Class to load the file.

Parameters:
applicationFrame - Application context for this LaunchTask.
filename - a String which describes a filename.
loadClass - the resource class to use for loading.
Method Detail

getFilename

protected java.lang.String getFilename()
Description copied from class: LoadFileLaunchTask
Returns the filename of the resource, this launchtask should load. If the getLoadClass method returns null, this method should return a filename with full path.

Overrides:
getFilename in class LoadFileLaunchTask
Returns:
String the filename as string.

getLoadClass

protected java.lang.Class getLoadClass()
Description copied from class: LoadFileLaunchTask
When loading resource from jar files or other locations you may need a Class instance. Return null to load from absolute file.

Overrides:
getLoadClass in class LoadFileLaunchTask
Returns:
Class the class to use as resource loader.

postCreate

public void postCreate(java.lang.Object object)
Receives the newly created RuleRegistry and allows modifications before it'll be set at the application frame.

Specified by:
postCreate in class AbstractLaunchTask
Parameters:
object -
See Also:
AbstractLaunchTask.postCreate(Object)

run

public final int run()
              throws java.lang.Exception
Creates a new RuleRegistry from the given file by using the loadclass and sets it at the applicationframe.

Specified by:
run in class LaunchTask
Returns:
one of the LAUNCHTASKSTATUS_* constants defined in this interface.
Throws:
java.lang.Exception
See Also:
LaunchTask.run()


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.