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

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

Best Java code snippets using org.drools.repository.ModuleItem.getFormat (Showing top 5 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

/**
 * Nicely formats the information contained by the node that this object
 * encapsulates
 */
public String toString() {
  try {
    return "Content of the module named " + this.node.getName() + ":"
        + "Description: " + this.getDescription() + "\n"
        + "Format: " + this.getFormat() + "\n"
        + "Last modified: " + this.getLastModified() + "\n"
        + "Title: " + this.getTitle() + "\n"
        + "----\n";
  } catch (Exception e) {
    log.error("Caught Exception",
        e);
    return "";
  }
}
origin: org.drools/guvnor-repository

/**
 * Nicely formats the information contained by the node that this object
 * encapsulates
 */
public String toString() {
  try {
    return "Content of the module named " + this.node.getName() + ":"
        + "Description: " + this.getDescription() + "\n"
        + "Format: " + this.getFormat() + "\n"
        + "Last modified: " + this.getLastModified() + "\n"
        + "Title: " + this.getTitle() + "\n"
        + "----\n";
  } catch (Exception e) {
    log.error("Caught Exception",
        e);
    return "";
  }
}
origin: org.chtijbug.drools/guvnor-repository

@Test
public void testFormatOtherThanDroolsPackage() {
  ModuleItem rulePackageItem1 = getRepo().createModule(
      "testFormatOtherThanDroolsPackage", "woot");
  assertNotNull(rulePackageItem1);
  // PACKAGE_FORMAT is the default module format
  assertEquals(ModuleItem.MODULE_FORMAT, rulePackageItem1.getFormat());
  rulePackageItem1.updateFormat("soaservice");
  ModuleItem item = getRepo().loadModule(
      "testFormatOtherThanDroolsPackage");
  assertEquals("soaservice", item.getFormat());
}

origin: org.chtijbug.drools/guvnor-repository

@Test
public void testGetFormatAndUpToDate() {
  ModuleItem rulePackageItem1 = getRepo().createModule("testGetFormat",
      "woot");
  assertNotNull(rulePackageItem1);
  assertEquals(ModuleItem.MODULE_FORMAT, rulePackageItem1.getFormat());
  assertFalse(rulePackageItem1.isBinaryUpToDate());
  rulePackageItem1.updateBinaryUpToDate(true);
  assertTrue(rulePackageItem1.isBinaryUpToDate());
  rulePackageItem1.updateBinaryUpToDate(false);
  assertFalse(rulePackageItem1.isBinaryUpToDate());
}
origin: org.chtijbug.drools/guvnor-repository

@Test
public void testLoadRulePackageItem() {
  ModuleItem rulePackageItem = getRepo().createModule("testLoadRuleRuleItem", "desc");
  rulePackageItem = getRepo().loadModule("testLoadRuleRuleItem");
  assertNotNull(rulePackageItem);
  assertEquals("testLoadRuleRuleItem", rulePackageItem.getName());
  assertEquals("desc", rulePackageItem.getDescription());
  assertEquals(ModuleItem.MODULE_FORMAT, rulePackageItem.getFormat());
  // try loading rule package that was not created
  try {
    rulePackageItem = getRepo().loadModule("anotherRuleRuleItem");
    fail("Exception not thrown loading rule package that was not created.");
  } catch (RulesRepositoryException e) {
    // that is OK!
    assertNotNull(e.getMessage());
  }
}
org.drools.repositoryModuleItemgetFormat

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,
  • getLastModified,
  • getNode,
  • getStringPropertyArray

Popular in Java

  • Start an intent from android
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • JPanel (javax.swing)
  • Top 15 Vim 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