|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.izforge.izpack.util.os.Shortcut
com.izforge.izpack.util.os.Unix_Shortcut
public class Unix_Shortcut
This is the Implementation of the RFC-Based Desktop-Link. Used in KDE and GNOME.
| Field Summary |
|---|
| Fields inherited from class com.izforge.izpack.util.os.Shortcut |
|---|
ALL_USERS, APPLICATIONS, CURRENT_USER, DESKTOP, HIDE, MAXIMIZED, MINIMIZED, NORMAL, START_MENU, START_UP, uninstaller |
| Constructor Summary | |
|---|---|
Unix_Shortcut(Resources resources,
InstallData installData)
Constructs a Unix_Shortcut. |
|
| Method Summary | |
|---|---|
String |
build()
Builds contents of desktop file. |
void |
execPostAction()
Post Exec Action especially for the Unix Root User. |
String |
getFileName()
Subclass implementations return the fully qualified file name under which the link is saved on disk. |
String |
getIconLocation()
Returns the path of the shortcut icon that will be shown on the desktop. |
int |
getLinkType()
Gets the type of link types are: Shortcut.DESKTOP
Shortcut.APPLICATIONS
Shortcut.START_MENU
Shortcut.START_UP
|
List<String> |
getProgramGroups(int userType)
Returns a list of currently existing program groups, based on the requested type. |
String |
getProgramsFolder(int current_user)
Gets the Programs Folder for the given User. |
int |
getUserType()
Gets the user type for the link |
String |
getWrittenFileName()
|
void |
initialize(int aType,
String aName)
This method initializes the object. |
boolean |
multipleUsers()
overridden method |
void |
save()
Creates and stores the shortcut-files. |
void |
setArguments(String args)
Sets the command line arguments that will be passed to the target when the link is activated. |
void |
setCategories(String theCategories)
Sets the Categories Field On Unixes |
void |
setDescription(String description)
Sets the description string that is used to identify the link in a menu or on the desktop. |
void |
setEncoding(String aEncoding)
Sets the Encoding |
void |
setIconLocation(String path,
int index)
Sets the path of the shortcut icon that will be shown on the desktop. |
void |
setKdeSubstUID(String trueFalseOrNothing)
This sets the setKdeSubstUID |
void |
setKdeUserName(String aUserName)
This sets the KdeUserName |
void |
setLinkName(String aName)
Sets the name shown in a menu or on the desktop for the link. |
void |
setLinkType(int aType)
Sets the type of link |
void |
setMimetype(String aMimeType)
This sets the Mimetype |
void |
setProgramGroup(String aGroupName)
Sets the name of the program group this ShellLinbk should be placed in. |
void |
setShowCommand(int show)
Sets the show command that is passed to the target application when the link is activated. |
void |
setTargetPath(String aPath)
Sets the absolute path to the shortcut target. |
void |
setTerminal(String trueFalseOrNothing)
Sets the terminal |
void |
setTerminalOptions(String someTerminalOptions)
This sets the terminals-options |
void |
setTryExec(String aTryExec)
Sets the TryExecField on Unixes. |
void |
setType(String aType)
This sets the shortcut type |
void |
setURL(String anUrl)
This sets the URL |
void |
setUserType(int aUserType)
Sets the user type for the link |
void |
setWorkingDirectory(String aDirectory)
Sets the working directory for the link target. |
boolean |
supported()
Determines if a specific instance of this class supports the creation of shortcuts. |
String |
toString()
|
| Methods inherited from class com.izforge.izpack.util.os.Shortcut |
|---|
cleanUp, getBasePath, getCreateForAll, getHotkey, getRunAsAdministrator, getShowCommand, getWorkingDirectory, setCreateForAll, setHotkey, setRunAsAdministrator, setUninstaller |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Unix_Shortcut(Resources resources,
InstallData installData)
resources - the resourcesinstallData - the installation data| Method Detail |
|---|
public String build()
public void initialize(int aType,
String aName)
throws Exception
ShortcutTargetFactory.
initialize in class ShortcutaType - the type or classification of the program group in which the link should exist.aName - the name of the shortcut.
Exceptionpublic boolean supported()
Shortcut
supported in class Shortcuttrue if the creation of shortcuts is supported, false if
this is not supported.public String getFileName()
Shortcut
getFileName in class ShortcutStringpublic List<String> getProgramGroups(int userType)
ShortcutAPPLICATIONS then all the names of the program groups in the
Start Menu\Programs menu would be returned.
getProgramGroups in class ShortcutuserType - the type of user for the program group set.
Vector of String objects that represent the names of the
existing program groups. It is theoretically possible that this list is empty.Shortcut.APPLICATIONS,
Shortcut.START_MENUpublic String getProgramsFolder(int current_user)
Shortcut
getProgramsFolder in class Shortcutcurrent_user - one of current or all
public boolean multipleUsers()
multipleUsers in class ShortcutShortcut.multipleUsers()
public void save()
throws Exception
save in class ShortcutException - error occuredShortcut.save()public void execPostAction()
execPostAction in class Shortcutpublic String getWrittenFileName()
public void setArguments(String args)
Shortcut
setArguments in class Shortcutargs - the command line argumentspublic void setCategories(String theCategories)
Shortcut
setCategories in class ShortcuttheCategories - the categoriespublic void setDescription(String description)
Shortcut
setDescription in class Shortcutdescription - the descriptiojn stringpublic void setEncoding(String aEncoding)
Shortcut
setEncoding in class Shortcutpublic void setKdeSubstUID(String trueFalseOrNothing)
Shortcut
setKdeSubstUID in class ShortcuttrueFalseOrNothing - exactly "true" or "false" or nothingpublic void setKdeUserName(String aUserName)
Shortcut
setKdeUserName in class ShortcutaUserName - The UserName
public void setIconLocation(String path,
int index)
Shortcut
setIconLocation in class Shortcutpath - a fully qualified file name of a file that contains the icon.index - the index of the specific icon to use in the file. If there is only one icon in
the file, use an index of 0.public String getIconLocation()
Shortcut
getIconLocation in class Shortcutpublic void setLinkName(String aName)
Shortcut
setLinkName in class ShortcutaName - The name that the link should display on a menu or on the desktop. Do not include
a file extension.
public void setLinkType(int aType)
throws IllegalArgumentException,
UnsupportedEncodingException
Shortcut
setLinkType in class ShortcutaType - The type of link desired. The following values can be set:IllegalArgumentException - if an an invalid type is passed
UnsupportedEncodingExceptionpublic int getLinkType()
Shortcut
getLinkType in class Shortcutpublic void setMimetype(String aMimeType)
Shortcut
setMimetype in class Shortcutpublic void setProgramGroup(String aGroupName)
Shortcut
setProgramGroup in class ShortcutaGroupName - the name of the program grouppublic void setShowCommand(int show)
ShortcutHIDE will cause the target window not to show at all. There is not even a
button on the taskbar. This is a very useful setting when batch files are used to launch a
Java application as it will then appear to run just like any native Windows application.
setShowCommand in class Shortcutshow - the show command. Valid settings are: Shortcut.getShowCommand()public void setTargetPath(String aPath)
Shortcut
setTargetPath in class ShortcutaPath - the fully qualified file name of the targetpublic void setUserType(int aUserType)
Shortcut
setUserType in class ShortcutaUserType - the type of user for the link.Shortcut.CURRENT_USER,
Shortcut.ALL_USERSpublic int getUserType()
Shortcut
getUserType in class ShortcutShortcut.CURRENT_USER,
Shortcut.ALL_USERSpublic void setWorkingDirectory(String aDirectory)
Shortcut
setWorkingDirectory in class ShortcutaDirectory - the working directorypublic void setTerminal(String trueFalseOrNothing)
Shortcut
setTerminal in class Shortcutpublic void setTerminalOptions(String someTerminalOptions)
Shortcut
setTerminalOptions in class Shortcutpublic void setTryExec(String aTryExec)
Shortcut
setTryExec in class ShortcutaTryExec - the try exec commandpublic void setType(String aType)
Shortcut
setType in class Shortcutpublic void setURL(String anUrl)
Shortcut
setURL in class Shortcutpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||