|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.izforge.izpack.panels.shortcut.ShortcutPanelLogic
public class ShortcutPanelLogic
This class implements a the logic for the creation of shortcuts. The logic is used in the ShortcutPanel, ShortcutPanelAutomationHelper.
| Constructor Summary | |
|---|---|
ShortcutPanelLogic(InstallData installData,
Resources resources,
UninstallData uninstallData,
Housekeeper housekeeper,
TargetFactory factory,
InstallerListeners listeners,
PlatformModelMatcher matcher)
Constructs a ShortcutPanelLogic. |
|
| Method Summary | |
|---|---|
boolean |
allowProgramGroup()
|
boolean |
canCreateShortcuts()
If specifications were valid than we can create shortcuts. |
void |
cleanUp()
Called by Housekeeper to cleanup after installation. |
void |
createAndRegisterShortcuts()
Creates the shortcuts |
List<IXMLElement> |
getAutoinstallXMLData(IXMLElement panelRoot)
|
String |
getCreateDesktopShortcutsPrompt()
Helper to return a prompt to create desktop shortcuts. |
String |
getCreateForAllUsersPrompt()
|
String |
getCreateForCurrentUserPrompt()
|
String |
getCreateForUserPrompt()
|
String |
getCreateShortcutsPrompt()
Helper to format a message to create shortcuts for the current platform. |
String |
getCreateStartupShortcutsPrompt()
|
Vector<String> |
getDefaultGroup()
|
List<String> |
getProgramGroups(int user)
|
File |
getProgramsFolder(int user)
Returns the ProgramsFolder for the current User |
String |
getSuggestedProgramGroup()
|
List<String> |
getTargets()
|
int |
getUserType()
|
boolean |
hasDesktopShortcuts()
|
boolean |
hasStartupShortcuts()
|
boolean |
initUserType()
Initialises the user type. |
boolean |
isCreateShortcutsImmediately()
|
boolean |
isDefaultCurrentUserFlag()
|
boolean |
isDesktopShortcutCheckboxSelected()
Determines if the desktop shortcut checkbox is enabled. |
boolean |
isPreviousDisabled()
|
boolean |
isStartupShortcutCheckboxSelected()
|
boolean |
isSupported()
|
boolean |
isSupportingMultipleUsers()
|
void |
refreshShortcutData()
Refresh the shortcut data. |
void |
saveToFile(File file)
This method saves all shortcut information to a text file. |
void |
setAutoinstallXMLData(IXMLElement panelRoot)
Reads the xml content for automated installations. |
void |
setCreateDesktopShortcuts(boolean createDesktopShortcuts)
|
void |
setCreateMenuShortcuts(boolean createMenuShortcuts)
|
void |
setCreateStartupShortcuts(boolean createStartupShortcuts)
|
void |
setGroupName(String groupName)
|
void |
setPlatform(Platform platform)
Shortcut Panel should know what platform it is dealing with. |
void |
setSuggestedProgramGroup(String suggestedProgramGroup)
|
void |
setUserType(int userType)
|
boolean |
skipIfNotSupported()
|
String |
verifyProgramGroup(String groupName)
Validate that groupName is a valid directory path |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ShortcutPanelLogic(InstallData installData,
Resources resources,
UninstallData uninstallData,
Housekeeper housekeeper,
TargetFactory factory,
InstallerListeners listeners,
PlatformModelMatcher matcher)
throws Exception
installData - the installation dataresources - the resourcesuninstallData - the uninstallation datahousekeeper - the house keeperfactory - the factory for platform-specific implementationsmatcher - the platform-model matcher
Exception - for any error| Method Detail |
|---|
public void refreshShortcutData()
throws Exception
Exception - an error occurredpublic void createAndRegisterShortcuts()
public List<String> getProgramGroups(int user)
user - type of the user Shortcut.ALL_USERS or Shortcut.CURRENT_USER
public Vector<String> getDefaultGroup()
public File getProgramsFolder(int user)
user - type of the user Shortcut.ALL_USERS or Shortcut.CURRENT_USER
public String getSuggestedProgramGroup()
public void setSuggestedProgramGroup(String suggestedProgramGroup)
suggestedProgramGroup - name of the suggested program grouppublic List<String> getTargets()
public int getUserType()
public List<IXMLElement> getAutoinstallXMLData(IXMLElement panelRoot)
panelRoot - root element
public void setAutoinstallXMLData(IXMLElement panelRoot)
panelRoot - specifies the xml elemnt for this panelpublic final boolean isDefaultCurrentUserFlag()
true if current user is the default for the panel otherwise
falsepublic boolean hasDesktopShortcuts()
true if we have desktop shortcuts in the spec otherwise
falsepublic boolean hasStartupShortcuts()
public void setCreateDesktopShortcuts(boolean createDesktopShortcuts)
createDesktopShortcuts - flagpublic void setCreateStartupShortcuts(boolean createStartupShortcuts)
public final void setCreateMenuShortcuts(boolean createMenuShortcuts)
createMenuShortcuts - public boolean skipIfNotSupported()
true if we skip shortcut panel and shortcut creation if this is not
supported on the current OS otherwise falsepublic boolean isPreviousDisabled()
true if previous nav button is disabled otherwise falsepublic boolean isSupported()
true if shortcut creation is supported otherwise falsepublic boolean isSupportingMultipleUsers()
true if we support multiple users otherwise falsepublic void cleanUp()
Housekeeper to cleanup after installation.
cleanUp in interface CleanupClientpublic void saveToFile(File file)
file - to save the information topublic void setGroupName(String groupName)
groupName - Name of the group where the shortcuts are placed inpublic void setUserType(int userType)
userType - Shortcut.CURRENT_USER Shortcut.ALL_USERSpublic boolean initUserType()
true if the current user has permissions to write to the All Users programs folder.public boolean isDesktopShortcutCheckboxSelected()
true if the desktop shortcut checkbox is enabledpublic boolean isStartupShortcutCheckboxSelected()
public String getCreateShortcutsPrompt()
public String getCreateDesktopShortcutsPrompt()
public String getCreateStartupShortcutsPrompt()
public String getCreateForUserPrompt()
public String getCreateForAllUsersPrompt()
public String getCreateForCurrentUserPrompt()
public String verifyProgramGroup(String groupName)
groupName -
public final boolean isCreateShortcutsImmediately()
true it the shortcuts will be created after clicking next,
otherwise falsepublic void setPlatform(Platform platform)
platform - public boolean canCreateShortcuts()
public boolean allowProgramGroup()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||