Class AssociationDesc
- java.lang.Object
-
- net.adoptopenjdk.icedteaweb.jnlp.element.information.AssociationDesc
-
public final class AssociationDesc extends java.lang.ObjectThe 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 Summary
Fields Modifier and Type Field Description static java.lang.StringASSOCIATION_ELEMENTprivate java.lang.StringdescriptionA short description of the association.static java.lang.StringDESCRIPTION_ELEMENTprivate java.lang.String[]extensionsthe extensions this application wants to register withstatic java.lang.StringEXTENSIONS_ATTRIBUTEprivate IconDesciconThe icon can be registered with the operating system as the default icon for items of this mime-type.static java.lang.StringICON_ELEMENTstatic java.lang.StringMIME_TYPE_ATTRIBUTEprivate java.lang.StringmimeTypethe mime type for the association
-
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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcheckMimeType(java.lang.String mimeType)Check for valid mimeTypejava.lang.StringgetDescription()java.lang.String[]getExtensions()IconDescgetIcon()java.lang.StringgetMimeType()
-
-
-
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
-
ICON_ELEMENT
public static final java.lang.String ICON_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 ParseExceptionCheck for valid mimeType- Parameters:
mimeType- a mime type- Throws:
ParseException- if mimeType is an invalid MIME type
-
-