Enum Class DefaultSubscriptionActionUnavailableReasons
java.lang.Object
java.lang.Enum<DefaultSubscriptionActionUnavailableReasons>
com.broadleafcommerce.subscriptionoperation.domain.enums.DefaultSubscriptionActionUnavailableReasons
- All Implemented Interfaces:
Serializable,Comparable<DefaultSubscriptionActionUnavailableReasons>,Constable
public enum DefaultSubscriptionActionUnavailableReasons
extends Enum<DefaultSubscriptionActionUnavailableReasons>
The default reasons on why an action is unavailable for a
Subscription.- Author:
- Sunny Yu
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA generic reason for something like can't change auto-renewal for subscriptions with multi-year terms.The subscription cannot be cancelled because its cancellation-policy does not allow so.Downgrade is possible for this subscription, but the number of days before which a downgrade is allowed has passed.The subscription is in an incorrect state for the given action.The user doesn't have sufficient permissions to perform the action against this subscription.There is no downgrade available for this subscription.There is no upgrade available for this subscription. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisActionNotAllowed(String reason) static booleanisDowngradeWindowPassed(String reason) static booleanisIncorrectState(String reason) static booleanisInsufficientPermissions(String reason) static booleanisNoDowngradeAvailable(String reason) static booleanisNoUpgradeAvailable(String reason) Returns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSUFFICIENT_PERMISSIONS
The user doesn't have sufficient permissions to perform the action against this subscription. -
NO_UPGRADE_AVAILABLE
There is no upgrade available for this subscription. -
NO_DOWNGRADE_AVAILABLE
There is no downgrade available for this subscription. -
DOWNGRADE_WINDOW_PASSED
Downgrade is possible for this subscription, but the number of days before which a downgrade is allowed has passed. -
ACTION_NOT_ALLOWED
A generic reason for something like can't change auto-renewal for subscriptions with multi-year terms. -
INCORRECT_STATE
The subscription is in an incorrect state for the given action.For example, you can only
DefaultSubscriptionActionType.CANCELan active subscription. -
CANCELLATION_POLICY
The subscription cannot be cancelled because its cancellation-policy does not allow so.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getMessagePath
-
isInsufficientPermissions
-
isNoUpgradeAvailable
-
isNoDowngradeAvailable
-
isDowngradeWindowPassed
-
isActionNotAllowed
-
isIncorrectState
-