Enum TrapActionEnum
- java.lang.Object
-
- java.lang.Enum<TrapActionEnum>
-
- dk.netarkivet.harvester.webinterface.TrapActionEnum
-
- All Implemented Interfaces:
Serializable
,Comparable<TrapActionEnum>
public enum TrapActionEnum extends Enum<TrapActionEnum>
Represents the various actions which can be carried out to modify Global Crawler Traps.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACTIVATE
Change an existing list from inactive to active.CREATE_OR_UPDATE
Corresponds to uploading of a global crawler trap list, either as a new list or as an update to an existing list.DEACTIVATE
Change an existing list from active to inactive.DELETE
Action to delete an existing list.NULL_ACTION
Do nothing.READ
Action to download an existing list to browser or file.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract TrapAction
getTrapAction()
Get the concrete TrapAction which can process this request.static TrapActionEnum
valueOf(String name)
Returns the enum constant of this type with the specified name.static TrapActionEnum[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CREATE_OR_UPDATE
public static final TrapActionEnum CREATE_OR_UPDATE
Corresponds to uploading of a global crawler trap list, either as a new list or as an update to an existing list.
-
READ
public static final TrapActionEnum READ
Action to download an existing list to browser or file.
-
DELETE
public static final TrapActionEnum DELETE
Action to delete an existing list.
-
ACTIVATE
public static final TrapActionEnum ACTIVATE
Change an existing list from inactive to active.
-
DEACTIVATE
public static final TrapActionEnum DEACTIVATE
Change an existing list from active to inactive.
-
NULL_ACTION
public static final TrapActionEnum NULL_ACTION
Do nothing. The existence of a null action is an architectural convenience.
-
-
Method Detail
-
values
public static TrapActionEnum[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TrapActionEnum c : TrapActionEnum.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TrapActionEnum valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getTrapAction
public abstract TrapAction getTrapAction()
Get the concrete TrapAction which can process this request.- Returns:
- the correct TrapAction for this request type.
-
-