Tabnine Logo
ModuleItem.updateStringProperty
Code IndexAdd Tabnine to your IDE (free)

How to use
updateStringProperty
method
in
org.drools.repository.ModuleItem

Best Java code snippets using org.drools.repository.ModuleItem.updateStringProperty (Showing top 14 results out of 315)

origin: org.drools/guvnor-repository

/**
 * Update the checkin comment.
 */
public void updateCheckinComment(String comment) {
  updateStringProperty(comment,
      VersionableItem.CHECKIN_COMMENT);
}
origin: org.chtijbug.drools/guvnor-repository

/**
 * Update the checkin comment.
 */
public void updateCheckinComment(String comment) {
  updateStringProperty(comment,
      VersionableItem.CHECKIN_COMMENT);
}
origin: org.chtijbug.drools/guvnor-repository

public void setCatRules(String map) {
  updateStringProperty(map,
      CATEGORY_RULE_KEYS_PROPERTY_NAME);
}
origin: org.drools/guvnor-repository

public void updateExternalURI(String uri) {
  updateStringProperty(uri,
      EXTERNAL_URI_PROPERTY_NAME);
}
origin: org.drools/guvnor-repository

public void setCatRules(String map) {
  updateStringProperty(map,
      CATEGORY_RULE_KEYS_PROPERTY_NAME);
}
origin: org.chtijbug.drools/guvnor-repository

public void updateExternalURI(String uri) {
  updateStringProperty(uri,
      EXTERNAL_URI_PROPERTY_NAME);
}
origin: org.chtijbug.drools/guvnor-repository

public void updateCategoryRules(String keys,
                String values) throws RulesRepositoryException {
  //System.out.println("(updateCategoryRules) keys: " + keys + " Values: " + values );
  try {
    this.checkout();
    this.updateStringProperty(keys,
        CATEGORY_RULE_KEYS_PROPERTY_NAME);
    this.updateStringProperty(values,
        CATEGORY_RULE_VALUES_PROPERTY_NAME);
  } catch (Exception e) {
    log.error("Caught Exception",
        e);
    throw new RulesRepositoryException(e);
  }
}
origin: org.drools/guvnor-repository

public void updateCategoryRules(String keys,
                String values) throws RulesRepositoryException {
  //System.out.println("(updateCategoryRules) keys: " + keys + " Values: " + values );
  try {
    this.checkout();
    this.updateStringProperty(keys,
        CATEGORY_RULE_KEYS_PROPERTY_NAME);
    this.updateStringProperty(values,
        CATEGORY_RULE_VALUES_PROPERTY_NAME);
  } catch (Exception e) {
    log.error("Caught Exception",
        e);
    throw new RulesRepositoryException(e);
  }
}
origin: org.chtijbug.drools/guvnor-repository

@Test
public void testListPackages() throws Exception {
  RulesRepository repo = getRepo();
  ModuleItem item = repo.createModule( "testListPackages1", "lalalala" );
  assertNotNull(item.getCreator());
  item.updateStringProperty( "goo", "whee" );
  assertEquals("goo", item.getStringProperty( "whee" ));
  assertFalse(item.getCreator().equals( "" ));
  List list = iteratorToList( repo.listModules() );
  int prevSize = list.size();
  repo.createModule( "testListPackages2", "abc" );
  list = iteratorToList( repo.listModules() );
  assertEquals(prevSize + 1, list.size());
}
origin: org.chtijbug.drools/guvnor-webapp-core

pkg.updateStringProperty("This is some header", ModuleItem.HEADER_PROPERTY_NAME);
repo.save();
origin: org.chtijbug.drools/guvnor-webapp-core

RulesRepository repo = RepositorySessionUtil.getRepository();
ModuleItem pkg = repo.createModule("testRestGetBasics", "", ModuleItem.MODULE_FORMAT);
pkg.updateStringProperty("This is some header", ModuleItem.HEADER_PROPERTY_NAME);
repo.save();
origin: org.chtijbug.drools/guvnor-webapp-core

RulesRepository repo = RepositorySessionUtil.getRepository();
ModuleItem pkg = repo.createModule("testRestDelete", "", ModuleItem.MODULE_FORMAT);
pkg.updateStringProperty("This is some header", ModuleItem.HEADER_PROPERTY_NAME);
repo.save();
origin: org.chtijbug.drools/guvnor-webapp-core

