public enum ActionOnFile extends Enum<ActionOnFile>
Enum Constant and Description |
---|
NONE
No action will be performed
|
REMOVE
Removes the file
|
RENAME
Renames the file by adding current timestamp value with "yyyyMMdd_HHmmss"
format before last dot of original file name
|
Modifier and Type | Method and Description |
---|---|
abstract void |
action(URL url)
Action which should be performed on the file
|
static ActionOnFile |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ActionOnFile[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ActionOnFile NONE
public static final ActionOnFile RENAME
Example:
Original file name: "storage-plugins-override.conf"
New file name: "storage-plugins-override-20180703_033354.conf"
public static final ActionOnFile REMOVE
public static ActionOnFile[] values()
for (ActionOnFile c : ActionOnFile.values()) System.out.println(c);
public static ActionOnFile 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 abstract void action(URL url)
url
- the file URLCopyright © 1970 The Apache Software Foundation. All rights reserved.