Enum Class DefaultCartStatuses
- All Implemented Interfaces:
CartStatus
,Serializable
,Comparable<DefaultCartStatuses>
,Constable
Cart.getStatus()
.
Cart's usually start as IN_PROCESS
and end as SUBMITTED
or CANCELLED
.- Author:
- Chad Harchar (charchar)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates that theCart
payment requires the payment finalization.Indicates that theCart
payment is sent to the payment gateway but awaiting transaction result.TheCart
has been cancelled either by the customer, a CSR, or an automated process.Represents aCart
which is being managed by a CSR for the customer.TheCart
is in process and can be modified.Represents an anonymousCart
which is primed to be transferred to a user.Used to represent aCart
that has been locked while its transactions requiring reversal are being processed.Deprecated, for removal: This API element is subject to removal in a future version.since 1.8.0, named carts are no longer represented by a status, and instead just means that the cart has a name.Indicates that theCart
had a pending payment but is now failed.Used to represent aCart
that has been rejected.Used to represent aCart
that requires approval.Used to represent aCart
that has been submitted by the customer & the processing of that submission is in progress.Used to represent aCart
that has been submitted by the customer & the processing of that submission has been successfully completed.Represents aCart
which is being managed by an admin in preview mode. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isAwaitingPaymentFinalization
(String cartStatus) static boolean
isAwaitingPaymentResult
(String cartStatus) static boolean
isCancelled
(String cartStatus) static boolean
isCsrOwned
(String cartStatus) static boolean
isInProcess
(String cartStatus) static boolean
isInTransfer
(String cartStatus) static boolean
isLockedForTransactionReversal
(String cartStatus) static boolean
Deprecated, for removal: This API element is subject to removal in a future version.since 1.8.0, named carts are no longer represented by a status, and instead just means that the cart has a name.static boolean
isPaymentResultCheckInProgress
(String cartStatus) static boolean
isPendingPaymentFailed
(String cartStatus) static boolean
isRejected
(String cartStatus) static boolean
isRequiresApproval
(String cartStatus) static boolean
isSingular
(String cartStatus) Deprecated, for removal: This API element is subject to removal in a future version.static boolean
isSubmissionInProgress
(String cartStatus) static boolean
isSubmitted
(String cartStatus) static boolean
static DefaultCartStatuses
Returns the enum constant of this class with the specified name.static DefaultCartStatuses[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface com.broadleafcommerce.cart.client.domain.enums.CartStatus
name
-
Enum Constant Details
-
IN_PROCESS
TheCart
is in process and can be modified.Prior to 1.8.0, there's an expectation of having only one IN_PROCESS cart per user, and having the named carts represented by the
NAMED
status. After 1.8.0, a user can have an unlimited amount of IN_PROCESS carts, and named carts are simply carts with a non-null name. However, a user can only have one default/implicit cart, which out of the box means an IN_PROCESS cart withnull
name. -
REQUIRES_APPROVAL
Used to represent aCart
that requires approval.This is typically used for B2B account carts.
-
REJECTED
Used to represent aCart
that has been rejected.This is typically used for B2B account carts.
-
AWAITING_PAYMENT_RESULT
Indicates that theCart
payment is sent to the payment gateway but awaiting transaction result. Note that if one of the transactions is awaiting result in a multiple-payment scenario, the cart would still have this status. -
AWAITING_PAYMENT_FINALIZATION
Indicates that theCart
payment requires the payment finalization. For example, one or more of the payments require 3D Secure verification. In this case, the customer should be redirected to the external page to finalize the payment. The cart in this status can't be modified. -
PENDING_PAYMENT_FAILED
Indicates that theCart
had a pending payment but is now failed.This can happen when the transaction result is pending during the checkout flow, but later failed from receiving the latest transaction result.
-
PAYMENT_RESULT_CHECK_IN_PROGRESS
-
LOCKED_FOR_TX_REVERSAL
Used to represent aCart
that has been locked while its transactions requiring reversal are being processed. Setting this status is primarily meant to ensure that no other threads are able to simultaneously modify the cart. -
SUBMISSION_IN_PROGRESS
Used to represent aCart
that has been submitted by the customer & the processing of that submission is in progress. While in this status, the cart should be locked from modification by any customer requests. -
SUBMITTED
Used to represent aCart
that has been submitted by the customer & the processing of that submission has been successfully completed. This means that the cart can no longer be modified and is locked in. This also means that the cart should have itsCart.getOrderNumber()
set. -
NAMED
Deprecated, for removal: This API element is subject to removal in a future version.since 1.8.0, named carts are no longer represented by a status, and instead just means that the cart has a name.Represents a wishlist or some other savedCart
. This also usually means that theCart
has itsCart.getName()
set, although not required. -
CANCELLED
TheCart
has been cancelled either by the customer, a CSR, or an automated process. -
CSR_OWNED
Represents aCart
which is being managed by a CSR for the customer. A cart in this status is not visible to the customer. This cart was either created by a CSR or cloned from an existing customer's cart, and can be transferred back as the customer's IN_PROCESS cart. -
IN_TRANSFER
Represents an anonymousCart
which is primed to be transferred to a user. This cart has no other uses prior to being transferred. -
TEST
Represents aCart
which is being managed by an admin in preview mode. This cart cannot be submitted during checkout.
-
-
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
-
isInProcess
-
isRequiresApproval
-
isRejected
-
isAwaitingPaymentResult
-
isAwaitingPaymentFinalization
-
isPendingPaymentFailed
-
isPaymentResultCheckInProgress
-
isLockedForTransactionReversal
-
isSubmissionInProgress
-
isSubmitted
-
isNamed
Deprecated, for removal: This API element is subject to removal in a future version.since 1.8.0, named carts are no longer represented by a status, and instead just means that the cart has a name. -
isCancelled
-
isCsrOwned
-
isInTransfer
-
isTest
-
isSingular
Deprecated, for removal: This API element is subject to removal in a future version.Tells if the given status is "singular", meaning that at most one cart is expected to be in this status for each customer.IMPORTANT:
IN_PROCESS
is not singular following release train 1.8.0-GA. However, it is left in this method for backwards compatibility.- Parameters:
cartStatus
- the cart status to check- Returns:
- true if singular, false otherwise
-