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

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew ArrayList()
  • Codota Iconnew LinkedList()
  • Smart code suggestions by Tabnine
}
origin: org.chtijbug.drools/guvnor-repository

  return itemOriginal.getUUID();
} catch (RepositoryException e) {
  log.error(e.getMessage(),
origin: org.chtijbug.drools/guvnor-repository

/**
 * Copy a package to the target name.
 */
public String copyModule(String sourceModuleName,
             String destModuleName) {
  ModuleItem source = loadModule(sourceModuleName);
  try {
    String destPath = source.getNode().getParent().getPath() + "/" + destModuleName;
    if (this.getAreaNode(MODULE_AREA).hasNode(destModuleName)) {
      throw new RulesRepositoryException("Destination already exists.");
    }
    this.session.getWorkspace().copy(source.getNode().getPath(),
        destPath);
    ModuleItem newModuleItem = loadModule(destModuleName);
    newModuleItem.updateTitle(destModuleName);
    for (Iterator iter = newModuleItem.getAssets(); iter.hasNext(); ) {
      AssetItem as = (AssetItem) iter.next();
      as.updateStringProperty(destModuleName,
          AssetItem.MODULE_NAME_PROPERTY);
    }
    save();
    return newModuleItem.getUUID();
  } catch (RepositoryException e) {
    log.error(e.getMessage(),
        e);
    throw new RulesRepositoryException(e);
  }
}

origin: org.drools/guvnor-repository

  return itemOriginal.getUUID();
} catch (RepositoryException e) {
  log.error(e.getMessage(),
origin: org.drools/guvnor-repository

/**
 * Copy a package to the target name.
 */
public String copyModule(String sourceModuleName,
             String destModuleName) {
  ModuleItem source = loadModule(sourceModuleName);
  try {
    String destPath = source.getNode().getParent().getPath() + "/" + destModuleName;
    if (this.getAreaNode(MODULE_AREA).hasNode(destModuleName)) {
      throw new RulesRepositoryException("Destination already exists.");
    }
    this.session.getWorkspace().copy(source.getNode().getPath(),
        destPath);
    ModuleItem newModuleItem = loadModule(destModuleName);
    newModuleItem.updateTitle(destModuleName);
    for (Iterator iter = newModuleItem.getAssets(); iter.hasNext(); ) {
      AssetItem as = (AssetItem) iter.next();
      as.updateStringProperty(destModuleName,
          AssetItem.MODULE_NAME_PROPERTY);
    }
    save();
    return newModuleItem.getUUID();
  } catch (RepositoryException e) {
    log.error(e.getMessage(),
        e);
    throw new RulesRepositoryException(e);
  }
}

origin: org.chtijbug.drools/guvnor-repository

@Test
public void testGetPackageItem() throws Exception {
  RulesRepository repo = getRepo();
  ModuleItem def = repo.loadDefaultModule();
  AssetItem asset = repo.loadDefaultModule().addAsset("testPackageItem", "test content");
  ModuleItem pkg = asset.getModule();
  assertEquals(def.getName(), pkg.getName());
  assertEquals(def.getUUID(), pkg.getUUID());
}
origin: org.chtijbug.drools/guvnor-repository

ModuleItem dest = repo.loadModule( "testCopyPackage2" );
assertNotNull( dest );
assertFalse( source.getUUID().equals( dest.getUUID() ) );
origin: org.chtijbug.drools/guvnor-repository

assertEquals(loadGlobalArea().getUUID(), ruleItem.getModule().getUUID());
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());
List snapAssets = iteratorToList( pkg2.getAssets() );
assertEquals(2, snapAssets.size());
assertFalse(pkg2.getUUID().equals( pkg.getUUID() ));
assertTrue(snapAssets.get( 0 ) instanceof AssetItem);
assertTrue(snapAssets.get( 1 ) instanceof AssetItem);
org.drools.repositoryModuleItemgetUUID

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.
  • updateStringProperty
  • <init>
    Constructs an object of type ModuleItem corresponding the specified node
  • checkin
  • checkout
  • createSubModule
    Creates a nested package.
  • ensureMixinType
  • createSubModule,
  • ensureMixinType,
  • getAssets,
  • getAssetsWithStatus,
  • getDependencies,
  • getDescription,
  • getFormat,
  • getLastModified,
  • getNode,
  • getStringPropertyArray

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • findViewById (Activity)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • JCheckBox (javax.swing)
  • Runner (org.openjdk.jmh.runner)
  • PhpStorm for WordPress
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