gpt4 book ai didi

com.ebmwebsourcing.petalsbpm.utils.server.ZipHelper.isZipFile()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 07:02:31 28 4
gpt4 key购买 nike

本文整理了Java中com.ebmwebsourcing.petalsbpm.utils.server.ZipHelper.isZipFile()方法的一些代码示例,展示了ZipHelper.isZipFile()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipHelper.isZipFile()方法的具体详情如下:
包路径:com.ebmwebsourcing.petalsbpm.utils.server.ZipHelper
类名称:ZipHelper
方法名:isZipFile

ZipHelper.isZipFile介绍

暂无

代码示例

代码示例来源:origin: com.ebmwebsourcing.petalsbpm/bpmn-plugins

protected void readFile(File file) throws Exception {
  if(ZipHelper.getInstance().isZipFile(file)) {
    readZipFile(file);
  }
  else {
    readBPMNFiles(new File[]{file});
  }
}

代码示例来源:origin: com.ebmwebsourcing.petalsbpm/bpmn-plugins

private File getXPDLFromBPMN2(File projectInstanceFile, File temporaryOutputDirectory) throws Exception{
  XPDLAdapter adapter = new XPDLAdapter();
  if(ZipHelper.getInstance().isZipFile(projectInstanceFile)) {
    ZipHelper.getInstance().unzipFile(projectInstanceFile, temporaryOutputDirectory);
    return adapter.getXPDL2FromBPMN2(BPMNFileHelper.getBPMNFileInFolder(temporaryOutputDirectory).getAbsolutePath());
  }
  else {
    return adapter.getXPDL2FromBPMN2(projectInstanceFile.getAbsolutePath());
  }
}

代码示例来源:origin: com.ebmwebsourcing.petalsbpm/bpmn-plugins

private File getBPELZipFromBPMN(File projectInstanceFile, IProjectInstanceMetaData exportData, File directory) throws Exception{
  FileHelper.cleanDirectory(directory);
  
  //first retrieve the bpmn defintions form the given project instance file
  if(ZipHelper.getInstance().isZipFile(projectInstanceFile)) {
    ZipHelper.getInstance().unzipFile(projectInstanceFile,directory);
  }
  else {
    FileHelper.copyFile(projectInstanceFile, directory);
  }
  
  File bpmnFile = BPMNFileHelper.getBPMNFileInFolder(directory);
  URL url    = bpmnFile.toURI().toURL();
  Definitions defs = new XmlContextFactory().newContext().createReader().readDocument(url, Definitions.class);
  
  //get or create a temp dir and generate bpel and wsdl files in it
  String bpelZipPath = directory.getAbsolutePath()+File.separator+"zip";
  File bpelZipDir = new File(bpelZipPath);
  if(!bpelZipDir.exists()) {
    bpelZipDir.mkdir();
  }
  FileHelper.cleanDirectory(bpelZipDir);
  
  new BPELGenerator().generate(defs, bpelZipPath);
  
  //make a zip out of this temporary directory
  return ZipHelper.getInstance().createZipFromFolder(bpelZipPath, directory.getAbsolutePath()+File.separator+"BPEL"+defs.getId()+".zip");
}

代码示例来源:origin: com.ebmwebsourcing.petalsbpm/bpmn-deployer

if(ZipHelper.getInstance().isZipFile(bpmnFile)) {
  File zipDir = FileHelper.createTemporaryDirectory();
  ZipHelper.getInstance().unzipFile(bpmnFile, zipDir);

代码示例来源:origin: com.ebmwebsourcing.petalsbpm/bpmn-plugins

if(ZipHelper.getInstance().isZipFile(file)) {
  bpmnFile = getMetaDataFromZip(file, format);

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com