congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
RulesRepository.loadModuleByUUID
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.drools/guvnor-repository

            String newModuleName) {
try {
  ModuleItem itemOriginal = loadModuleByUUID(uuid);
  log.info("Renaming module: " + itemOriginal.getNode().getPath() + " to " + newModuleName);
  Node node = itemOriginal.getNode();
origin: org.chtijbug.drools/guvnor-repository

            String newModuleName) {
try {
  ModuleItem itemOriginal = loadModuleByUUID(uuid);
  log.info("Renaming module: " + itemOriginal.getNode().getPath() + " to " + newModuleName);
  Node node = itemOriginal.getNode();
origin: org.chtijbug.drools/guvnor-repository

@Test
public void testLoadRulePackageItemByUUID() throws Exception {
  ModuleItem rulePackageItem = getRepo().createModule("testLoadRuleRuleItemByUUID", "desc");
  String uuid = null;
    uuid = rulePackageItem.getNode().getUUID();
  rulePackageItem = getRepo().loadModuleByUUID(uuid);
  assertNotNull(rulePackageItem);
  assertEquals("testLoadRuleRuleItemByUUID", rulePackageItem.getName());
  // try loading rule package that was not created
  try {
    rulePackageItem = getRepo().loadModuleByUUID("01010101-0101-0101-0101-010101010101");
    fail("Exception not thrown loading rule package that was not created.");
  } catch (RulesRepositoryException e) {
    // that is OK!
    assertNotNull(e.getMessage());
  }
}
origin: org.chtijbug.drools/guvnor-repository

@Test
public void testRenamePackage() throws Exception {
  RulesRepository repo = getRepo();
  ModuleItem original = repo.createModule( "testRenamePackage",
                        "asset" );
  List packagesOriginal = iteratorToList( repo.listModules() );
  AssetItem item = repo.loadModule( "testRenamePackage" ).addAsset( "testRenameAssetSource",
                                    "desc" );
  item.updateContent( "la" );
  item.checkin( "" );
  String uuid = repo.renameModule( original.getUUID(),
                   "testRenamePackage2" );
  ModuleItem pkg = repo.loadModuleByUUID( uuid );
  assertEquals( "testRenamePackage2",
         pkg.getName() );
  List assets = iteratorToList( repo.loadModule( "testRenamePackage2" ).getAssets() );
  assertEquals( 1,
         assets.size() );
  item = (AssetItem) assets.get( 0 );
  assertEquals( "testRenameAssetSource",
         item.getName() );
  assertEquals( "la",
         item.getContent() );
  assertEquals( "testRenamePackage2",
         item.getModuleName() );
  List packageFinal = iteratorToList( repo.listModules() );
  assertEquals( packagesOriginal.size(),
         packageFinal.size() );
}
origin: org.chtijbug.drools/guvnor-repository

assertEquals("testPackageSnapshot", pkgLoaded.getName());
ModuleItem _pkgLoaded = repo.loadModuleByUUID( pkgLoaded.getUUID() );
assertNotNull(_pkgLoaded);
assertEquals(pkgLoaded.getCreatedDate(), _pkgLoaded.getCreatedDate());
org.drools.repositoryRulesRepositoryloadModuleByUUID

Javadoc

Similar to above. Loads a ModuleItem for the specified uuid.

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,
  • listModuleSnapshots
    Return a list of the snapshots available for the given module name.
  • listModules
  • listModuleSnapshots,
  • listModules,
  • loadAssetByUUID,
  • loadCategory,
  • loadGlobalArea,
  • loadModuleSnapshot,
  • loadState,
  • addNodeIfNew,
  • checkForDataMigration

Popular in Java

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • getSystemService (Context)
  • getExternalFilesDir (Context)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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