Class ApprovalFlowImpl

java.lang.Object
com.commercetools.api.models.approval_flow.ApprovalFlowImpl
All Implemented Interfaces:
ApprovalFlow, BaseResource, io.vrap.rmf.base.client.ModelBase

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

    • ApprovalFlowImpl

      public ApprovalFlowImpl()
      create empty instance
  • Method Details

    • getId

      public String getId()

      Unique identifier of the Approval Flow.

      Specified by:
      getId in interface ApprovalFlow
      Specified by:
      getId in interface BaseResource
      Returns:
      id
    • getVersion

      public Long getVersion()

      Current version of the Approval Flow.

      Specified by:
      getVersion in interface ApprovalFlow
      Specified by:
      getVersion in interface BaseResource
      Returns:
      version
    • getCreatedAt

      public ZonedDateTime getCreatedAt()

      Date and time (UTC) the Approval Flow was initially created.

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

      public ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the Approval Flow was last updated.

      Specified by:
      getLastModifiedAt in interface ApprovalFlow
      Specified by:
      getLastModifiedAt in interface BaseResource
      Returns:
      lastModifiedAt
    • getCreatedBy

      public CreatedBy getCreatedBy()

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

      Specified by:
      getCreatedBy in interface ApprovalFlow
      Returns:
      createdBy
    • getLastModifiedBy

      public LastModifiedBy getLastModifiedBy()

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

      Specified by:
      getLastModifiedBy in interface ApprovalFlow
      Returns:
      lastModifiedBy
    • getOrder

      public OrderReference getOrder()

      Order that needs to be approved.

      Specified by:
      getOrder in interface ApprovalFlow
      Returns:
      order
    • getBusinessUnit

      public BusinessUnitKeyReference getBusinessUnit()

      Business Unit the Approval Flow belongs to.

      Specified by:
      getBusinessUnit in interface ApprovalFlow
      Returns:
      businessUnit
    • getRules

      public List<ApprovalRule> getRules()

      Approval Rules that matched the Order.

      Specified by:
      getRules in interface ApprovalFlow
      Returns:
      rules
    • getStatus

      public ApprovalFlowStatus getStatus()

      Indicates whether the Approval Flow is under review, approved, or rejected.

      Specified by:
      getStatus in interface ApprovalFlow
      Returns:
      status
    • getRejection

      public ApprovalFlowRejection getRejection()

      Present when the status of the Approval Flow is Rejected.

      Specified by:
      getRejection in interface ApprovalFlow
      Returns:
      rejection
    • getApprovals

      public List<ApprovalFlowApproval> getApprovals()

      Existing approvals in the Approval Flow.

      Specified by:
      getApprovals in interface ApprovalFlow
      Returns:
      approvals
    • getEligibleApprovers

      public List<RuleApprover> 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.

      Specified by:
      getEligibleApprovers in interface ApprovalFlow
      Returns:
      eligibleApprovers
    • getPendingApprovers

      public List<RuleApprover> getPendingApprovers()

      Associate Roles required for approval based on the approver hierarchy tiers defined in rules across all remaining tiers.

      Specified by:
      getPendingApprovers in interface ApprovalFlow
      Returns:
      pendingApprovers
    • getCurrentTierPendingApprovers

      public List<RuleApprover> getCurrentTierPendingApprovers()

      Associate Roles required for approval based on the approver hierarchy tiers defined in rules only for the currently active tier(s).

      Specified by:
      getCurrentTierPendingApprovers in interface ApprovalFlow
      Returns:
      currentTierPendingApprovers
    • getCustom

      public CustomFields getCustom()

      Custom Fields on the Approval Flow.

      Specified by:
      getCustom in interface ApprovalFlow
      Returns:
      custom
    • setId

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

      Unique identifier of the Approval Flow.

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

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

      Current version of the Approval Flow.

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

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

      Date and time (UTC) the Approval Flow was initially created.

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

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

      Date and time (UTC) the Approval Flow was last updated.

      Specified by:
      setLastModifiedAt in interface ApprovalFlow
      Specified by:
      setLastModifiedAt in interface BaseResource
      Parameters:
      lastModifiedAt - value to be set
    • setCreatedBy

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

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

      Specified by:
      setCreatedBy in interface ApprovalFlow
      Parameters:
      createdBy - value to be set
    • setLastModifiedBy

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

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

      Specified by:
      setLastModifiedBy in interface ApprovalFlow
      Parameters:
      lastModifiedBy - value to be set
    • setOrder

      public void setOrder(OrderReference order)
      Description copied from interface: ApprovalFlow

      Order that needs to be approved.

      Specified by:
      setOrder in interface ApprovalFlow
      Parameters:
      order - value to be set
    • setBusinessUnit

      public void setBusinessUnit(BusinessUnitKeyReference businessUnit)
      Description copied from interface: ApprovalFlow

      Business Unit the Approval Flow belongs to.

      Specified by:
      setBusinessUnit in interface ApprovalFlow
      Parameters:
      businessUnit - value to be set
    • setRules

      public void setRules(ApprovalRule... rules)
      Description copied from interface: ApprovalFlow

      Approval Rules that matched the Order.

      Specified by:
      setRules in interface ApprovalFlow
      Parameters:
      rules - values to be set
    • setRules

      public void setRules(List<ApprovalRule> rules)
      Description copied from interface: ApprovalFlow

      Approval Rules that matched the Order.

      Specified by:
      setRules in interface ApprovalFlow
      Parameters:
      rules - values to be set
    • setStatus

      public void setStatus(ApprovalFlowStatus status)
      Description copied from interface: ApprovalFlow

      Indicates whether the Approval Flow is under review, approved, or rejected.

      Specified by:
      setStatus in interface ApprovalFlow
      Parameters:
      status - value to be set
    • setRejection

      public void setRejection(ApprovalFlowRejection rejection)
      Description copied from interface: ApprovalFlow

      Present when the status of the Approval Flow is Rejected.

      Specified by:
      setRejection in interface ApprovalFlow
      Parameters:
      rejection - value to be set
    • setApprovals

      public void setApprovals(ApprovalFlowApproval... approvals)
      Description copied from interface: ApprovalFlow

      Existing approvals in the Approval Flow.

      Specified by:
      setApprovals in interface ApprovalFlow
      Parameters:
      approvals - values to be set
    • setApprovals

      public void setApprovals(List<ApprovalFlowApproval> approvals)
      Description copied from interface: ApprovalFlow

      Existing approvals in the Approval Flow.

      Specified by:
      setApprovals in interface ApprovalFlow
      Parameters:
      approvals - values to be set
    • setEligibleApprovers

      public void setEligibleApprovers(RuleApprover... eligibleApprovers)
      Description copied from interface: ApprovalFlow

      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.

      Specified by:
      setEligibleApprovers in interface ApprovalFlow
      Parameters:
      eligibleApprovers - values to be set
    • setEligibleApprovers

      public void setEligibleApprovers(List<RuleApprover> eligibleApprovers)
      Description copied from interface: ApprovalFlow

      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.

      Specified by:
      setEligibleApprovers in interface ApprovalFlow
      Parameters:
      eligibleApprovers - values to be set
    • setPendingApprovers

      public void setPendingApprovers(RuleApprover... pendingApprovers)
      Description copied from interface: ApprovalFlow

      Associate Roles required for approval based on the approver hierarchy tiers defined in rules across all remaining tiers.

      Specified by:
      setPendingApprovers in interface ApprovalFlow
      Parameters:
      pendingApprovers - values to be set
    • setPendingApprovers

      public void setPendingApprovers(List<RuleApprover> pendingApprovers)
      Description copied from interface: ApprovalFlow

      Associate Roles required for approval based on the approver hierarchy tiers defined in rules across all remaining tiers.

      Specified by:
      setPendingApprovers in interface ApprovalFlow
      Parameters:
      pendingApprovers - values to be set
    • setCurrentTierPendingApprovers

      public void setCurrentTierPendingApprovers(RuleApprover... currentTierPendingApprovers)
      Description copied from interface: ApprovalFlow

      Associate Roles required for approval based on the approver hierarchy tiers defined in rules only for the currently active tier(s).

      Specified by:
      setCurrentTierPendingApprovers in interface ApprovalFlow
      Parameters:
      currentTierPendingApprovers - values to be set
    • setCurrentTierPendingApprovers

      public void setCurrentTierPendingApprovers(List<RuleApprover> currentTierPendingApprovers)
      Description copied from interface: ApprovalFlow

      Associate Roles required for approval based on the approver hierarchy tiers defined in rules only for the currently active tier(s).

      Specified by:
      setCurrentTierPendingApprovers in interface ApprovalFlow
      Parameters:
      currentTierPendingApprovers - values to be set
    • setCustom

      public void setCustom(CustomFields custom)
      Description copied from interface: ApprovalFlow

      Custom Fields on the Approval Flow.

      Specified by:
      setCustom in interface ApprovalFlow
      Parameters:
      custom - value to be set
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object