Interface ApprovalRuleDraft
- All Superinterfaces:
Draft<ApprovalRuleDraft>
Example to create an instance using the builder pattern
ApprovalRuleDraft approvalRuleDraft = ApprovalRuleDraft.builder()
.name("{name}")
.status(ApprovalRuleStatus.ACTIVE)
.predicate("{predicate}")
.approvers(approversBuilder -> approversBuilder)
.plusRequesters(requestersBuilder -> requestersBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ApprovalRuleDraftBuilderbuilder()builder factory method for ApprovalRuleDraftstatic ApprovalRuleDraftBuilderbuilder(ApprovalRuleDraft template) create builder for ApprovalRuleDraft instancecopyDeep()static ApprovalRuleDraftdeepCopy(ApprovalRuleDraft template) factory method to create a deep copy of ApprovalRuleDraft@NotNull @Valid ApproverHierarchyDraftThe hierarchy of approvers within the Approval Rule.Description of the Approval Rule.getKey()User-defined unique identifier of the Approval Rule.@NotNull StringgetName()Name of the Approval Rule.@NotNull StringThe predicate describing the Orders the Approval Rule should match against.@NotNull @Valid List<RuleRequesterDraft>The Associate Roles customers must hold for their Order to require approval.@NotNull ApprovalRuleStatusIndicates whether the Approval Rule should be matched against Orders or not.static ApprovalRuleDraftof()factory methodstatic ApprovalRuleDraftof(ApprovalRuleDraft template) factory method to create a shallow copy ApprovalRuleDraftvoidsetApprovers(ApproverHierarchyDraft approvers) The hierarchy of approvers within the Approval Rule.voidsetDescription(String description) Description of the Approval Rule.voidUser-defined unique identifier of the Approval Rule.voidName of the Approval Rule.voidsetPredicate(String predicate) The predicate describing the Orders the Approval Rule should match against.voidsetRequesters(RuleRequesterDraft... requesters) The Associate Roles customers must hold for their Order to require approval.voidsetRequesters(List<RuleRequesterDraft> requesters) The Associate Roles customers must hold for their Order to require approval.voidsetStatus(ApprovalRuleStatus status) Indicates whether the Approval Rule should be matched against Orders or not.static com.fasterxml.jackson.core.type.TypeReference<ApprovalRuleDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithApprovalRuleDraft(Function<ApprovalRuleDraft, T> helper) accessor map function
-
Method Details
-
getKey
String getKey()User-defined unique identifier of the Approval Rule. Uniqueness is enforced within the Business Unit.
- Returns:
- key
-
getName
Name of the Approval Rule.
- Returns:
- name
-
getDescription
String getDescription()Description of the Approval Rule.
- Returns:
- description
-
getStatus
Indicates whether the Approval Rule should be matched against Orders or not.
- Returns:
- status
-
getPredicate
The predicate describing the Orders the Approval Rule should match against.
- Returns:
- predicate
-
getApprovers
The hierarchy of approvers within the Approval Rule.
- Returns:
- approvers
-
getRequesters
The Associate Roles customers must hold for their Order to require approval.
- Returns:
- requesters
-
setKey
User-defined unique identifier of the Approval Rule. Uniqueness is enforced within the Business Unit.
- Parameters:
key- value to be set
-
setName
Name of the Approval Rule.
- Parameters:
name- value to be set
-
setDescription
Description of the Approval Rule.
- Parameters:
description- value to be set
-
setStatus
Indicates whether the Approval Rule should be matched against Orders or not.
- Parameters:
status- value to be set
-
setPredicate
The predicate describing the Orders the Approval Rule should match against.
- Parameters:
predicate- value to be set
-
setApprovers
The hierarchy of approvers within the Approval Rule.
- Parameters:
approvers- value to be set
-
setRequesters
The Associate Roles customers must hold for their Order to require approval.
- Parameters:
requesters- values to be set
-
setRequesters
The Associate Roles customers must hold for their Order to require approval.
- Parameters:
requesters- values to be set
-
of
factory method- Returns:
- instance of ApprovalRuleDraft
-
of
factory method to create a shallow copy ApprovalRuleDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ApprovalRuleDraft copyDeep() -
deepCopy
factory method to create a deep copy of ApprovalRuleDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ApprovalRuleDraft- Returns:
- builder
-
builder
create builder for ApprovalRuleDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withApprovalRuleDraft
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
-