Examples of updateContent()


Examples of de.innovationgate.webgate.api.WGHierarchicalDatabase.updateContent()

      String source = getforminfo().getSource();
      if (source.equals("content")) {
          WGContent content = gettargetcontext().content();
          params.setContentClass(content.getContentClass());
          try {
              hdb.updateContent(content, params);
              return true;
          }
          catch (WGHierarchicalDatabaseEventCanceledException e) {
              addmessage(e.getMessage());
              return false;
View Full Code Here

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

            ai.updateDescription(assetEntry.getSummary());
            if (format != null) {
                ai.updateFormat(format);
            }
            if (assetEntry.getContent() != null) {
                ai.updateContent(assetEntry.getContent());
            }
            ai.checkin("Check-in (summary): " + assetEntry.getSummary());
            repository.save();
        } catch (Exception e) {
            throw new WebApplicationException(e);
View Full Code Here

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

    public void updateAssetSource(@PathParam("packageName") String packageName, @PathParam("assetName") String assetName, String content) {
        try {
            //Throws RulesRepositoryException if the package or asset does not exist
            AssetItem asset = repository.loadPackage(packageName).loadAsset(assetName);
            asset.checkout();
            asset.updateContent(content);
            repository.save();
        } catch (Exception e) {
            throw new WebApplicationException(e);
        }
    }
View Full Code Here

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

  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.updateContent()

            throw new RulesRepositoryException("The file " + path + " already exists, and was not archived.");
          }
          if (asset.isBinary()) {
            asset.updateBinaryContentAttachment(in);
          } else {
            asset.updateContent(readContent(in));
          }
        } else {
          asset = pkg.addAsset(a[0], "<added remotely>");
          asset.updateFormat(a[1]);
          if (TEXT_ASSET_TYPES.containsKey(a[1])) {
View Full Code Here

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

          }
        } else {
          asset = pkg.addAsset(a[0], "<added remotely>");
          asset.updateFormat(a[1]);
          if (TEXT_ASSET_TYPES.containsKey(a[1])) {
            asset.updateContent(readContent(in));
          } else {
            asset.updateBinaryContentAttachment(in);
          }
        }
View Full Code Here

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

          throw new RulesRepositoryException("The asset was modified by: " + as.getLastContributor() + ", unable to write changes.");
        }
        if (as.isBinary()) {
          as.updateBinaryContentAttachment(in);
        } else {
          as.updateContent(readContent(in));
        }
        as.checkin(comment);
      }

    } else {
View Full Code Here

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

                                          PackageItem pkg) {
        pkg.checkout();
        AssetItem conf;
        if ( pkg.containsAsset( "drools" ) ) {
            conf = pkg.loadAsset( "drools" );
            conf.updateContent( string );

            conf.checkin( "" );
        } else {
            conf = pkg.addAsset( "drools",
                                 "" );
View Full Code Here

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

            conf.checkin( "" );
        } else {
            conf = pkg.addAsset( "drools",
                                 "" );
            conf.updateFormat( "package" );
            conf.updateContent( string );

            conf.checkin( "" );
        }

    }
View Full Code Here

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

        for ( Asset as : imp.getAssets() ) {

            if ( existing && pkg.containsAsset( as.name ) ) {
                AssetItem asset = pkg.loadAsset( as.name );
                if ( asset.getFormat().equals( as.format ) ) {
                    asset.updateContent( as.content );
                    if ( newVer ) asset.checkin( "Imported change form external DRL" );
                } //skip it if not the right format

            } else {
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.