Package com.founder.fix.fixflow.core.exception

Examples of com.founder.fix.fixflow.core.exception.FixFlowException


      } else {
        ddddResource = resourceSet.createResource(URI.createURI(filePath));
      }
      ddddResource.load(input, null);
    } catch (Exception e) {
      throw new FixFlowException(ExceptionCode.EXCEPTION_DEFAULT,e);
    }
    DefinitionsBehavior definitions = (DefinitionsBehavior) ddddResource.getContents().get(0).eContents().get(0);
    definitions.setProcessId(processKey);
    return definitions;
  }
View Full Code Here


    if(sqlText!=null){
      SqlCommand sqlCommand=new SqlCommand(Context.getDbConnection());
      sqlCommand.execute(sqlText.toString());
    }
    else {
      throw new FixFlowException("执行数据库语句不正确!");
    }
   
  }
View Full Code Here

    return this;
  }

  public ProcessDefinitionQueryImpl processDefinitionName(String name) {
    if (name == null) {
      throw new FixFlowException("name is null");
    }
    this.name = name;
    return this;
  }
View Full Code Here

    return this;
  }

  public ProcessDefinitionQueryImpl processDefinitionNameLike(String nameLike) {
    if (nameLike == null) {
      throw new FixFlowException("nameLike is null");
    }
    this.nameLike = nameLike;
    return this;
  }
View Full Code Here

    return this;
  }

  public ProcessDefinitionQueryImpl deploymentId(String deploymentId) {
    if (deploymentId == null) {
      throw new FixFlowException("id is null");
    }
    this.deploymentId = deploymentId;
    return this;
  }
View Full Code Here

    return this;
  }

  public ProcessDefinitionQueryImpl processDefinitionKey(String key) {
    if (key == null) {
      throw new FixFlowException("key is null");
    }
    this.key = key;
    return this;
  }
View Full Code Here

    return this;
  }

  public ProcessDefinitionQueryImpl processDefinitionKeyLike(String keyLike) {
    if (keyLike == null) {
      throw new FixFlowException("keyLike is null");
    }
    this.keyLike = keyLike;
    return this;
  }
View Full Code Here

    return this;
  }

  public ProcessDefinitionQueryImpl processDefinitionResourceName(String resourceName) {
    if (resourceName == null) {
      throw new FixFlowException("resourceName is null");
    }
    this.resourceName = resourceName;
    return this;
  }
View Full Code Here

      try {
        msg.setSubject(MimeUtility.encodeText(this.title));
      } catch (UnsupportedEncodingException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
        throw new FixFlowException("邮件标题转换失败!", e);
      }
      if (!hasAttachment()) {
        // 如果没有带附件
        if (this.isHtmlModeMail()) {
          // 是HTML格式的邮件
          if (!this.hasHtmlDesc()) {
            msg.setContent(this.content, this.content_type);
          } else {
            Multipart mp = new MimeMultipart();
            MimeBodyPart mbp = null;

            mbp = new MimeBodyPart();
            mbp.setContent(this.content, this.content_type);
            mp.addBodyPart(mbp);

            mbp = new MimeBodyPart();
            mbp.setContent(this.htmlMailDesc, this.MODE_TEXT);
            mp.addBodyPart(mbp);

            msg.setContent(mp);
          }
        } else {
          // 是文本格式的邮件
          msg.setText(this.content);
        }

      } else {
        // 有附件
        Multipart mp = new MimeMultipart();
        MimeBodyPart mbp = null;
        // 邮件正文
        for (int i = 0; i < vFiles.size(); i++) {
          mbp = new MimeBodyPart();
          File file = (File) vFiles.get(i);
          FileDataSource fds = new FileDataSource(file);
          mbp.setDataHandler(new DataHandler(fds));
          mbp.setFileName(file.getName());// //////////////////
          mp.addBodyPart(mbp);
        }
        for (int i = 0; i < vURLs.size(); i++) {
          mbp = new MimeBodyPart();
          URL url = (URL) vURLs.get(i);
          // URLDataSource uds=new URLDataSource(url);
          mbp.setDataHandler(new DataHandler(url));
          mbp.setFileName(url.getFile());// //////////////////
          mp.addBodyPart(mbp);
        }

        mbp = new MimeBodyPart();
        mbp.setContent(this.content, this.content_type);
        mp.addBodyPart(mbp);

        if (this.isHtmlModeMail() && this.hasHtmlDesc()) {
          mbp = new MimeBodyPart();
          mbp.setContent(this.htmlMailDesc, this.MODE_TEXT);
          mp.addBodyPart(mbp);
        }

        msg.setContent(mp);
      }
      msg.saveChanges();
      if (this.isAuthenticationSMTP) {
        Transport transport = conn.getTransport("smtp");
        transport.connect(this.smtpHost, this.smtpUser, this.smtpPassword);
        transport.sendMessage(msg, msg.getAllRecipients());
        transport.close();
      } else {
        Transport.send(msg, msg.getAllRecipients());
      }

    } catch (javax.mail.internet.AddressException e) {
      e.printStackTrace();
      throw new FixFlowException(e.getMessage(), e);
    } catch (javax.mail.MessagingException e) {
      e.printStackTrace();
      throw new FixFlowException(e.getMessage(), e);
    }
  }
View Full Code Here

    return this;
  }

  public ProcessDefinitionQueryImpl processDefinitionResourceNameLike(String resourceNameLike) {
    if (resourceNameLike == null) {
      throw new FixFlowException("resourceNameLike is null");
    }
    this.resourceNameLike = resourceNameLike;
    return this;
  }
View Full Code Here

TOP

Related Classes of com.founder.fix.fixflow.core.exception.FixFlowException

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.