Class StateImpl

java.lang.Object
com.commercetools.api.models.state.StateImpl
All Implemented Interfaces:
BaseResource, DomainResource<State>, Identifiable<State>, Referencable<State>, ResourceIdentifiable<State>, State, StateMixin, Versioned<State>, WithKey, io.vrap.rmf.base.client.ModelBase

public class StateImpl extends Object implements State, io.vrap.rmf.base.client.ModelBase
State
  • Constructor Details

    • StateImpl

      public StateImpl()
      create empty instance
  • Method Details

    • getId

      public String getId()

      Unique identifier of the State.

      Specified by:
      getId in interface BaseResource
      Specified by:
      getId in interface DomainResource<State>
      Specified by:
      getId in interface Identifiable<State>
      Specified by:
      getId in interface State
      Specified by:
      getId in interface Versioned<State>
      Returns:
      id
    • getVersion

      public Long getVersion()

      Current version of the State.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface DomainResource<State>
      Specified by:
      getVersion in interface State
      Specified by:
      getVersion in interface Versioned<State>
      Returns:
      version
    • getCreatedAt

      Date and time (UTC) the State was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Specified by:
      getCreatedAt in interface State
      Returns:
      createdAt
    • getLastModifiedAt

      Date and time (UTC) the State was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Specified by:
      getLastModifiedAt in interface State
      Returns:
      lastModifiedAt
    • getLastModifiedBy

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      getLastModifiedBy in interface State
      Returns:
      lastModifiedBy
    • getCreatedBy

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      getCreatedBy in interface State
      Returns:
      createdBy
    • getKey

      public String getKey()

      User-defined unique identifier of the State.

      Specified by:
      getKey in interface State
      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getType

      Indicates to which resource or object types the State is assigned to.

      Specified by:
      getType in interface State
      Returns:
      type
    • getName

      Name of the State.

      Specified by:
      getName in interface State
      Returns:
      name
    • getDescription

      Description of the State.

      Specified by:
      getDescription in interface State
      Returns:
      description
    • getInitial

      public Boolean getInitial()

      true for an initial State, the first State in a workflow.

      Specified by:
      getInitial in interface State
      Returns:
      initial
    • getBuiltIn

      public Boolean getBuiltIn()

      true for States that are an integral part of the Project. Those States cannot be deleted and their key cannot be changed.

      Specified by:
      getBuiltIn in interface State
      Returns:
      builtIn
    • getRoles

      Roles the State can fulfill for Reviews and Line Items.

      Specified by:
      getRoles in interface State
      Returns:
      roles
    • getTransitions

      • list of States of the same type that the current State can be transitioned to. For example, when the current State is the Initial State of StateType OrderState and this list contains the reference to the Shipped OrderState, the transition Initial -> Shipped is allowed.
      • if empty, no transitions are allowed from the current State, defining the current State as final for this workflow.
      • if not set, the validation is turned off and the current State can be transitioned to any other State of the same type as the current State.
      Specified by:
      getTransitions in interface State
      Returns:
      transitions
    • setId

      public void setId(String id)
      Description copied from interface: State

      Unique identifier of the State.

      Specified by:
      setId in interface BaseResource
      Specified by:
      setId in interface State
      Parameters:
      id - value to be set
    • setVersion

      public void setVersion(Long version)
      Description copied from interface: State

      Current version of the State.

      Specified by:
      setVersion in interface BaseResource
      Specified by:
      setVersion in interface State
      Parameters:
      version - value to be set
    • setCreatedAt

      public void setCreatedAt(ZonedDateTime createdAt)
      Description copied from interface: State

      Date and time (UTC) the State was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Specified by:
      setCreatedAt in interface State
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      public void setLastModifiedAt(ZonedDateTime lastModifiedAt)
      Description copied from interface: State

      Date and time (UTC) the State was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Specified by:
      setLastModifiedAt in interface State
      Parameters:
      lastModifiedAt - value to be set
    • setLastModifiedBy

      public void setLastModifiedBy(LastModifiedBy lastModifiedBy)
      Description copied from interface: State

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      setLastModifiedBy in interface State
      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      public void setCreatedBy(CreatedBy createdBy)
      Description copied from interface: State

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      setCreatedBy in interface State
      Parameters:
      createdBy - value to be set
    • setKey

      public void setKey(String key)
      Description copied from interface: State

      User-defined unique identifier of the State.

      Specified by:
      setKey in interface State
      Parameters:
      key - value to be set
    • setType

      public void setType(StateTypeEnum type)
      Description copied from interface: State

      Indicates to which resource or object types the State is assigned to.

      Specified by:
      setType in interface State
      Parameters:
      type - value to be set
    • setName

      public void setName(LocalizedString name)
      Description copied from interface: State

      Name of the State.

      Specified by:
      setName in interface State
      Parameters:
      name - value to be set
    • setDescription

      public void setDescription(LocalizedString description)
      Description copied from interface: State

      Description of the State.

      Specified by:
      setDescription in interface State
      Parameters:
      description - value to be set
    • setInitial

      public void setInitial(Boolean initial)
      Description copied from interface: State

      true for an initial State, the first State in a workflow.

      Specified by:
      setInitial in interface State
      Parameters:
      initial - value to be set
    • setBuiltIn

      public void setBuiltIn(Boolean builtIn)
      Description copied from interface: State

      true for States that are an integral part of the Project. Those States cannot be deleted and their key cannot be changed.

      Specified by:
      setBuiltIn in interface State
      Parameters:
      builtIn - value to be set
    • setRoles

      public void setRoles(StateRoleEnum... roles)
      Description copied from interface: State

      Roles the State can fulfill for Reviews and Line Items.

      Specified by:
      setRoles in interface State
      Parameters:
      roles - values to be set
    • setRoles

      public void setRoles(List<StateRoleEnum> roles)
      Description copied from interface: State

      Roles the State can fulfill for Reviews and Line Items.

      Specified by:
      setRoles in interface State
      Parameters:
      roles - values to be set
    • setTransitions

      public void setTransitions(StateReference... transitions)
      Description copied from interface: State
      • list of States of the same type that the current State can be transitioned to. For example, when the current State is the Initial State of StateType OrderState and this list contains the reference to the Shipped OrderState, the transition Initial -> Shipped is allowed.
      • if empty, no transitions are allowed from the current State, defining the current State as final for this workflow.
      • if not set, the validation is turned off and the current State can be transitioned to any other State of the same type as the current State.
      Specified by:
      setTransitions in interface State
      Parameters:
      transitions - values to be set
    • setTransitions

      public void setTransitions(List<StateReference> transitions)
      Description copied from interface: State
      • list of States of the same type that the current State can be transitioned to. For example, when the current State is the Initial State of StateType OrderState and this list contains the reference to the Shipped OrderState, the transition Initial -> Shipped is allowed.
      • if empty, no transitions are allowed from the current State, defining the current State as final for this workflow.
      • if not set, the validation is turned off and the current State can be transitioned to any other State of the same type as the current State.
      Specified by:
      setTransitions in interface State
      Parameters:
      transitions - values to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object