Class StateImpl
- All Implemented Interfaces:
BaseResource
,DomainResource<State>
,Identifiable<State>
,Referencable<State>
,ResourceIdentifiable<State>
,State
,StateMixin
,Versioned<State>
,WithKey
,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
true
for States that are an integral part of the Project.Date and time (UTC) the State was initially created.Present on resources created after 1 February 2019 except for events not tracked.Description of the State.getId()
Unique identifier of the State.true
for an initial State, the first State in a workflow.getKey()
User-defined unique identifier of the State.Date and time (UTC) the State was last updated.Present on resources created after 1 February 2019 except for events not tracked.getName()
Name of the State.getRoles()
Roles the State can fulfill for Reviews and Line Items.list of States of the sametype
that the current State can be transitioned to.getType()
Indicates to which resource or object types the State is assigned to.Current version of the State.int
hashCode()
void
setBuiltIn
(Boolean builtIn) true
for States that are an integral part of the Project.void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the State was initially created.void
setCreatedBy
(CreatedBy createdBy) Present on resources created after 1 February 2019 except for events not tracked.void
setDescription
(LocalizedString description) Description of the State.void
Unique identifier of the State.void
setInitial
(Boolean initial) true
for an initial State, the first State in a workflow.void
User-defined unique identifier of the State.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the State was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) Present on resources created after 1 February 2019 except for events not tracked.void
setName
(LocalizedString name) Name of the State.void
setRoles
(StateRoleEnum... roles) Roles the State can fulfill for Reviews and Line Items.void
setRoles
(List<StateRoleEnum> roles) Roles the State can fulfill for Reviews and Line Items.void
setTransitions
(StateReference... transitions) list of States of the sametype
that the current State can be transitioned to.void
setTransitions
(List<StateReference> transitions) list of States of the sametype
that the current State can be transitioned to.void
setType
(StateTypeEnum type) Indicates to which resource or object types the State is assigned to.void
setVersion
(Long version) Current version of the State.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
Methods inherited from interface com.commercetools.api.models.DomainResource
get
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.api.models.state.StateMixin
toReference, toResourceIdentifier
-
Constructor Details
-
StateImpl
public StateImpl()create empty instance
-
-
Method Details
-
getId
Unique identifier of the State.
- Specified by:
getId
in interfaceBaseResource
- Specified by:
getId
in interfaceDomainResource<State>
- Specified by:
getId
in interfaceIdentifiable<State>
- Specified by:
getId
in interfaceState
- Specified by:
getId
in interfaceVersioned<State>
- Returns:
- id
-
getVersion
Current version of the State.
- Specified by:
getVersion
in interfaceBaseResource
- Specified by:
getVersion
in interfaceDomainResource<State>
- Specified by:
getVersion
in interfaceState
- Specified by:
getVersion
in interfaceVersioned<State>
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the State was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Specified by:
getCreatedAt
in interfaceState
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the State was last updated.
- Specified by:
getLastModifiedAt
in interfaceBaseResource
- Specified by:
getLastModifiedAt
in interfaceState
- Returns:
- lastModifiedAt
-
getLastModifiedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Specified by:
getLastModifiedBy
in interfaceState
- Returns:
- lastModifiedBy
-
getCreatedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Specified by:
getCreatedBy
in interfaceState
- Returns:
- createdBy
-
getKey
User-defined unique identifier of the State.
-
getType
Indicates to which resource or object types the State is assigned to.
-
getName
Name of the State.
-
getDescription
Description of the State.
- Specified by:
getDescription
in interfaceState
- Returns:
- description
-
getInitial
true
for an initial State, the first State in a workflow.- Specified by:
getInitial
in interfaceState
- Returns:
- initial
-
getBuiltIn
true
for States that are an integral part of the Project. Those States cannot be deleted and theirkey
cannot be changed.- Specified by:
getBuiltIn
in interfaceState
- Returns:
- builtIn
-
getRoles
Roles the State can fulfill for Reviews and Line Items.
-
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 StateTypeOrderState
and this list contains the reference to the ShippedOrderState
, 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 interfaceState
- Returns:
- transitions
- list of States of the same
-
setId
Description copied from interface:State
Unique identifier of the State.
- Specified by:
setId
in interfaceBaseResource
- Specified by:
setId
in interfaceState
- Parameters:
id
- value to be set
-
setVersion
Description copied from interface:State
Current version of the State.
- Specified by:
setVersion
in interfaceBaseResource
- Specified by:
setVersion
in interfaceState
- Parameters:
version
- value to be set
-
setCreatedAt
Description copied from interface:State
Date and time (UTC) the State was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Specified by:
setCreatedAt
in interfaceState
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Description copied from interface:State
Date and time (UTC) the State was last updated.
- Specified by:
setLastModifiedAt
in interfaceBaseResource
- Specified by:
setLastModifiedAt
in interfaceState
- Parameters:
lastModifiedAt
- value to be set
-
setLastModifiedBy
Description copied from interface:State
Present on resources created after 1 February 2019 except for events not tracked.
- Specified by:
setLastModifiedBy
in interfaceState
- Parameters:
lastModifiedBy
- value to be set
-
setCreatedBy
Description copied from interface:State
Present on resources created after 1 February 2019 except for events not tracked.
- Specified by:
setCreatedBy
in interfaceState
- Parameters:
createdBy
- value to be set
-
setKey
Description copied from interface:State
User-defined unique identifier of the State.
-
setType
Description copied from interface:State
Indicates to which resource or object types the State is assigned to.
-
setName
Description copied from interface:State
Name of the State.
-
setDescription
Description copied from interface:State
Description of the State.
- Specified by:
setDescription
in interfaceState
- Parameters:
description
- value to be set
-
setInitial
Description copied from interface:State
true
for an initial State, the first State in a workflow.- Specified by:
setInitial
in interfaceState
- Parameters:
initial
- value to be set
-
setBuiltIn
Description copied from interface:State
true
for States that are an integral part of the Project. Those States cannot be deleted and theirkey
cannot be changed.- Specified by:
setBuiltIn
in interfaceState
- Parameters:
builtIn
- value to be set
-
setRoles
Description copied from interface:State
Roles the State can fulfill for Reviews and Line Items.
-
setRoles
Description copied from interface:State
Roles the State can fulfill for Reviews and Line Items.
-
setTransitions
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 StateTypeOrderState
and this list contains the reference to the ShippedOrderState
, 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 interfaceState
- Parameters:
transitions
- values to be set
- list of States of the same
-
setTransitions
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 StateTypeOrderState
and this list contains the reference to the ShippedOrderState
, 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 interfaceState
- Parameters:
transitions
- values to be set
- list of States of the same
-
equals
-
hashCode
public int hashCode()
-