Ejemplo n.º 1
0
 @Override
 public ApprovalLevelType toApprovalLevelType(PrismContext prismContext) {
   ApprovalLevelType levelType = new ApprovalLevelType(); // is this ok?
   levelType.setName(getName());
   levelType.setDescription(getDescription());
   levelType.setAutomaticallyApproved(getAutomaticallyApproved());
   levelType.setEvaluationStrategy(getEvaluationStrategy());
   for (LightweightObjectRef approverRef : approverRefs) {
     levelType.getApproverRef().add(approverRef.toObjectReferenceType());
   }
   for (SerializationSafeContainer<ExpressionType> approverExpression : approverExpressions) {
     approverExpression.setPrismContext(prismContext);
     levelType.getApproverExpression().add(approverExpression.getValue());
   }
   return levelType;
 }
Ejemplo n.º 2
0
  public ApprovalLevelImpl(ApprovalLevelType levelType, PrismContext prismContext) {

    Validate.notNull(prismContext, "prismContext must not be null");

    this.name = levelType.getName();
    this.description = levelType.getDescription();

    setPrismContext(prismContext);

    for (ObjectReferenceType approverRef : levelType.getApproverRef()) {
      addApproverRef(approverRef);
    }
    for (ExpressionType approverExpression : levelType.getApproverExpression()) {
      addApproverExpression(approverExpression);
    }
    this.evaluationStrategy = levelType.getEvaluationStrategy();
    setAutomaticallyApproved(levelType.getAutomaticallyApproved());
  }