Codota Logo
RulesRepository.listModuleSnapshots
Code IndexAdd Codota to your IDE (free)

How to use
listModuleSnapshots
method
in
org.drools.repository.RulesRepository

Best Java code snippets using org.drools.repository.RulesRepository.listModuleSnapshots (Showing top 3 results out of 315)

  • Common ways to obtain RulesRepository
private void myMethod () {
RulesRepository r =
  • Codota IconSession session;new RulesRepository(session)
  • Smart code suggestions by Codota
}
origin: org.drools/guvnor-repository

public void migrate(RulesRepository repo) throws RepositoryException {
  log.info("AUTO MIGRATION: Performing drools.package migration...");
  ModuleIterator pkgs = repo.listModules();
  boolean performed = false;
  while(pkgs.hasNext()) {
    performed = true;
    ModuleItem pkg = (ModuleItem) pkgs.next();
    migratePackage(pkg);
    String[] snaps = repo.listModuleSnapshots(pkg.getName());
    if (snaps != null) {
      for (int i = 0; i < snaps.length; i++) {
        ModuleItem snap = repo.loadModuleSnapshot(pkg.getName(), snaps[i]);
        migratePackage(snap);
      }
    }
  }
  if (performed) {
    repo.getSession().getRootNode().getNode(RulesRepository.RULES_REPOSITORY_NAME).addNode("drools.package.migrated", "nt:folder");
    repo.save();
    log.info("AUTO MIGRATION: drools.package migration completed.");
  }
}
origin: org.chtijbug.drools/guvnor-repository

public void migrate(RulesRepository repo) throws RepositoryException {
  log.info("AUTO MIGRATION: Performing drools.package migration...");
  ModuleIterator pkgs = repo.listModules();
  boolean performed = false;
  while(pkgs.hasNext()) {
    performed = true;
    ModuleItem pkg = (ModuleItem) pkgs.next();
    migratePackage(pkg);
    String[] snaps = repo.listModuleSnapshots(pkg.getName());
    if (snaps != null) {
      for (int i = 0; i < snaps.length; i++) {
        ModuleItem snap = repo.loadModuleSnapshot(pkg.getName(), snaps[i]);
        migratePackage(snap);
      }
    }
  }
  if (performed) {
    repo.getSession().getRootNode().getNode(RulesRepository.RULES_REPOSITORY_NAME).addNode("drools.package.migrated", "nt:folder");
    repo.save();
    log.info("AUTO MIGRATION: drools.package migration completed.");
  }
}
origin: org.chtijbug.drools/guvnor-repository

String[] res = repo.listModuleSnapshots("testPackageSnapshot");
res = repo.listModuleSnapshots( "does not exist" );
assertEquals(0, res.length);
repo.save();
res = repo.listModuleSnapshots( "testPackageSnapshot" );
assertEquals(0, res.length);
res = repo.listModuleSnapshots( "testPackageSnapshot" );
assertEquals(1, res.length);
repo.copyModuleSnapshot( "testPackageSnapshot", "BOO", "BOO2" );
res = repo.listModuleSnapshots( "testPackageSnapshot" );
assertEquals(2, res.length);
res = repo.listModuleSnapshots( "testPackageSnapshot" );
assertEquals(2, res.length);
org.drools.repositoryRulesRepositorylistModuleSnapshots

Javadoc

Return a list of the snapshots available for the given module name.

Popular methods of RulesRepository

  • createModule
    Adds a module to the repository.
  • loadModule
    Loads a Module for the specified module name and version. Will throw an exception if the specified m
  • save
    Save any pending changes.
  • <init>
    This requires a JCR session be setup, and the repository be configured.
  • findAssetsByCategory
    This will retrieve a list of RuleItem objects - that are allocated to the provided category. Only th
  • findAssetsByName
    This will search assets, looking for matches against the name.
  • findAssetsByState
    Finds the AssetItem's linked to the requested state. Similar to finding by category.
  • getAreaNode
  • getSession
  • getState
    Gets a StateItem for the specified state name. If a node for the specified state does not yet exist,
  • listModules
  • loadAssetByUUID
    Loads an asset by its UUID (generally the fastest way to load something).
  • listModules,
  • loadAssetByUUID,
  • loadCategory,
  • loadGlobalArea,
  • loadModuleByUUID,
  • loadModuleSnapshot,
  • loadState,
  • addNodeIfNew,
  • checkForDataMigration

Popular in Java

  • Making http requests using okhttp
  • startActivity (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now