public ApprovalSchemaExecutionInformationType clone() { ApprovalSchemaExecutionInformationType object = new ApprovalSchemaExecutionInformationType(); PrismContainerValue value = asPrismContainerValue().clone(); object.setupContainerValue(value); return object; }
public List<ApprovalStageExecutionInformationType> createStageList() { PrismForJAXBUtil.createContainer(asPrismContainerValue(), F_STAGE); return getStage(); }
public ApprovalSchemaExecutionInformationType currentStageNumber(Integer value) { setCurrentStageNumber(value); return this; }
@NotNull private ApprovalSchemaExecutionInformationType getApprovalSchemaExecutionInformation(TaskType wfTask, boolean purePreview, Task opTask, OperationResult result) { ApprovalSchemaExecutionInformationType rv = new ApprovalSchemaExecutionInformationType(prismContext); rv.setTaskRef(ObjectTypeUtil.createObjectRefWithFullObject(wfTask, prismContext)); WfContextType wfc = wfTask.getWorkflowContext(); if (wfc == null) { return rv; rv.setCurrentStageNumber(wfc.getStageNumber()); Integer currentStageNumber = !purePreview ? wfc.getStageNumber() : 0; if (currentStageNumber == null) { stageExecution.setExecutionPreview(createStageExecutionPreview(wfc, wfTask.getChannel(), stageDef, opTask, result)); rv.getStage().add(stageExecution); rv.setPolicyRules(itemApprovalState.getPolicyRules().clone());
/** * Create an instance of {@link ApprovalSchemaExecutionInformationType } * */ public ApprovalSchemaExecutionInformationType createApprovalSchemaExecutionInformationType() { return new ApprovalSchemaExecutionInformationType(); }
ApprovalSchemaExecutionInformationType found = null; for (ApprovalSchemaExecutionInformationType info : infos) { assertNotNull("No taskRef", info.getTaskRef()); PrismObject object = info.getTaskRef().asReferenceValue().getObject(); assertNotNull("No task in taskRef", object); WfContextType wfc = ((TaskType) object.asObjectable()).getWorkflowContext(); String taskName = getOrig(found.getTaskRef().getTargetName()); assertEquals("Wrong # of stage info in " + taskName, expectedStagePreviews.length, found.getStage().size()); for (int i = 0; i < expectedStagePreviews.length; i++) { ExpectedStagePreview expectedStagePreview = expectedStagePreviews[i]; ApprovalStageExecutionInformationType stagePreview = found.getStage().get(i); String pos = taskName + "/" + (i + 1); assertNotNull("no stage definition at " + pos, stagePreview.getDefinition());
public ApprovalSchemaExecutionInformationType stage(ApprovalStageExecutionInformationType value) { getStage().add(value); return this; }
@Override public boolean equals(Object object) { if (!(object instanceof ApprovalSchemaExecutionInformationType)) { return false; } ApprovalSchemaExecutionInformationType other = ((ApprovalSchemaExecutionInformationType) object); return asPrismContainerValue().equivalent(other.asPrismContainerValue()); }
public static WfContextType getWorkflowContext(ApprovalSchemaExecutionInformationType info) { if (info == null || info.getTaskRef() == null || info.getTaskRef().asReferenceValue().getObject() == null) { return null; } @SuppressWarnings({ "unchecked", "raw" }) PrismObject<TaskType> task = info.getTaskRef().asReferenceValue().getObject(); return task.asObjectable().getWorkflowContext(); }
public ApprovalSchemaExecutionInformationType taskRef(ObjectReferenceType value) { setTaskRef(value); return this; }
public ApprovalSchemaExecutionInformationType policyRules(SchemaAttachedPolicyRulesType value) { setPolicyRules(value); return this; }
/** * Create an instance of {@link ApprovalSchemaExecutionInformationType } * */ public ApprovalSchemaExecutionInformationType createApprovalSchemaExecutionInformationType() { return new ApprovalSchemaExecutionInformationType(); }
@Override public int hashCode() { return asPrismContainerValue().hashCode(); }
public static String getProcessName(ApprovalSchemaExecutionInformationType info) { return info != null ? getOrig(ObjectTypeUtil.getName(info.getTaskRef())) : null; }
/** * Create an instance of {@link ApprovalSchemaExecutionInformationType } * */ public ApprovalSchemaExecutionInformationType createApprovalSchemaExecutionInformationType() { return new ApprovalSchemaExecutionInformationType(); }
@Override public String toString() { return asPrismContainerValue().toString(); }
@XmlElement(required = true, name = "policyRules") public SchemaAttachedPolicyRulesType getPolicyRules() { return PrismForJAXBUtil.getPropertyValue(asPrismContainerValue(), F_POLICY_RULES, SchemaAttachedPolicyRulesType.class); }
@XmlElement(name = "currentStageNumber") public Integer getCurrentStageNumber() { return PrismForJAXBUtil.getPropertyValue(asPrismContainerValue(), F_CURRENT_STAGE_NUMBER, Integer.class); }
public void setPolicyRules(SchemaAttachedPolicyRulesType value) { PrismForJAXBUtil.setPropertyValue(asPrismContainerValue(), F_POLICY_RULES, value); }
public void setCurrentStageNumber(Integer value) { PrismForJAXBUtil.setPropertyValue(asPrismContainerValue(), F_CURRENT_STAGE_NUMBER, value); }