Class StateDraftImpl
- All Implemented Interfaces:
StateDraft
,WithKey
,io.vrap.rmf.base.client.Draft<StateDraft>
,io.vrap.rmf.base.client.ModelBase
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Description of the State.Set tofalse
if the State is not the first step in a workflow.getKey()
User-defined unique identifier for the State.getName()
Name of the State.getRoles()
If suitable, assign predifined roles the State can fulfill in case the State'stype
isLineItemState
orReviewState
.Define the list of States of the sametype
to which the current State can be transitioned to.getType()
Specify to which resource or object type the State is assigned to.int
hashCode()
void
setDescription
(LocalizedString description) Description of the State.void
setInitial
(Boolean initial) Set tofalse
if the State is not the first step in a workflow.void
User-defined unique identifier for the State.void
setName
(LocalizedString name) Name of the State.void
setRoles
(StateRoleEnum... roles) If suitable, assign predifined roles the State can fulfill in case the State'stype
isLineItemState
orReviewState
.void
setRoles
(List<StateRoleEnum> roles) If suitable, assign predifined roles the State can fulfill in case the State'stype
isLineItemState
orReviewState
.void
setTransitions
(StateResourceIdentifier... transitions) Define the list of States of the sametype
to which the current State can be transitioned to.void
setTransitions
(List<StateResourceIdentifier> transitions) Define the list of States of the sametype
to which the current State can be transitioned to.void
setType
(StateTypeEnum type) Specify to which resource or object type the State is assigned to.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.api.models.state.StateDraft
withStateDraft
-
Constructor Details
-
StateDraftImpl
public StateDraftImpl()create empty instance
-
-
Method Details
-
getKey
User-defined unique identifier for the State.
- Specified by:
getKey
in interfaceStateDraft
- Specified by:
getKey
in interfaceWithKey
- Returns:
- key
-
getType
Specify to which resource or object type the State is assigned to.
- Specified by:
getType
in interfaceStateDraft
- Returns:
- type
-
getName
Name of the State.
- Specified by:
getName
in interfaceStateDraft
- Returns:
- name
-
getDescription
Description of the State.
- Specified by:
getDescription
in interfaceStateDraft
- Returns:
- description
-
getInitial
Set to
false
if the State is not the first step in a workflow.- Specified by:
getInitial
in interfaceStateDraft
- Returns:
- initial
-
getRoles
If suitable, assign predifined roles the State can fulfill in case the State's
type
isLineItemState
orReviewState
.- Specified by:
getRoles
in interfaceStateDraft
- Returns:
- roles
-
getTransitions
Define the list of States of the same
type
to which the current State can be transitioned to.- If, for example, the current State is the Initial State of StateType
OrderState
and you want to allow the transition Initial -> Shipped, then add the StateResourceIdentifier to the ShippedOrderState
to this list. - Set to empty list for not allowing any transition from the current State and defining it as final State for a workflow.
- Do not set this field at all to turn off validation and allowing transitions to any other State of the same
type
as the current State.
- Specified by:
getTransitions
in interfaceStateDraft
- Returns:
- transitions
- If, for example, the current State is the Initial State of StateType
-
setKey
Description copied from interface:StateDraft
User-defined unique identifier for the State.
- Specified by:
setKey
in interfaceStateDraft
- Parameters:
key
- value to be set
-
setType
Description copied from interface:StateDraft
Specify to which resource or object type the State is assigned to.
- Specified by:
setType
in interfaceStateDraft
- Parameters:
type
- value to be set
-
setName
Description copied from interface:StateDraft
Name of the State.
- Specified by:
setName
in interfaceStateDraft
- Parameters:
name
- value to be set
-
setDescription
Description copied from interface:StateDraft
Description of the State.
- Specified by:
setDescription
in interfaceStateDraft
- Parameters:
description
- value to be set
-
setInitial
Description copied from interface:StateDraft
Set to
false
if the State is not the first step in a workflow.- Specified by:
setInitial
in interfaceStateDraft
- Parameters:
initial
- value to be set
-
setRoles
Description copied from interface:StateDraft
If suitable, assign predifined roles the State can fulfill in case the State's
type
isLineItemState
orReviewState
.- Specified by:
setRoles
in interfaceStateDraft
- Parameters:
roles
- values to be set
-
setRoles
Description copied from interface:StateDraft
If suitable, assign predifined roles the State can fulfill in case the State's
type
isLineItemState
orReviewState
.- Specified by:
setRoles
in interfaceStateDraft
- Parameters:
roles
- values to be set
-
setTransitions
Description copied from interface:StateDraft
Define the list of States of the same
type
to which the current State can be transitioned to.- If, for example, the current State is the Initial State of StateType
OrderState
and you want to allow the transition Initial -> Shipped, then add the StateResourceIdentifier to the ShippedOrderState
to this list. - Set to empty list for not allowing any transition from the current State and defining it as final State for a workflow.
- Do not set this field at all to turn off validation and allowing transitions to any other State of the same
type
as the current State.
- Specified by:
setTransitions
in interfaceStateDraft
- Parameters:
transitions
- values to be set
- If, for example, the current State is the Initial State of StateType
-
setTransitions
Description copied from interface:StateDraft
Define the list of States of the same
type
to which the current State can be transitioned to.- If, for example, the current State is the Initial State of StateType
OrderState
and you want to allow the transition Initial -> Shipped, then add the StateResourceIdentifier to the ShippedOrderState
to this list. - Set to empty list for not allowing any transition from the current State and defining it as final State for a workflow.
- Do not set this field at all to turn off validation and allowing transitions to any other State of the same
type
as the current State.
- Specified by:
setTransitions
in interfaceStateDraft
- Parameters:
transitions
- values to be set
- If, for example, the current State is the Initial State of StateType
-
equals
-
hashCode
public int hashCode()
-