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 ApprovalRuleDraftBuilder
builder()
builder factory method for ApprovalRuleDraftstatic ApprovalRuleDraftBuilder
builder
(ApprovalRuleDraft template) create builder for ApprovalRuleDraft instancestatic ApprovalRuleDraft
deepCopy
(ApprovalRuleDraft template) factory method to create a deep copy of ApprovalRuleDraft@NotNull @Valid ApproverHierarchyDraft
The hierarchy of approvers within the Approval Rule.Description of the Approval Rule.getKey()
User-defined unique identifier of the Approval Rule.@NotNull String
getName()
Name of the Approval Rule.@NotNull String
The 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 ApprovalRuleStatus
Indicates whether the Approval Rule should be matched against Orders or not.static ApprovalRuleDraft
of()
factory methodstatic ApprovalRuleDraft
of
(ApprovalRuleDraft template) factory method to create a shallow copy ApprovalRuleDraftvoid
setApprovers
(ApproverHierarchyDraft approvers) The hierarchy of approvers within the Approval Rule.void
setDescription
(String description) Description of the Approval Rule.void
User-defined unique identifier of the Approval Rule.void
Name of the Approval Rule.void
setPredicate
(String predicate) The predicate describing the Orders the Approval Rule should match against.void
setRequesters
(RuleRequesterDraft... requesters) The Associate Roles customers must hold for their Order to require approval.void
setRequesters
(List<RuleRequesterDraft> requesters) The Associate Roles customers must hold for their Order to require approval.void
setStatus
(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> T
withApprovalRuleDraft
(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
-
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
-