Codota Logo
ResourceResolver.findProjectConfig
Code IndexAdd Codota to your IDE (free)

How to use
findProjectConfig
method
in
org.guvnor.common.services.project.backend.server.ResourceResolver

Best Java code snippets using org.guvnor.common.services.project.backend.server.ResourceResolver.findProjectConfig (Showing top 3 results out of 315)

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

protected void addSecurityGroups(final T project) {
  //Copy in Security Roles required to access this resource
  final ConfigGroup projectConfiguration = findProjectConfig(project.getRootPath());
  if (projectConfiguration != null) {
    ConfigItem<List<String>> groups = backward.compat(projectConfiguration).getConfigItem("security:groups");
    if (groups != null) {
      for (String group : groups.getValue()) {
        project.getGroups().add(group);
      }
    }
  }
}
origin: org.guvnor/guvnor-project-backend

@SuppressWarnings({"unchecked", "rawtypes"})
@Override
public void removeGroup(final Project project,
            final String group) {
  final ConfigGroup thisProjectConfig = resourceResolver.findProjectConfig(project.getRootPath());
  if (thisProjectConfig != null) {
    final ConfigItem<List> groups = backward.compat(thisProjectConfig).getConfigItem("security:groups");
    groups.getValue().remove(group);
    configurationService.updateConfiguration(thisProjectConfig);
  } else {
    throw new IllegalArgumentException("Project " + project.getProjectName() + " not found");
  }
}
origin: org.guvnor/guvnor-project-backend

@SuppressWarnings({"rawtypes"})
@Override
public void addGroup(final Project project,
           final String group) {
  ConfigGroup thisProjectConfig = resourceResolver.findProjectConfig(project.getRootPath());
  if (thisProjectConfig == null) {
    thisProjectConfig = configurationFactory.newConfigGroup(ConfigType.PROJECT,
                                project.getRootPath().toURI(),
                                "Project '" + project.getProjectName() + "' configuration");
    thisProjectConfig.addConfigItem(configurationFactory.newConfigItem("security:groups",
                                      new ArrayList<String>()));
    configurationService.addConfiguration(thisProjectConfig);
  }
  if (thisProjectConfig != null) {
    final ConfigItem<List> groups = backward.compat(thisProjectConfig).getConfigItem("security:groups");
    groups.getValue().add(group);
    configurationService.updateConfiguration(thisProjectConfig);
  } else {
    throw new IllegalArgumentException("Project " + project.getProjectName() + " not found");
  }
}
org.guvnor.common.services.project.backend.serverResourceResolverfindProjectConfig

Popular methods of ResourceResolver

  • resolvePackage
  • getDefaultWorkspacePath
  • isPom
  • resolveDefaultPath
  • resolveDefaultWorkspacePackage
  • resolveModule
  • getLegalId
  • getPackageDisplayName
  • getPackageNames
  • getPackagePathSuffix
  • getPackageRelativeCaption
  • hasPom
  • getPackageRelativeCaption,
  • hasPom,
  • initResourcePathResolvers,
  • makePackage,
  • newPackage,
  • resolvePkgName,
  • resolveProject,
  • simpleModuleInstance,
  • addSecurityGroups

Popular in Java

  • Start an intent from android
  • getSystemService (Context)
  • getApplicationContext (Context)
  • addToBackStack (FragmentTransaction)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JButton (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
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