Package org.uengine.kernel

Examples of org.uengine.kernel.ValidationContext


      return manager;
   
       
    public void testScript() {
      super.testScript();
      ValidationContext vc = instance.getValidationContext();
      if(vc.size()>0)
        reportError(vc.toString());
    }
View Full Code Here


  public void validateActivity(){
    if(getActivity()!=null && !"PMT".equals(System.getProperty("designerMode"))){
      HashMap validationOption = new HashMap();
      validationOption.put(ValidationContext.OPTIONKEY_DISABLE_REPLICATION, true);
     
      ValidationContext valCtx = getActivity().validate(validationOption);
     
      if(valCtx.size()>0){
        Border border;
        if(valCtx.isWarning()){
          setErrorState(ERRORSTATE_WARN);
          border = warningBorder;
        }else{
          setErrorState(ERRORSTATE_ERROR);
          border = errorBorder;
View Full Code Here

    tabPane.add( GlobalContext.getLocalizedMessage("processdesigner.integrity.displayname", "Integrity"), new JScrollPane(validationPanel));
   
    tabPane.getModel().addChangeListener(
      new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
          ValidationContext valCtx = ((ActivityRecord)thisForm.getInstance()).getActivity().validate(null);
          if(valCtx!=null && valCtx.size()>0){
            StringBuffer errMsg = new StringBuffer();
            for(Enumeration enumeration = valCtx.elements(); enumeration.hasMoreElements();){
              Object item = (Object)enumeration.nextElement();
              errMsg.append(item +"\n");
            }
            validationPanel.setText(errMsg.toString());
          }else
View Full Code Here

    return manager;
 
       
  public void testScript() {
    super.testScript();
    ValidationContext vc = instance.getValidationContext();
    if(vc.size()>0)
      reportError(vc.toString());
  }
View Full Code Here

   
  }
 
  @Override
  public ValidationContext validate(Map options) {
    ValidationContext vc = super.validate(options);
   
   
    return vc;
  }
View Full Code Here

  protected void saveDesignToServer(final boolean needConfirm) throws Exception{
    saveDesignToServer(needConfirm, (ProcessDefinition)getProcessDefinitionDesigner().getActivity());
  }
   
  public boolean validateDefinition(ProcessDefinition definition){
    ValidationContext valCtx = definition.validate(null);
   
    if(valCtx!=null && !valCtx.hasNoError()){
      JDialog d = new JDialog(this, "This process definition need to be verified.", true);
      JTextArea ta = new JTextArea();
      ta.setEditable(false);
      d.getContentPane().add(new JScrollPane(ta));
     
      StringBuffer errMsg = new StringBuffer();
      for(Enumeration enumeration = valCtx.elements(); enumeration.hasMoreElements();){
        Object item = (Object)enumeration.nextElement();
        errMsg.append(item +"\n");
      }
      ta.setText(errMsg.toString());
     
View Full Code Here

//    }
  }

  @Override
  public ValidationContext validate(Map options) {
    ValidationContext vc = super.validate(options);
   
    if (getApprovalType() == 0) {
      vc.add("select approval type");
    }

    return vc;
  }
View Full Code Here

TOP

Related Classes of org.uengine.kernel.ValidationContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.