Enum VoucherExtensionPointEvent
- java.lang.Object
-
- java.lang.Enum<VoucherExtensionPointEvent>
-
- org.cyclos.model.system.extensionpoints.VoucherExtensionPointEvent
-
- All Implemented Interfaces:
Serializable,Comparable<VoucherExtensionPointEvent>,ExtensionPointEvent,HasMessageKey
public enum VoucherExtensionPointEvent extends Enum<VoucherExtensionPointEvent> implements ExtensionPointEvent, HasMessageKey
Possible events to be handled by voucher extension points
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BUYA voucher is being bought by a userCANCELA generated voucher is being canceledEXPIREA voucher is being expiredGENERATEA voucher is being generatedREDEEMA voucher is being redeemedTOP_UPA voucher is being topped-upUNBLOCKA blocked voucher is being unblocked
-
Field Summary
Fields Modifier and Type Field Description static StringATTR_AMOUNTScripting attribute: the amount being redeemed or topped-up, only for those eventsstatic StringATTR_PREVIOUS_STATUSScripting attribute: the previous voucher statusstatic StringATTR_REDEEMERScripting attribute: the redeemer user, only for redeemstatic StringATTR_USERScripting attribute: either the user performing the redeem or top-upstatic StringATTR_VOUCHERScripting attribute: the voucher affected
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageKeygetMessageKey()ExtensionPointNaturenature()Returns the nature of this set of eventsstatic VoucherExtensionPointEventvalueOf(String name)Returns the enum constant of this type with the specified name.static VoucherExtensionPointEvent[]values()Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface org.cyclos.model.system.extensionpoints.ExtensionPointEvent
name
-
-
-
-
Enum Constant Detail
-
GENERATE
public static final VoucherExtensionPointEvent GENERATE
A voucher is being generated
-
BUY
public static final VoucherExtensionPointEvent BUY
A voucher is being bought by a user
-
REDEEM
public static final VoucherExtensionPointEvent REDEEM
A voucher is being redeemed
-
TOP_UP
public static final VoucherExtensionPointEvent TOP_UP
A voucher is being topped-up
-
CANCEL
public static final VoucherExtensionPointEvent CANCEL
A generated voucher is being canceled
-
UNBLOCK
public static final VoucherExtensionPointEvent UNBLOCK
A blocked voucher is being unblocked
-
EXPIRE
public static final VoucherExtensionPointEvent EXPIRE
A voucher is being expired
-
-
Field Detail
-
ATTR_VOUCHER
public static final String ATTR_VOUCHER
Scripting attribute: the voucher affected- See Also:
- Constant Field Values
-
ATTR_PREVIOUS_STATUS
public static final String ATTR_PREVIOUS_STATUS
Scripting attribute: the previous voucher status- See Also:
- Constant Field Values
-
ATTR_USER
public static final String ATTR_USER
Scripting attribute: either the user performing the redeem or top-up- See Also:
- Constant Field Values
-
ATTR_REDEEMER
public static final String ATTR_REDEEMER
Scripting attribute: the redeemer user, only for redeem- See Also:
- Constant Field Values
-
ATTR_AMOUNT
public static final String ATTR_AMOUNT
Scripting attribute: the amount being redeemed or topped-up, only for those events- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static VoucherExtensionPointEvent[] 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 (VoucherExtensionPointEvent c : VoucherExtensionPointEvent.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static VoucherExtensionPointEvent 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
-
getMessageKey
public MessageKey getMessageKey()
- Specified by:
getMessageKeyin interfaceHasMessageKey
-
nature
public ExtensionPointNature nature()
Description copied from interface:ExtensionPointEventReturns the nature of this set of events- Specified by:
naturein interfaceExtensionPointEvent
-
-