org.installguru.installer
Class ShortcutTask

java.lang.Object
  |
  +--org.installguru.installer.ShortcutTask
All Implemented Interfaces:
InstallTask

public class ShortcutTask
extends java.lang.Object
implements InstallTask

This is a non-GUI task which create a platform specific shortcut.

See Also:
ShortcutPanel

Constructor Summary
ShortcutTask()
          Creates a new instance of ShortcutTask
 
Method Summary
 void doCancel(java.util.Properties properties)
          This method is called by the installer when the install operation is cancelled by the user.
 boolean doNext(java.util.Properties properties)
          This method is called by the installer when it is moved to the next task.
 java.lang.String getDescription()
          Getter for property description.
 java.lang.String getDestination()
          Gets the path of the destination directory where this shortcut to be created.
 java.lang.String getIconPath()
          Gets the icon path of this shortcut.
 java.lang.String getName()
          Getter for property name.
 java.lang.String getSource()
          Gets the source path of this shortcut to which this shortcut point to.
 void init(java.util.Properties properties)
          This method is called by the installer whenever this task is initialized.
 boolean isOSSupported()
          Currently this task is supported only on Windows platform.
 void setDescription(java.lang.String description)
          Setter for property description.
 void setDestination(java.lang.String destination)
          Sets the path of the destination directory where this shortcut to be created.
 void setIconPath(java.lang.String icon)
          Sets the icon path of this shortcut.
 void setName(java.lang.String name)
          Setter for property name.
 void setSource(java.lang.String source)
          Sets the source path of this shortcut to which this shortcut point to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShortcutTask

public ShortcutTask()
Creates a new instance of ShortcutTask
Method Detail

getName

public java.lang.String getName()
Getter for property name.
Returns:
Value of property name.

setName

public void setName(java.lang.String name)
Setter for property name.
Parameters:
name - New value of property name.

getDescription

public java.lang.String getDescription()
Getter for property description.
Returns:
Value of property description.

setDescription

public void setDescription(java.lang.String description)
Setter for property description.
Parameters:
description - New value of property description.

getSource

public java.lang.String getSource()
Gets the source path of this shortcut to which this shortcut point to. This path should be relative to the install directory.
For Example: if the install directory is 'C:\My program' and source path 'bin\run.bat', then the absolute path will be 'C:\My program\bin\run.bat'.
Returns:
path to source.

setSource

public void setSource(java.lang.String source)
Sets the source path of this shortcut to which this shortcut point to. This path should be relative to the install directory.
For Example: if the install directory is 'C:\My program' and source path 'bin\run.bat', then the absolute path will be 'C:\My program\bin\run.bat'.
Parameters:
path - to source.

getDestination

public java.lang.String getDestination()
Gets the path of the destination directory where this shortcut to be created. This path should be relative to the shortcut folder selected in the ShortcutPanel GUI task.
Returns:
path of destination.

setDestination

public void setDestination(java.lang.String destination)
Sets the path of the destination directory where this shortcut to be created. This path should be relative to the shortcut folder selected in the ShortcutPanel GUI task.
Parameters:
path - of destination.

getIconPath

public java.lang.String getIconPath()
Gets the icon path of this shortcut. This path should be relative to the install directory.
For Example: if the install directory is 'C:\My program' and source path 'bin\run.ico', then the absolute path will be 'C:\My program\bin\run.ico'.
Returns:
path to source.

setIconPath

public void setIconPath(java.lang.String icon)
Sets the icon path of this shortcut. This path should be relative to the install directory.
For Example: if the install directory is 'C:\My program' and source path 'bin\run.ico', then the absolute path will be 'C:\My program\bin\run.ico'.
Returns:
path to source.

doCancel

public void doCancel(java.util.Properties properties)
Description copied from interface: InstallTask
This method is called by the installer when the install operation is cancelled by the user.
Specified by:
doCancel in interface InstallTask
Following copied from interface: org.installguru.installer.InstallTask
Parameters:
props - installer properties.

doNext

public boolean doNext(java.util.Properties properties)
               throws InstallException
Description copied from interface: InstallTask
This method is called by the installer when it is moved to the next task.
Specified by:
doNext in interface InstallTask
Following copied from interface: org.installguru.installer.InstallTask
Parameters:
props - installer properties.
Returns:
true to allow to move to next task. Otherwise it stays on this task.
Throws:
InstallException. -  

init

public void init(java.util.Properties properties)
          throws InstallException
Description copied from interface: InstallTask
This method is called by the installer whenever this task is initialized.
Specified by:
init in interface InstallTask
Following copied from interface: org.installguru.installer.InstallTask
Parameters:
props - installer properties.
Throws:
InstallException. -  

isOSSupported

public boolean isOSSupported()
Currently this task is supported only on Windows platform.
Specified by:
isOSSupported in interface InstallTask