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

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

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

origin: org.drools/guvnor-repository

/**
 * @return the workspace this module belongs to.
 * @throws RulesRepositoryException
 */
public String[] getWorkspaces() throws RulesRepositoryException {
  return getStringPropertyArray(WORKSPACE_PROPERTY_NAME);
}
origin: org.chtijbug.drools/guvnor-repository

/**
 * @return the workspace this module belongs to.
 * @throws RulesRepositoryException
 */
public String[] getWorkspaces() throws RulesRepositoryException {
  return getStringPropertyArray(WORKSPACE_PROPERTY_NAME);
}
origin: org.drools/guvnor-repository

/**
 * This removes a workspace
 *
 * @param workspace
 */
public void removeWorkspace(String workspace) {
  String[] existingWorkspaces = getStringPropertyArray(WORKSPACE_PROPERTY_NAME);
  if (existingWorkspaces.length == 0) {
    return;
  }
  List<String> existingWorkspaceList = new ArrayList<String>(existingWorkspaces.length);
  Collections.addAll(existingWorkspaceList, existingWorkspaces);
  existingWorkspaceList.remove(workspace);
  if (existingWorkspaceList.size() != existingWorkspaces.length) {
    this.updateStringArrayProperty(existingWorkspaceList.toArray(new String[existingWorkspaceList.size()]),
        WORKSPACE_PROPERTY_NAME,
        false);
  }
}
origin: org.chtijbug.drools/guvnor-repository

/**
 * This removes a workspace
 *
 * @param workspace
 */
public void removeWorkspace(String workspace) {
  String[] existingWorkspaces = getStringPropertyArray(WORKSPACE_PROPERTY_NAME);
  if (existingWorkspaces.length == 0) {
    return;
  }
  List<String> existingWorkspaceList = new ArrayList<String>(existingWorkspaces.length);
  Collections.addAll(existingWorkspaceList, existingWorkspaces);
  existingWorkspaceList.remove(workspace);
  if (existingWorkspaceList.size() != existingWorkspaces.length) {
    this.updateStringArrayProperty(existingWorkspaceList.toArray(new String[existingWorkspaceList.size()]),
        WORKSPACE_PROPERTY_NAME,
        false);
  }
}
origin: org.drools/guvnor-repository

/**
 * This adds a workspace
 *
 * @param workspace
 */
public void addWorkspace(String workspace) {
  String[] existingWorkspaces = getStringPropertyArray(WORKSPACE_PROPERTY_NAME);
  boolean found = false;
  for (String existingWorkspace : existingWorkspaces) {
    if (existingWorkspace.equals(workspace)) {
      found = true;
      break;
    }
  }
  if (!found) {
    String[] newWorkspaces = new String[existingWorkspaces.length + 1];
    System.arraycopy(existingWorkspaces, 0, newWorkspaces, 0, existingWorkspaces.length);
    newWorkspaces[existingWorkspaces.length] = workspace;
    this.updateStringArrayProperty(newWorkspaces,
        WORKSPACE_PROPERTY_NAME,
        false);
  }
}
origin: org.chtijbug.drools/guvnor-repository

/**
 * This adds a workspace
 *
 * @param workspace
 */
public void addWorkspace(String workspace) {
  String[] existingWorkspaces = getStringPropertyArray(WORKSPACE_PROPERTY_NAME);
  boolean found = false;
  for (String existingWorkspace : existingWorkspaces) {
    if (existingWorkspace.equals(workspace)) {
      found = true;
      break;
    }
  }
  if (!found) {
    String[] newWorkspaces = new String[existingWorkspaces.length + 1];
    System.arraycopy(existingWorkspaces, 0, newWorkspaces, 0, existingWorkspaces.length);
    newWorkspaces[existingWorkspaces.length] = workspace;
    this.updateStringArrayProperty(newWorkspaces,
        WORKSPACE_PROPERTY_NAME,
        false);
  }
}
origin: org.drools/guvnor-repository

public void updateDependency(String dependencyPath) {
  String[] existingDependencies = getStringPropertyArray(DEPENDENCIES_PROPERTY_NAME);
  boolean found = false;
  for (int i = 0; i < existingDependencies.length; i++) {
    if (decodeDependencyPath(existingDependencies[i])[0]
        .equals(decodeDependencyPath(dependencyPath)[0])) {
      found = true;
      existingDependencies[i] = dependencyPath;
      this.updateStringArrayProperty(existingDependencies,
          DEPENDENCIES_PROPERTY_NAME,
          false);
      break;
    }
  }
  if (!found) {
    String[] newDependencies = new String[existingDependencies.length + 1];
    System.arraycopy(existingDependencies, 0, newDependencies, 0, existingDependencies.length);
    newDependencies[existingDependencies.length] = dependencyPath;
    this.updateStringArrayProperty(newDependencies,
        DEPENDENCIES_PROPERTY_NAME,
        false);
  }
}
origin: org.chtijbug.drools/guvnor-repository

public void updateDependency(String dependencyPath) {
  String[] existingDependencies = getStringPropertyArray(DEPENDENCIES_PROPERTY_NAME);
  boolean found = false;
  for (int i = 0; i < existingDependencies.length; i++) {
    if (decodeDependencyPath(existingDependencies[i])[0]
        .equals(decodeDependencyPath(dependencyPath)[0])) {
      found = true;
      existingDependencies[i] = dependencyPath;
      this.updateStringArrayProperty(existingDependencies,
          DEPENDENCIES_PROPERTY_NAME,
          false);
      break;
    }
  }
  if (!found) {
    String[] newDependencies = new String[existingDependencies.length + 1];
    System.arraycopy(existingDependencies, 0, newDependencies, 0, existingDependencies.length);
    newDependencies[existingDependencies.length] = dependencyPath;
    this.updateStringArrayProperty(newDependencies,
        DEPENDENCIES_PROPERTY_NAME,
        false);
  }
}
origin: org.drools/guvnor-repository

String[] existingDependencies = getStringPropertyArray(DEPENDENCIES_PROPERTY_NAME);
for (String existingDependency : existingDependencies) {
  String path = decodeDependencyPath(existingDependency)[0];
origin: org.chtijbug.drools/guvnor-repository

String[] existingDependencies = getStringPropertyArray(DEPENDENCIES_PROPERTY_NAME);
for (String existingDependency : existingDependencies) {
  String path = decodeDependencyPath(existingDependency)[0];
origin: org.chtijbug.drools/guvnor-repository

@Test
@Ignore("JackRabbit errors about node type for property {}testing. Probably repository changes have broken test.")
public void testAddPackageProperties() throws Exception {
  RulesRepository repo = getRepo();
  ModuleItem item = repo.createModule( "testListPackages1", "lalalala" );
  assertNotNull(item.getCreator());
  String[] testProp = new String[]{"Test1","Test2"};
  item.node.checkout();
  item.node.setProperty("testing", testProp);
  //item.node.setProperty("testing", "blah");
  String[] newProp = item.getStringPropertyArray( "testing" );
  assertTrue((testProp[0]).equals(newProp[0]));
  assertTrue(("Test2").equals(newProp[1]));
  //assertEquals(testProp[0], );
  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());
}
org.drools.repositoryModuleItemgetStringPropertyArray

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

Popular in Java

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • String (java.lang)
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • JButton (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top Sublime Text 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