Interface ApprovalFlow
- All Superinterfaces:
BaseResource
Example to create an instance using the builder pattern
ApprovalFlow approvalFlow = ApprovalFlow.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.order(orderBuilder -> orderBuilder)
.businessUnit(businessUnitBuilder -> businessUnitBuilder)
.plusRules(rulesBuilder -> rulesBuilder)
.status(ApprovalFlowStatus.PENDING)
.plusApprovals(approvalsBuilder -> approvalsBuilder)
.plusEligibleApprovers(eligibleApproversBuilder -> eligibleApproversBuilder)
.plusPendingApprovers(pendingApproversBuilder -> pendingApproversBuilder)
.plusCurrentTierPendingApprovers(currentTierPendingApproversBuilder -> currentTierPendingApproversBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ApprovalFlowBuilder
builder()
builder factory method for ApprovalFlowstatic ApprovalFlowBuilder
builder
(ApprovalFlow template) create builder for ApprovalFlow instancestatic ApprovalFlow
deepCopy
(ApprovalFlow template) factory method to create a deep copy of ApprovalFlow@NotNull @Valid List<ApprovalFlowApproval>
Existing approvals in the Approval Flow.@NotNull @Valid BusinessUnitKeyReference
Business Unit the Approval Flow belongs to.@NotNull ZonedDateTime
Date and time (UTC) the Approval Flow was initially created.@Valid CreatedBy
IDs and references that created the ApprovalFlow.@NotNull @Valid List<RuleApprover>
Associate Roles required for approval based on the approver hierarchy tiers defined inrules
only for the currently active tier(s).@Valid CustomFields
Custom Fields on the Approval Flow.@NotNull @Valid List<RuleApprover>
Associate Roles that can approve according to the approver hierarchy tiers defined inrules
.@NotNull String
getId()
Unique identifier of the Approval Flow.@NotNull ZonedDateTime
Date and time (UTC) the Approval Flow was last updated.@Valid LastModifiedBy
IDs and references that last modified the ApprovalFlow.@NotNull @Valid OrderReference
getOrder()
Order that needs to be approved.@NotNull @Valid List<RuleApprover>
Associate Roles required for approval based on the approver hierarchy tiers defined inrules
across all remaining tiers.@Valid ApprovalFlowRejection
Present when the status of the Approval Flow isRejected
.@NotNull @Valid List<ApprovalRule>
getRules()
Approval Rules that matched the Order.@NotNull ApprovalFlowStatus
Indicates whether the Approval Flow is under review, approved, or rejected.@NotNull Long
Current version of the Approval Flow.static ApprovalFlow
of()
factory methodstatic ApprovalFlow
of
(ApprovalFlow template) factory method to create a shallow copy ApprovalFlowvoid
setApprovals
(ApprovalFlowApproval... approvals) Existing approvals in the Approval Flow.void
setApprovals
(List<ApprovalFlowApproval> approvals) Existing approvals in the Approval Flow.void
setBusinessUnit
(BusinessUnitKeyReference businessUnit) Business Unit the Approval Flow belongs to.void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the Approval Flow was initially created.void
setCreatedBy
(CreatedBy createdBy) IDs and references that created the ApprovalFlow.void
setCurrentTierPendingApprovers
(RuleApprover... currentTierPendingApprovers) Associate Roles required for approval based on the approver hierarchy tiers defined inrules
only for the currently active tier(s).void
setCurrentTierPendingApprovers
(List<RuleApprover> currentTierPendingApprovers) Associate Roles required for approval based on the approver hierarchy tiers defined inrules
only for the currently active tier(s).void
setCustom
(CustomFields custom) Custom Fields on the Approval Flow.void
setEligibleApprovers
(RuleApprover... eligibleApprovers) Associate Roles that can approve according to the approver hierarchy tiers defined inrules
.void
setEligibleApprovers
(List<RuleApprover> eligibleApprovers) Associate Roles that can approve according to the approver hierarchy tiers defined inrules
.void
Unique identifier of the Approval Flow.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Approval Flow was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the ApprovalFlow.void
setOrder
(OrderReference order) Order that needs to be approved.void
setPendingApprovers
(RuleApprover... pendingApprovers) Associate Roles required for approval based on the approver hierarchy tiers defined inrules
across all remaining tiers.void
setPendingApprovers
(List<RuleApprover> pendingApprovers) Associate Roles required for approval based on the approver hierarchy tiers defined inrules
across all remaining tiers.void
setRejection
(ApprovalFlowRejection rejection) Present when the status of the Approval Flow isRejected
.void
setRules
(ApprovalRule... rules) Approval Rules that matched the Order.void
setRules
(List<ApprovalRule> rules) Approval Rules that matched the Order.void
setStatus
(ApprovalFlowStatus status) Indicates whether the Approval Flow is under review, approved, or rejected.void
setVersion
(Long version) Current version of the Approval Flow.static com.fasterxml.jackson.core.type.TypeReference<ApprovalFlow>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withApprovalFlow
(Function<ApprovalFlow, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
-
Method Details
-
getId
Unique identifier of the Approval Flow.
- Specified by:
getId
in interfaceBaseResource
- Returns:
- id
-
getVersion
Current version of the Approval Flow.
- Specified by:
getVersion
in interfaceBaseResource
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Approval Flow was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getCreatedBy
IDs and references that created the ApprovalFlow.
- Returns:
- createdBy
-
getLastModifiedAt
Date and time (UTC) the Approval Flow was last updated.
- Specified by:
getLastModifiedAt
in interfaceBaseResource
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the ApprovalFlow.
- Returns:
- lastModifiedBy
-
getOrder
Order that needs to be approved.
- Returns:
- order
-
getBusinessUnit
Business Unit the Approval Flow belongs to.
- Returns:
- businessUnit
-
getRules
Approval Rules that matched the Order.
- Returns:
- rules
-
getStatus
Indicates whether the Approval Flow is under review, approved, or rejected.
- Returns:
- status
-
getRejection
Present when the status of the Approval Flow is
Rejected
.- Returns:
- rejection
-
getApprovals
Existing approvals in the Approval Flow.
- Returns:
- approvals
-
getEligibleApprovers
Associate Roles that can approve according to the approver hierarchy tiers defined in
rules
. Associates are allowed to reject even after they have given approval, as long as the current approver hierarchy tier still contains their role.- Returns:
- eligibleApprovers
-
getPendingApprovers
Associate Roles required for approval based on the approver hierarchy tiers defined in
rules
across all remaining tiers.- Returns:
- pendingApprovers
-
getCurrentTierPendingApprovers
Associate Roles required for approval based on the approver hierarchy tiers defined in
rules
only for the currently active tier(s).- Returns:
- currentTierPendingApprovers
-
getCustom
Custom Fields on the Approval Flow.
- Returns:
- custom
-
setId
Unique identifier of the Approval Flow.
- Specified by:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the Approval Flow.
- Specified by:
setVersion
in interfaceBaseResource
- Parameters:
version
- value to be set
-
setCreatedAt
Date and time (UTC) the Approval Flow was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setCreatedBy
IDs and references that created the ApprovalFlow.
- Parameters:
createdBy
- value to be set
-
setLastModifiedAt
Date and time (UTC) the Approval Flow was last updated.
- Specified by:
setLastModifiedAt
in interfaceBaseResource
- Parameters:
lastModifiedAt
- value to be set
-
setLastModifiedBy
IDs and references that last modified the ApprovalFlow.
- Parameters:
lastModifiedBy
- value to be set
-
setOrder
Order that needs to be approved.
- Parameters:
order
- value to be set
-
setBusinessUnit
Business Unit the Approval Flow belongs to.
- Parameters:
businessUnit
- value to be set
-
setRules
Approval Rules that matched the Order.
- Parameters:
rules
- values to be set
-
setRules
Approval Rules that matched the Order.
- Parameters:
rules
- values to be set
-
setStatus
Indicates whether the Approval Flow is under review, approved, or rejected.
- Parameters:
status
- value to be set
-
setRejection
Present when the status of the Approval Flow is
Rejected
.- Parameters:
rejection
- value to be set
-
setApprovals
Existing approvals in the Approval Flow.
- Parameters:
approvals
- values to be set
-
setApprovals
Existing approvals in the Approval Flow.
- Parameters:
approvals
- values to be set
-
setEligibleApprovers
Associate Roles that can approve according to the approver hierarchy tiers defined in
rules
. Associates are allowed to reject even after they have given approval, as long as the current approver hierarchy tier still contains their role.- Parameters:
eligibleApprovers
- values to be set
-
setEligibleApprovers
Associate Roles that can approve according to the approver hierarchy tiers defined in
rules
. Associates are allowed to reject even after they have given approval, as long as the current approver hierarchy tier still contains their role.- Parameters:
eligibleApprovers
- values to be set
-
setPendingApprovers
Associate Roles required for approval based on the approver hierarchy tiers defined in
rules
across all remaining tiers.- Parameters:
pendingApprovers
- values to be set
-
setPendingApprovers
Associate Roles required for approval based on the approver hierarchy tiers defined in
rules
across all remaining tiers.- Parameters:
pendingApprovers
- values to be set
-
setCurrentTierPendingApprovers
Associate Roles required for approval based on the approver hierarchy tiers defined in
rules
only for the currently active tier(s).- Parameters:
currentTierPendingApprovers
- values to be set
-
setCurrentTierPendingApprovers
Associate Roles required for approval based on the approver hierarchy tiers defined in
rules
only for the currently active tier(s).- Parameters:
currentTierPendingApprovers
- values to be set
-
setCustom
Custom Fields on the Approval Flow.
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of ApprovalFlow
-
of
factory method to create a shallow copy ApprovalFlow- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ApprovalFlow- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ApprovalFlow- Returns:
- builder
-
builder
create builder for ApprovalFlow instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withApprovalFlow
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-