Class AssociationDesc


  • public final class AssociationDesc
    extends java.lang.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.
    • Constructor Summary

      Constructors 
      Constructor Description
      AssociationDesc​(java.lang.String mimeType, java.lang.String[] extensions)  
      AssociationDesc​(java.lang.String mimeType, java.lang.String[] extensions, java.lang.String description, IconDesc icon)  
    • Field Detail

      • ASSOCIATION_ELEMENT

        public static final java.lang.String ASSOCIATION_ELEMENT
        See Also:
        Constant Field Values
      • EXTENSIONS_ATTRIBUTE

        public static final java.lang.String EXTENSIONS_ATTRIBUTE
        See Also:
        Constant Field Values
      • MIME_TYPE_ATTRIBUTE

        public static final java.lang.String MIME_TYPE_ATTRIBUTE
        See Also:
        Constant Field Values
      • DESCRIPTION_ELEMENT

        public static final java.lang.String DESCRIPTION_ELEMENT
        See Also:
        Constant Field Values
      • extensions

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

        private final java.lang.String mimeType
        the mime type for the association
      • description

        private java.lang.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 Detail

      • AssociationDesc

        public AssociationDesc​(java.lang.String mimeType,
                               java.lang.String[] extensions)
                        throws ParseException
        Throws:
        ParseException
      • AssociationDesc

        public AssociationDesc​(java.lang.String mimeType,
                               java.lang.String[] extensions,
                               java.lang.String description,
                               IconDesc icon)
                        throws ParseException
        Throws:
        ParseException
    • Method Detail

      • getExtensions

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

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

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

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

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