|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<FileRequirementsEnum> sk.uniba.euromath.editor.widgets.FileRequirementsEnum
public enum FileRequirementsEnum
Constants containing requirements for given file object.
Enum Constant Summary | |
---|---|
MUST_BE_CREATABLE_DIRECTORY
Object must be able to be created as a directory. |
|
MUST_BE_CREATABLE_FILE
Object must be able to be created as a file. |
|
MUST_BE_DIRECTORY
Object must be directory. |
|
MUST_BE_FILE
Object must be file. |
|
OBJECT_MUST_EXIST
Object (file/directory) must exist. |
|
OBJECT_MUST_NOT_EXIST
Object (file/directory) must not exist. |
|
PATH_MUST_EXIST
Path to object (file/directory) must exist. |
|
PATH_MUST_NOT_EXIST
Path to object (file/directory) must not exist. |
Method Summary | |
---|---|
static ValidityMessages |
check(File file,
ValidityMessages current,
Map<FileRequirementsEnum,MessageLevelEnum> flags)
Checks given file against all flags. |
ValidityMessages |
check(File file,
ValidityMessages current,
MessageLevelEnum level)
Checks if given file complies the flag. |
abstract String |
complies(File file,
MessageLevelEnum level)
Checks if given file complies the flag. |
static FileRequirementsEnum |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static FileRequirementsEnum[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final FileRequirementsEnum OBJECT_MUST_EXIST
public static final FileRequirementsEnum OBJECT_MUST_NOT_EXIST
public static final FileRequirementsEnum PATH_MUST_EXIST
public static final FileRequirementsEnum PATH_MUST_NOT_EXIST
public static final FileRequirementsEnum MUST_BE_FILE
public static final FileRequirementsEnum MUST_BE_DIRECTORY
public static final FileRequirementsEnum MUST_BE_CREATABLE_FILE
public static final FileRequirementsEnum MUST_BE_CREATABLE_DIRECTORY
Method Detail |
---|
public static final FileRequirementsEnum[] values()
for(FileRequirementsEnum c : FileRequirementsEnum.values()) System.out.println(c);
public static FileRequirementsEnum valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified namepublic final ValidityMessages check(File file, ValidityMessages current, MessageLevelEnum level)
file
- file to check.current
- current messages object. May be null
.level
- level of message
null
only if
'current' was null and file complies the flag's requirements.public abstract String complies(File file, MessageLevelEnum level)
file
- file to check.level
- the level of compliance, should be used to change error
message: error should result in 'should', warning messages should use
'may' words.
null
only if
'current' was null and file complies the flag's requirements.public static ValidityMessages check(File file, ValidityMessages current, Map<FileRequirementsEnum,MessageLevelEnum> flags)
file
- the file to check.current
- current messages object. May be null
.flags
- maps flags to their message level.
null
only if
'current' was null and file complies the flag's requirements.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |