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 ApprovalFlowBuilderbuilder()builder factory method for ApprovalFlowstatic ApprovalFlowBuilderbuilder(ApprovalFlow template) create builder for ApprovalFlow instancecopyDeep()static ApprovalFlowdeepCopy(ApprovalFlow template) factory method to create a deep copy of ApprovalFlow@NotNull @Valid List<ApprovalFlowApproval>Existing approvals in the Approval Flow.@NotNull @Valid BusinessUnitKeyReferenceBusiness Unit the Approval Flow belongs to.@NotNull ZonedDateTimeDate and time (UTC) the Approval Flow was initially created.@Valid CreatedByIDs and references that created the ApprovalFlow.@NotNull @Valid List<RuleApprover>Associate Roles required for approval based on the approver hierarchy tiers defined inrulesonly for the currently active tier(s).@Valid CustomFieldsCustom Fields on the Approval Flow.@NotNull @Valid List<RuleApprover>Associate Roles that can approve according to the approver hierarchy tiers defined inrules.@NotNull StringgetId()Unique identifier of the Approval Flow.@NotNull ZonedDateTimeDate and time (UTC) the Approval Flow was last updated.@Valid LastModifiedByIDs and references that last modified the ApprovalFlow.@NotNull @Valid OrderReferencegetOrder()Order that needs to be approved.@NotNull @Valid List<RuleApprover>Associate Roles required for approval based on the approver hierarchy tiers defined inrulesacross all remaining tiers.@Valid ApprovalFlowRejectionPresent when the status of the Approval Flow isRejected.@NotNull @Valid List<ApprovalRule>getRules()Approval Rules that matched the Order.@NotNull ApprovalFlowStatusIndicates whether the Approval Flow is under review, approved, or rejected.@NotNull LongCurrent version of the Approval Flow.static ApprovalFlowof()factory methodstatic ApprovalFlowof(ApprovalFlow template) factory method to create a shallow copy ApprovalFlowvoidsetApprovals(ApprovalFlowApproval... approvals) Existing approvals in the Approval Flow.voidsetApprovals(List<ApprovalFlowApproval> approvals) Existing approvals in the Approval Flow.voidsetBusinessUnit(BusinessUnitKeyReference businessUnit) Business Unit the Approval Flow belongs to.voidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the Approval Flow was initially created.voidsetCreatedBy(CreatedBy createdBy) IDs and references that created the ApprovalFlow.voidsetCurrentTierPendingApprovers(RuleApprover... currentTierPendingApprovers) Associate Roles required for approval based on the approver hierarchy tiers defined inrulesonly for the currently active tier(s).voidsetCurrentTierPendingApprovers(List<RuleApprover> currentTierPendingApprovers) Associate Roles required for approval based on the approver hierarchy tiers defined inrulesonly for the currently active tier(s).voidsetCustom(CustomFields custom) Custom Fields on the Approval Flow.voidsetEligibleApprovers(RuleApprover... eligibleApprovers) Associate Roles that can approve according to the approver hierarchy tiers defined inrules.voidsetEligibleApprovers(List<RuleApprover> eligibleApprovers) Associate Roles that can approve according to the approver hierarchy tiers defined inrules.voidUnique identifier of the Approval Flow.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the Approval Flow was last updated.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the ApprovalFlow.voidsetOrder(OrderReference order) Order that needs to be approved.voidsetPendingApprovers(RuleApprover... pendingApprovers) Associate Roles required for approval based on the approver hierarchy tiers defined inrulesacross all remaining tiers.voidsetPendingApprovers(List<RuleApprover> pendingApprovers) Associate Roles required for approval based on the approver hierarchy tiers defined inrulesacross all remaining tiers.voidsetRejection(ApprovalFlowRejection rejection) Present when the status of the Approval Flow isRejected.voidsetRules(ApprovalRule... rules) Approval Rules that matched the Order.voidsetRules(List<ApprovalRule> rules) Approval Rules that matched the Order.voidsetStatus(ApprovalFlowStatus status) Indicates whether the Approval Flow is under review, approved, or rejected.voidsetVersion(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> TwithApprovalFlow(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:
getIdin interfaceBaseResource- Returns:
- id
-
getVersion
Current version of the Approval Flow.
- Specified by:
getVersionin interfaceBaseResource- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Approval Flow was initially created.
- Specified by:
getCreatedAtin 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:
getLastModifiedAtin 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
rulesacross all remaining tiers.- Returns:
- pendingApprovers
-
getCurrentTierPendingApprovers
Associate Roles required for approval based on the approver hierarchy tiers defined in
rulesonly 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:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Current version of the Approval Flow.
- Specified by:
setVersionin interfaceBaseResource- Parameters:
version- value to be set
-
setCreatedAt
Date and time (UTC) the Approval Flow was initially created.
- Specified by:
setCreatedAtin 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:
setLastModifiedAtin 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
rulesacross all remaining tiers.- Parameters:
pendingApprovers- values to be set
-
setPendingApprovers
Associate Roles required for approval based on the approver hierarchy tiers defined in
rulesacross all remaining tiers.- Parameters:
pendingApprovers- values to be set
-
setCurrentTierPendingApprovers
Associate Roles required for approval based on the approver hierarchy tiers defined in
rulesonly 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
rulesonly 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
-
copyDeep
ApprovalFlow copyDeep()- Specified by:
copyDeepin interfaceBaseResource
-
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
-