All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.orders.commands.updateactions.TransitionState Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.orders.commands.updateactions;

import io.sphere.sdk.models.Referenceable;
import io.sphere.sdk.orders.Order;
import io.sphere.sdk.states.State;
import io.sphere.sdk.states.relatedupdateactions.TransitionStateBase;

import javax.annotation.Nullable;

/**
 * Transition to a new state. If there is no state yet, the new state must be an initial state. If the existing state has transitions set, there must be a direct transition to the new state. If transitions is not set, no validation is performed.
 *
 * {@include.example io.sphere.sdk.orders.commands.OrderUpdateCommandTest#transitionState()}
 *
 * @see Order
 * @see io.sphere.sdk.orders.messages.OrderStateTransitionMessage
 *
 */
public class TransitionState extends TransitionStateBase {
    private TransitionState(final @Nullable Referenceable state) {
        super(state);
    }

    public static TransitionState of(final @Nullable Referenceable state) {
        return new TransitionState(state);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy