public class FileTypeDef
extends java.lang.Object
FileTypeUnit
.
Modifier and Type | Field and Description |
---|---|
static int |
APP_EDIT
Mask value: application edit is allowed.
|
static int |
APP_OPEN
Mask value: application open is allowed.
|
boolean |
appedit
Set edit action to application, system otherwise.
|
int |
appmask
Mask value: application open/edit is allowed, use
APP_OPEN , ... |
boolean |
appopen
Set open action to application, system otherwise.
|
java.lang.String |
id
Each file type has a unique identifier.
|
static java.lang.String[] |
IMAGE_MIME_TYPES
The list of image MIME types supported by Commons.
|
java.lang.String |
mime
The MIME type like "image/png".
|
java.lang.String |
pattern
The pattern to recognize file names.
|
int |
type
The type
SuffixFilter.PATTERN_SIMPLE_WITHOUT_CASE , ... |
Constructor and Description |
---|
FileTypeDef()
Constructor method for i18n purposes only.
|
FileTypeDef(java.lang.String id,
java.lang.String pattern,
int type,
java.lang.String mime,
int appmask,
boolean appopen,
boolean appedit)
Init functionality.
|
Modifier and Type | Method and Description |
---|---|
static FileTypeDef |
createConfigZIPTypeDef(java.lang.String id,
int appmask,
boolean appopen,
boolean appedit)
Convenience creator.
|
static FileTypeDef |
createImageBMPTypeDef(java.lang.String id,
int appmask,
boolean appopen,
boolean appedit)
Convenience creator.
|
static FileTypeDef |
createImageGIFTypeDef(java.lang.String id,
int appmask,
boolean appopen,
boolean appedit)
Convenience creator.
|
static FileTypeDef |
createImageJPEGTypeDef(java.lang.String id,
int appmask,
boolean appopen,
boolean appedit)
Convenience creator.
|
static FileTypeDef |
createImagePNGTypeDef(java.lang.String id,
int appmask,
boolean appopen,
boolean appedit)
Convenience creator.
|
static FileTypeDef |
createImageWBMPTypeDef(java.lang.String id,
int appmask,
boolean appopen,
boolean appedit)
Convenience creator.
|
static FileTypeDef |
createLicensePGPTypeDef(java.lang.String id,
int appmask,
boolean appopen,
boolean appedit)
Convenience creator.
|
static FileTypeDef |
createPGPKeyringTypeDef(java.lang.String id,
int appmask,
boolean appopen,
boolean appedit)
Convenience creator.
|
boolean |
equals(FileTypeDef tocheck)
Checks wether a given
FileTypeDef instance is equal to this. |
java.lang.String |
toString()
Overrides method
java.lang.Object.toString . |
public static final int APP_OPEN
public static final int APP_EDIT
public static final java.lang.String[] IMAGE_MIME_TYPES
public java.lang.String id
public java.lang.String pattern
public int type
SuffixFilter.PATTERN_SIMPLE_WITHOUT_CASE
, ...public java.lang.String mime
public int appmask
APP_OPEN
, ...public boolean appopen
public boolean appedit
public FileTypeDef() throws java.lang.InstantiationException
I18NExtractor
).
java.lang.InstantiationException
- Error indicationpublic FileTypeDef(java.lang.String id, java.lang.String pattern, int type, java.lang.String mime, int appmask, boolean appopen, boolean appedit)
id
- Each file type has a unique identifier (required)pattern
- The pattern to recognize file names (required)type
- The type SuffixFilter.PATTERN_SIMPLE_WITHOUT_CASE
, ... (required)mime
- The MIME type like "image/png" (optional)appmask
- Mask value: application open/edit is allowed, use APP_OPEN
, ...appopen
- Set open action to application, system otherwiseappedit
- Set edit action to application, system otherwisejava.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If a parameter is invalidpublic java.lang.String toString()
java.lang.Object.toString
.
toString
in class java.lang.Object
public boolean equals(FileTypeDef tocheck)
FileTypeDef
instance is equal to this.
tocheck
- Instance to be checkedFileTypeDef
instance to check for equalitypublic static FileTypeDef createConfigZIPTypeDef(java.lang.String id, int appmask, boolean appopen, boolean appedit)
id
- The definition identifierappmask
- Mask value: application open/edit is allowed, use APP_OPEN
, ... (required)appopen
- Application supports opening such files?appedit
- Application supports editing such files?FileTypeDef
instancejava.lang.NullPointerException
- If a parameter is null
public static FileTypeDef createLicensePGPTypeDef(java.lang.String id, int appmask, boolean appopen, boolean appedit)
id
- The definition identifierappmask
- Mask value: application open/edit is allowed, use APP_OPEN
, ... (required)appopen
- Application supports opening such files?appedit
- Application supports editing such files?FileTypeDef
instancejava.lang.NullPointerException
- If a parameter is null
public static FileTypeDef createImageBMPTypeDef(java.lang.String id, int appmask, boolean appopen, boolean appedit)
id
- The definition identifierappmask
- Mask value: application open/edit is allowed, use APP_OPEN
, ... (required)appopen
- Application supports opening such files?appedit
- Application supports editing such files?FileTypeDef
instancejava.lang.NullPointerException
- If a parameter is null
public static FileTypeDef createImageJPEGTypeDef(java.lang.String id, int appmask, boolean appopen, boolean appedit)
id
- The definition identifierappmask
- Mask value: application open/edit is allowed, use APP_OPEN
, ... (required)appopen
- Application supports opening such files?appedit
- Application supports editing such files?FileTypeDef
instancejava.lang.NullPointerException
- If a parameter is null
public static FileTypeDef createImageWBMPTypeDef(java.lang.String id, int appmask, boolean appopen, boolean appedit)
id
- The definition identifierappmask
- Mask value: application open/edit is allowed, use APP_OPEN
, ... (required)appopen
- Application supports opening such files?appedit
- Application supports editing such files?FileTypeDef
instancejava.lang.NullPointerException
- If a parameter is null
public static FileTypeDef createImagePNGTypeDef(java.lang.String id, int appmask, boolean appopen, boolean appedit)
id
- The definition identifierappmask
- Mask value: application open/edit is allowed, use APP_OPEN
, ... (required)appopen
- Application supports opening such files?appedit
- Application supports editing such files?FileTypeDef
instancejava.lang.NullPointerException
- If a parameter is null
public static FileTypeDef createImageGIFTypeDef(java.lang.String id, int appmask, boolean appopen, boolean appedit)
id
- The definition identifierappmask
- Mask value: application open/edit is allowed, use APP_OPEN
, ... (required)appopen
- Application supports opening such files?appedit
- Application supports editing such files?FileTypeDef
instancejava.lang.NullPointerException
- If a parameter is null
public static FileTypeDef createPGPKeyringTypeDef(java.lang.String id, int appmask, boolean appopen, boolean appedit)
id
- The definition identifierappmask
- Mask value: application open/edit is allowed, use APP_OPEN
, ... (required)appopen
- Application supports opening such files?appedit
- Application supports editing such files?FileTypeDef
instancejava.lang.NullPointerException
- If a parameter is null
Copyright © 2005-2023 Leisenfels GmbH. All rights reserved.