Class ShortcutDesc


  • public final class ShortcutDesc
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CREATE_ALWAYS
      Always create a shortcut
      static java.lang.String CREATE_ALWAYS_IF_HINTED
      Create a desktop shortcut without prompting if the jnlp asks for it
      static java.lang.String CREATE_ASK_USER
      Always ask user whether to create a shortcut
      static java.lang.String CREATE_ASK_USER_IF_HINTED
      Ask user whether to create a shortcut but only if jnlp file asks for it
      static java.lang.String CREATE_NEVER
      Never create a shortcut
      static java.lang.String DESKTOP_ELEMENT  
      private boolean install
      The optional install attribute can be used in a shortcut element to describe the application's preference for being considered "installed".
      static java.lang.String INSTALL_ATTRIBUTE  
      private MenuDesc menu
      the menu descriptor based on existence of menu tag if null, then no tag was presented if there is some value, then menu tag was presented depending on value inside MenuDesc, the attribute submenu was/was not presented
      static java.lang.String MENU_ELEMENT  
      private boolean onDesktop
      the application wants to be placed on the desktop based of existence/not existence of desktop tag
      static java.lang.String ONLINE_ATTRIBUTE  
      private boolean requiresOnline
      the application needs to be launched online happily ignored.
      static java.lang.String SHORTCUT_ELEMENT  
    • Constructor Summary

      Constructors 
      Constructor Description
      ShortcutDesc​(boolean requiresOnline, boolean installed, boolean onDesktop)
      Create a new Shortcut descriptor
    • Field Detail

      • SHORTCUT_ELEMENT

        public static final java.lang.String SHORTCUT_ELEMENT
        See Also:
        Constant Field Values
      • ONLINE_ATTRIBUTE

        public static final java.lang.String ONLINE_ATTRIBUTE
        See Also:
        Constant Field Values
      • INSTALL_ATTRIBUTE

        public static final java.lang.String INSTALL_ATTRIBUTE
        See Also:
        Constant Field Values
      • CREATE_NEVER

        public static final java.lang.String CREATE_NEVER
        Never create a shortcut
        See Also:
        Constant Field Values
      • CREATE_ALWAYS

        public static final java.lang.String CREATE_ALWAYS
        Always create a shortcut
        See Also:
        Constant Field Values
      • CREATE_ASK_USER

        public static final java.lang.String CREATE_ASK_USER
        Always ask user whether to create a shortcut
        See Also:
        Constant Field Values
      • CREATE_ASK_USER_IF_HINTED

        public static final java.lang.String CREATE_ASK_USER_IF_HINTED
        Ask user whether to create a shortcut but only if jnlp file asks for it
        See Also:
        Constant Field Values
      • CREATE_ALWAYS_IF_HINTED

        public static final java.lang.String CREATE_ALWAYS_IF_HINTED
        Create a desktop shortcut without prompting if the jnlp asks for it
        See Also:
        Constant Field Values
      • install

        private boolean install
        The optional install attribute can be used in a shortcut element to describe the application's preference for being considered "installed". If the value is "true" the application prefers to be considered installed. The default value of the install attribute is "false". It is up to the JNLP Client to determine how and if applications are treated differently when install="true", and this may vary from platform to platform. For example, a JNLP client on a Windows platforms may add the application to the Windows Add/Remove menu only when install="true" is specified, while making no distinction on unix platforms.
      • onDesktop

        private final boolean onDesktop
        the application wants to be placed on the desktop based of existence/not existence of desktop tag
      • requiresOnline

        private final boolean requiresOnline
        the application needs to be launched online happily ignored. itw is trying to run any app even if it is offline (some apps are enforcing it without sense)
      • menu

        private MenuDesc menu
        the menu descriptor based on existence of menu tag if null, then no tag was presented if there is some value, then menu tag was presented depending on value inside MenuDesc, the attribute submenu was/was not presented
    • Constructor Detail

      • ShortcutDesc

        public ShortcutDesc​(boolean requiresOnline,
                            boolean installed,
                            boolean onDesktop)
        Create a new Shortcut descriptor
        Parameters:
        requiresOnline - whether the shortcut requires connectivity
        installed - the application's preference for being considered installed
        onDesktop - whether the shortcut wants to be placed on the desktop
    • Method Detail

      • isInstall

        public boolean isInstall()
        Returns:
        whether the application prefers being considered installed.
      • isOnline

        public boolean isOnline()
        Returns:
        whether the shortcut requires being online
      • isOnlineValue

        public boolean isOnlineValue()
        For testing purposes. Verify if it have been parsed out correctly.
        Returns:
        whether the shortcut requires being online.
      • onDesktop

        public boolean onDesktop()
        Returns:
        whether the shortcut should be placed on the desktop
      • toMenu

        public boolean toMenu()
        Returns:
        whether the shortcut should be placed to the menus
      • setMenu

        public void setMenu​(MenuDesc menu)
        Add a shortcut to the 'start menu' (whatever that means on gnome/kde/other ...)
        Parameters:
        menu - if/what menu this shortcut should be added to
      • getMenu

        public MenuDesc getMenu()
        Returns:
        the menu this shortcut should be added to
      • deploymentJavawsShortcutToString

        public static java.lang.String deploymentJavawsShortcutToString​(java.lang.String i)