public enum ResourceType extends Enum<ResourceType> implements FilenameFilter
Resource
.Enum Constant and Description |
---|
APPLICATION
The
Application 's application.xml located in the root directory |
ASSET
not yet supported
|
BEANS_XML
The
Application 's beans.xml located in the root directory |
DICTIONARY
|
JAR
|
RESOURCE
The
Application s custom resources, such as .js, .css, .jpg, .png |
SQL
|
TPL
The
Application s custom (non-XSL) template resources |
XML
|
XSL
|
Modifier and Type | Field and Description |
---|---|
static String |
APPLICATION_XML_NAME |
static String |
BEANS_XML_NAME |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(File dir,
String name) |
Set<String> |
getAllowedFileEndings()
Returns an immutable set of all allowed file-endings (without '.')
|
String |
getFolder()
Returns the relative path for this type.
|
boolean |
isValidFileEnding(String fileEnding)
Checks whether the given file-ending is valid for this type.
|
boolean |
isValidFileName(String fileName)
Checks whether the given file-name is valid for this type.
|
boolean |
supportsSubfolders()
Checks whether this type supports subfolders.
|
static ResourceType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ResourceType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ResourceType BEANS_XML
Application
's beans.xml
located in the root directorypublic static final ResourceType JAR
public static final ResourceType XML
public static final ResourceType XSL
public static final ResourceType SQL
public static final ResourceType TPL
Application
s custom (non-XSL) template resourcespublic static final ResourceType RESOURCE
Application
s custom resources, such as .js, .css, .jpg, .pngpublic static final ResourceType ASSET
public static final ResourceType DICTIONARY
public static final ResourceType APPLICATION
Application
's application.xml
located in the root directorypublic static final String BEANS_XML_NAME
public static final String APPLICATION_XML_NAME
public static ResourceType[] values()
for (ResourceType c : ResourceType.values()) System.out.println(c);
public static ResourceType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getFolder()
public boolean supportsSubfolders()
true
if this type supports subfolder, false
otherwisepublic boolean isValidFileEnding(String fileEnding)
fileEnding
- a file-ending, without '.'true
if the given file-ending is valid for this type, false
otherwisepublic boolean isValidFileName(String fileName)
fileName
- the name of the filetrue
if the given file-name is valid for this type, false
otherwisepublic Set<String> getAllowedFileEndings()
public boolean accept(File dir, String name)
accept
in interface FilenameFilter
Copyright © 2011–2019 aiticon GmbH. All rights reserved.