All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.install.tasks.DesktopTask
java.lang.Object
|
+----com.sun.wizards.core.Task
|
+----com.sun.install.tasks.DesktopTask
- public class DesktopTask
- extends Task
- implements Serializable
DesktopTask will add icons (shortcuts) to the user's desktop,
using a product tree to gather the information.
An item will be added for each product tree component that
has a property called "DesktopItems". That property must be
a Vector of String[]s with 4 elements:
- Name of the Item, as it will appear to the user
- Folder it should appear in on the user's desktop. A base folder
is assumed for each platform (e.g. on Windows, a folder name is assumed
relative to the "Programs" folder on the user's Start Menu).
- Path to the file itself.
- Path to the platform-specific icon. If this is element is omitted,
then the platform's default icon is assumed.
-
DesktopTask()
- Creates a new DesktopTask.
-
DesktopTask(String)
- This constructor is used by the builder.
-
addRuntimeResources(Vector)
- Add the runtime class requirements to the specified vector.
-
expandKeywords(String)
-
Looks for commands of the form {statekey}, and replaces them
with the variable stored under the specified key.
-
perform()
- Add the icons
DesktopTask
public DesktopTask()
- Creates a new DesktopTask.
DesktopTask
public DesktopTask(String componentKey)
- This constructor is used by the builder.
- Parameters:
- componentKey - The WizardState key identifying the product component this
DesktopTask installs desktop items for.
perform
public void perform()
- Add the icons
- Overrides:
- perform in class Task
expandKeywords
public String expandKeywords(String command)
- Looks for commands of the form {statekey}, and replaces them
with the variable stored under the specified key. For
instance, assume that one has called the WizardState's
setData("mylocation", "/opt"); statement. Then
this method would replace the String
"{mylocation}/bin/runme" with the String
"/opt/bin/runme".
- Parameters:
- command - The string with the unresolved variables in
it. Nested braces are not allowed.
- Returns:
- The same string passed in, execept and variable
instances of the form {statekey} are replaced with the values
under that state key
addRuntimeResources
public void addRuntimeResources(Vector resourceVector)
- Add the runtime class requirements to the specified vector.
- Parameters:
- resourceVector - The vector containing all the required resources
for this wizard.
- Overrides:
- addRuntimeResources in class Task
All Packages Class Hierarchy This Package Previous Next Index