示例#1
0
  private boolean validadeFormPromptCollect(FormEntity form) {
    PromptCollectEntity promptCollect = (PromptCollectEntity) form.getFormId();
    boolean error = false;
    String msgErro = "";
    if (promptCollect.getGrammar() == null) {
      error = true;
      msgErro = "Grammar is missing";
    }
    if (promptCollect.getPrompt() == null) {
      if (error) {
        msgErro += " / ";
      }
      error = true;
      msgErro += "Prompt is missing";
    }
    if (promptCollect.getNoInput() == null) {
      if (error) {
        msgErro += " / ";
      }
      error = true;
      msgErro += "NoInput is missing";
    }
    if (promptCollect.getNoMatch() == null) {
      if (error) {
        msgErro += " / ";
      }
      error = true;
      msgErro += "NoMatch is missing";
    }
    form.setFormError(error);
    form.setErrorDescription(msgErro);

    return form.isFormError();
  }
示例#2
0
  private boolean validadeFormMenu(FormEntity form) {
    MenuEntity menu = (MenuEntity) form.getFormId();
    boolean error = false;
    String msgErro = "";
    if (menu.getPrompt() == null) {
      error = true;
      msgErro = "Prompt is missing";
    }
    if (menu.getNoInput() == null) {
      if (error) {
        msgErro += " / ";
      }
      error = true;
      msgErro += "NoInput is missing";
    }
    if (menu.getNoMatch() == null) {
      if (error) {
        msgErro += " / ";
      }
      error = true;
      msgErro += "NoMatch is missing";
    }
    if (menu.getChoices() == null || menu.getChoices().size() == 0) {
      if (error) {
        msgErro += " / ";
      }
      error = true;
      msgErro += "Choices is missing";
    }
    form.setFormError(error);
    form.setErrorDescription(msgErro);

    return form.isFormError();
  }
示例#3
0
 private boolean validadeFormAnnounce(FormEntity form) {
   AnnounceEntity announce = (AnnounceEntity) form.getFormId();
   if (announce.getPrompt() == null) {
     form.setFormError(true);
     form.setErrorDescription("Prompt is missing");
   }
   return form.isFormError();
 }
示例#4
0
 private boolean validadeFormDecision(FormEntity form) {
   DecisionEntity decision = (DecisionEntity) form.getFormId();
   if (decision.getListDecisionChance() == null || decision.getListDecisionChance().size() == 0) {
     form.setFormError(true);
     form.setErrorDescription("Chances is missing");
   }
   return form.isFormError();
 }
示例#5
0
 private boolean validadeFormTransfer(FormEntity form) {
   TransferEntity transfer = (TransferEntity) form.getFormId();
   if (transfer.getTransferRules() == null || transfer.getTransferRules().size() == 0) {
     form.setFormError(true);
     form.setErrorDescription("Transfer Rules is missing");
   }
   return form.isFormError();
 }
示例#6
0
 private boolean validadeFormFlow(FormEntity form) {
   FlowEntity flow = (FlowEntity) form.getFormId();
   if (flow.getFlowName() == null || flow.getFlowName().length() == 0) {
     form.setFormError(true);
     form.setErrorDescription("Flow Name is missing");
   }
   return form.isFormError();
 }
示例#7
0
 private boolean validadeFormOperation(FormEntity form) {
   OperationEntity operation = (OperationEntity) form.getFormId();
   if (operation.getListOperationGroup() == null
       || operation.getListOperationGroup().size() == 0) {
     form.setFormError(true);
     form.setErrorDescription("Operation Group is missing");
   }
   return form.isFormError();
 }