com.tensegrity.skeleton.launch
Class LoadFileLaunchTask

java.lang.Object
  extended bycom.tensegrity.gui.launch.LaunchTask
      extended bycom.tensegrity.skeleton.swing.launch.AbstractLaunchTask
          extended bycom.tensegrity.skeleton.launch.LoadFileLaunchTask
Direct Known Subclasses:
AbstractLoadPreferencesLaunchTask, SwtLoadPreferencesLaunchTask, SwtLoadRulesLaunchTask

public abstract class LoadFileLaunchTask
extends AbstractLaunchTask

DO NOT USE THIS CLASS IT IS STILL UNDER CONSTRUCTION!!! TODO (ah) to be continued... Base class for LaunchTask implementations which have to deal with Resources. Such a LaunchTask requires at least two properties: A Filename and an optional instance of class Class, the various load-methods need, to identify the location of the given (relative) filename. Only if the loaderclass-method returns null, the getFilename must return an absolute filename.

Version:
$Id: LoadFileLaunchTask.java,v 1.3 2005/08/08 16:36:18 BurkhardWick Exp $
Author:
ArndHouben

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
LoadFileLaunchTask(ApplicationFrame applicationFrame)
          Creates a new LoadFileLaunchTask with no specific filename and no class instance for the loading.
LoadFileLaunchTask(ApplicationFrame applicationFrame, java.lang.String nameKey)
          Creates a new LoadFileLaunchTask with no specific filename and no class instance for the loading.
LoadFileLaunchTask(ApplicationFrame applicationFrame, java.lang.String filename, java.lang.Class loadClass)
          Creates a new LoadFileLaunchTask with the given String parameter as filename and Class instance as Loader.
LoadFileLaunchTask(ApplicationFrame applicationFrame, java.lang.String filename, java.lang.Class loadClass, java.lang.String nameKey)
          Creates a new LoadFileLaunchTask with the given String parameter as filename and Class instance as Loader.
 
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.
 java.lang.String getName()
          Returns a concatenated string consisting of the "load" preposition and the filename.
 
Methods inherited from class com.tensegrity.skeleton.swing.launch.AbstractLaunchTask
findResourceText, getApplicationFrame, getStatusPrefix, getStatusPrefixResourceKey, postCreate
 
Methods inherited from class com.tensegrity.gui.launch.LaunchTask
getError, getStatusDetails, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadFileLaunchTask

public LoadFileLaunchTask(ApplicationFrame applicationFrame)
Creates a new LoadFileLaunchTask with no specific filename and no class instance for the loading.

Parameters:
applicationFrame - Application context for this LaunchTask.
See Also:
LoadFileLaunchTask(ApplicationFrame, String, Class)

LoadFileLaunchTask

public LoadFileLaunchTask(ApplicationFrame applicationFrame,
                          java.lang.String nameKey)
Creates a new LoadFileLaunchTask with no specific filename and no class instance for the loading.

Parameters:
applicationFrame - Application context for this LaunchTask.
nameKey - the resource key for the name of the launch task
See Also:
LoadFileLaunchTask(ApplicationFrame, String, Class)

LoadFileLaunchTask

public LoadFileLaunchTask(ApplicationFrame applicationFrame,
                          java.lang.String filename,
                          java.lang.Class loadClass)
Creates a new LoadFileLaunchTask with the given String parameter as filename and Class instance as Loader.

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

LoadFileLaunchTask

public LoadFileLaunchTask(ApplicationFrame applicationFrame,
                          java.lang.String filename,
                          java.lang.Class loadClass,
                          java.lang.String nameKey)
Creates a new LoadFileLaunchTask with the given String parameter as filename and Class instance as Loader.

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

getFilename

protected java.lang.String getFilename()
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.

Returns:
String the filename as string.

getLoadClass

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

Returns:
Class the class to use as resource loader.

getName

public java.lang.String getName()
Returns a concatenated string consisting of the "load" preposition and the filename.

Overrides:
getName in class AbstractLaunchTask
See Also:
LaunchTask.getName()


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