Examples of archiveItem()


Examples of org.drools.repository.AssetItem.archiveItem()

        PackageItem pkg = repo.loadPackage(bits[1]);
        AssetItem asset;
        if (pkg.containsAsset(a[0])) {
          asset = pkg.loadAsset(a[0]);
          if (asset.isArchived()) {
            asset.archiveItem(false);
          } else {
            throw new RulesRepositoryException("The file " + path + " already exists, and was not archived.");
          }
          if (asset.isBinary()) {
            asset.updateBinaryContentAttachment(in);
View Full Code Here

Examples of org.drools.repository.AssetItem.archiveItem()

  public void delete(String path) throws UnsupportedEncodingException {
    String[] bits = split(path);
    if (bits[0].equals("packages")) {
      String fileName = bits[2].split("\\.")[0];
      AssetItem asset = repo.loadPackage(bits[1]).loadAsset(fileName);
      asset.archiveItem(true);
      asset.checkin("<removed remotely>");
    }
    else {
      throw new IllegalArgumentException("Unknown rest path for delete");
    }
View Full Code Here

Examples of org.drools.repository.AssetItem.archiveItem()

                        null);
                return;
            }
            if (packageItem.containsAsset(resource[0])) {
                AssetItem lazarus = packageItem.loadAsset(resource[0]);
                lazarus.archiveItem(false);
            } else {
                AssetItem asset = packageItem.addAsset(resource[0],
                        "");
                asset.updateFormat(resource[1]);
            }
View Full Code Here

Examples of org.drools.repository.AssetItem.archiveItem()

                        null);
                return;
            }
            if (packageItem.containsAsset(resource[0])) {
                AssetItem lazarus = packageItem.loadAsset(resource[0]);
                lazarus.archiveItem(false);
            } else {
                AssetItem asset = packageItem.addAsset(resource[0],
                        "");
                asset.updateFormat(resource[1]);
            }
View Full Code Here

Examples of org.drools.repository.AssetItem.archiveItem()

                    WebDAVImpl.osxDoubleData.remove(uri);
                    return;
                }
                AssetItem item = loadAssetItemFromPackageItem(packageItem,
                        path[2]);
                item.archiveItem(true);
                item.checkin("");
            } else {
                //delete package
                packageItem.archiveItem(true);
                packageItem.checkin("");
View Full Code Here

Examples of org.drools.repository.AssetItem.archiveItem()

                    WebDAVImpl.osxDoubleData.remove(uri);
                    return;
                }
                AssetItem item = loadAssetItemFromGlobalArea(repository,
                        path);
                item.archiveItem(true);
                item.checkin("");
            }
        } else {
            throw new IllegalArgumentException("Not allowed to remove this file.");
        }
View Full Code Here

Examples of org.drools.repository.AssetItem.archiveItem()

        AssetItem rule1 = it.addAsset( "rule_1",
                                       "" );
        rule1.updateFormat( AssetFormats.DRL );
        rule1.updateContent( "rule 'rule1' \n when \np : Person() \n then \np.setAge(42); \n end" );
        rule1.archiveItem( true );
        rule1.checkin( "" );
        rulesRepository.save();

        repositoryPackageService.saveModule( data );
        data = repositoryPackageService.loadModule( uuid );
View Full Code Here

Examples of org.drools.repository.AssetItem.archiveItem()

            }
        } catch (IOException e) {
            log.error("Unable to remove asset attachment",
                    e);
        }
        item.archiveItem(archive);
        ModuleItem pkg = item.getModule();
        pkg.updateBinaryUpToDate(false);
        RuleBaseCache.getInstance().remove(pkg.getUUID());
        if (archive) {
            item.checkin("archived");
View Full Code Here

Examples of org.drools.repository.AssetItem.archiveItem()

        PackageItem pkg = repo.loadPackage(bits[1]);
        AssetItem asset;
        if (pkg.containsAsset(a[0])) {
          asset = pkg.loadAsset(a[0]);
          if (asset.isArchived()) {
            asset.archiveItem(false);
          } else {
            throw new RulesRepositoryException("The file " + path + " already exists, and was not archived.");
          }
          if (asset.isBinary()) {
            asset.updateBinaryContentAttachment(in);
View Full Code Here

Examples of org.drools.repository.AssetItem.archiveItem()

  public void delete(String path) throws UnsupportedEncodingException {
    String[] bits = split(path);
    if (bits[0].equals("packages")) {
      String fileName = bits[2].split("\\.")[0];
      AssetItem asset = repo.loadPackage(bits[1]).loadAsset(fileName);
      asset.archiveItem(true);
      asset.checkin("<removed remotely>");
    }
    else {
      throw new IllegalArgumentException("Unknown rest path for delete");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.