Examples of checkin()


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

            AssetItem ai = repository.loadPackage(packageName).loadAsset(assetName);
            /* Update asset */
            ai.checkout();
            ai.updateTitle(asset.getMetadata().getTitle());
            ai.updateDescription(asset.getDescription());
            ai.checkin(asset.getCheckInComment());
            repository.save();
        } catch (Exception e) {
            throw new WebApplicationException(e);
        }
    }
View Full Code Here

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

        try {
            //Throws RulesRepositoryException if the package or asset does not exist
            AssetItem asset = repository.loadPackage(packageName).loadAsset(assetName);
            asset.checkout();
            asset.updateBinaryContentAttachment(is);
            asset.checkin("Update binary");
            repository.save();
        } catch (Exception e) {
            throw new WebApplicationException(e);
        }
    }
View Full Code Here

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

  private void migratePackage(PackageItem pkg) {
    if (!pkg.containsAsset("drools")) {
      AssetItem asset = pkg.addAsset("drools", "");
      asset.updateFormat("package");
      asset.updateContent(pkg.getStringProperty(PackageItem.HEADER_PROPERTY_NAME));
      asset.checkin("");
    }
  }


}
View Full Code Here

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

          } else {
            asset.updateBinaryContentAttachment(in);
          }
        }

        asset.checkin(comment);
      }
    } else {
      throw new IllegalArgumentException("Unknown rest path for post.");
    }
  }
View Full Code Here

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

        if (as.isBinary()) {
          as.updateBinaryContentAttachment(in);
        } else {
          as.updateContent(readContent(in));
        }
        as.checkin(comment);
      }

    } else {
      throw new IllegalArgumentException("Unknown rest path for put");
    }
View Full Code Here

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

    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.ModuleItem.checkin()

        assertNotNull( packageItem.getName() );
        packageItem.updateBinaryUpToDate( true );
        assertTrue( packageItem.isBinaryUpToDate() );

        //Need to commit change to Module for it to be visible to subsequent retrieval
        packageItem.checkin( "" );

        serviceImplementation.deleteUncheckedRule( assetItem.getUUID() );

        //Subsequent retrieval
        ModuleItem reloadedPackage = rulesRepository.loadModule( packageItem.getName() );
View Full Code Here

Examples of org.drools.repository.PackageItem.checkin()

        //updating package header
        if (lastModified != null && pkg.getLastModified().after(lastModified)) {
          throw new RulesRepositoryException("The package was modified by: " + pkg.getLastContributor() + ", unable to write changes.");
        }
        pkg.updateStringProperty(readContent(in), PackageItem.HEADER_PROPERTY_NAME);
        pkg.checkin(comment);
        repo.save();
      } else {
        AssetItem as = pkg.loadAsset(a[0]);
        if (lastModified != null && as.getLastModified().after(lastModified)) {
          throw new RulesRepositoryException("The asset was modified by: " + as.getLastContributor() + ", unable to write changes.");
View Full Code Here

Examples of org.exoplatform.services.jcr.cluster.JCRWebdavConnection.checkIn()

     
      conn.addNode(nodeName, "v1".getBytes());
     
      conn.addVersionControl(nodeName);
     
      conn.checkIn(nodeName);
      conn.checkOut(nodeName);
     
      // check
      for (JCRWebdavConnection connection : getConnections())
      {
View Full Code Here

Examples of org.exoplatform.services.jcr.core.ExtendedNode.checkin()

    session.save();
    node.addMixin("mix:versionable");
    root.save();

    // ver.1
    node.checkin();
    final String v1UUID = node.getBaseVersion().getUUID();
    node.checkout();

    final String propName = "prop1";
    final InternalQName propQName = new InternalQName("", propName);
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.