Class AssociationDesc

java.lang.Object
net.adoptopenjdk.icedteaweb.jnlp.element.information.AssociationDesc

public final class AssociationDesc extends Object
The optional association element is a hint to the JNLP client that it wishes to be registered with the operating system as the primary handler of certain extensions and a certain mime-type. The association element must have the extensions and mime-type attributes, and may contain the two optional sub elements description, and icon.
  • Field Details

    • ASSOCIATION_ELEMENT

      public static final String ASSOCIATION_ELEMENT
      See Also:
    • EXTENSIONS_ATTRIBUTE

      public static final String EXTENSIONS_ATTRIBUTE
      See Also:
    • MIME_TYPE_ATTRIBUTE

      public static final String MIME_TYPE_ATTRIBUTE
      See Also:
    • DESCRIPTION_ELEMENT

      public static final String DESCRIPTION_ELEMENT
      See Also:
    • ICON_ELEMENT

      public static final String ICON_ELEMENT
      See Also:
    • extensions

      private final String[] extensions
      the extensions this application wants to register with
    • mimeType

      private final String mimeType
      the mime type for the association
    • description

      private String description
      A short description of the association.
    • icon

      private IconDesc icon
      The icon can be registered with the operating system as the default icon for items of this mime-type.
  • Constructor Details

  • Method Details

    • getExtensions

      public String[] getExtensions()
      Returns:
      the extensions for this association
    • getMimeType

      public String getMimeType()
      Returns:
      the MIME type for this association
    • getDescription

      public String getDescription()
      Returns:
      the short description of the association
    • getIcon

      public IconDesc getIcon()
      Returns:
      the icon descriptor for this association
    • checkMimeType

      private void checkMimeType(String mimeType) throws ParseException
      Check for valid mimeType
      Parameters:
      mimeType - a mime type
      Throws:
      ParseException - if mimeType is an invalid MIME type