@Test
public void testPost() throws Exception {
  RulesRepository repo = RepositorySessionUtil.getRepository();
  ModuleItem pkg = repo.createModule("testRestPost", "", ModuleItem.MODULE_FORMAT);
  pkg.updateStringProperty("This is some header", ModuleItem.HEADER_PROPERTY_NAME);
  repo.save();
  RestAPI api = new RestAPI(repo);
  api.setAssetValidator(new AssetValidator());
  ByteArrayInputStream in = new ByteArrayInputStream("abc".getBytes());
  api.post("/packages/testRestPost/asset1.drl", in, "a comment");
  AssetItem a = pkg.loadAsset("asset1");
  assertFalse(a.isBinary());
  assertEquals("drl", a.getFormat());
  assertEquals("abc", a.getContent());
  assertEquals("a comment", a.getCheckinComment());
  in = new ByteArrayInputStream("qed".getBytes());
  api.post("/packages/testRestPost/asset2.xls", in, "a comment");
  a = pkg.loadAsset("asset2");
  assertTrue(a.isBinary());
  String s = new String(a.getBinaryContentAsBytes());
  assertEquals("qed", s);
  assertEquals("a comment", a.getCheckinComment());
  assertEquals("xls", a.getFormat());
  List<AssetItem> assets = RulesRepositoryTest.iteratorToList(repo.loadModule("testRestPost").listAssetsByFormat(new String[] {"drl", "xls"}));
  assertEquals(2, assets.size());
}
origin: org.chtijbug.drools/guvnor-repository

@Test
public void testMigrate() throws Exception {
  RulesRepository repo = getRepo();
  Session sess = repo.getSession();
  sess.getRootNode().getNode(RulesRepository.RULES_REPOSITORY_NAME).getNode("drools.package.migrated").remove();
  sess.save();
  MigrateDroolsPackage mig = new MigrateDroolsPackage();
  ModuleItem pkg = repo.createModule("testMigratePackage", "");
  pkg.updateStringProperty("some header", ModuleItem.HEADER_PROPERTY_NAME);
  sess.save();
  repo.createModuleSnapshot("testMigratePackage", "SNAP1");
  repo.createModuleSnapshot("testMigratePackage", "SNAP2");
  assertTrue(mig.needsMigration(repo));
  mig.migrate(repo);
  assertFalse(repo.getSession().hasPendingChanges());
  assertFalse(mig.needsMigration(repo));
  pkg = repo.loadModule("testMigratePackage");
  assertTrue(pkg.containsAsset("drools"));
  AssetItem as = pkg.loadAsset("drools");
  assertEquals("some header", as.getContent());
  pkg = repo.loadModuleSnapshot("testMigratePackage", "SNAP1");
  assertTrue(pkg.containsAsset("drools"));
  as = pkg.loadAsset("drools");
  assertEquals("some header", as.getContent());
  pkg = repo.loadModuleSnapshot("testMigratePackage", "SNAP2");
  assertTrue(pkg.containsAsset("drools"));
  as = pkg.loadAsset("drools");
  assertEquals("some header", as.getContent());
}
org.drools.repositoryModuleItemupdateStringProperty

Popular methods of ModuleItem

  • addAsset
    This adds an asset to the current physical module (you can move it later). With the given category.
  • containsAsset
    Returns true if this module contains an asset of the given name.
  • getName
    Return the name of the module.
  • getStringProperty
  • listAssetsByFormat
    This will load an iterator for assets of the given format type.
  • loadAsset
    Load a specific asset by name.
  • <init>
    Constructs an object of type ModuleItem corresponding the specified node
  • checkin
  • checkout
  • createSubModule
    Creates a nested package.
  • ensureMixinType
  • getAssets
    Return an iterator for the rules in this module
  • ensureMixinType,
  • getAssets,
  • getAssetsWithStatus,
  • getDependencies,
  • getDescription,
  • getFormat,
  • getLastModified,
  • getNode,
  • getStringPropertyArray

Popular in Java

  • Reactive rest calls using spring rest template
  • startActivity (Activity)
  • compareTo (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JPanel (javax.swing)
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now