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

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

Best Java code snippets using org.guvnor.common.services.project.backend.server.ResourceResolver.hasPom (Showing top 6 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

@Override
public Project resolveParentProject(final Path resource) {
  try {
    //Null resource paths cannot resolve to a Project
    if (resource == null) {
      return null;
    }
    //Check if resource is the project root
    org.uberfire.java.nio.file.Path path = Paths.convert(resource).normalize();
    if (hasPom(path)) {
      final Path projectRootPath = Paths.convert(path);
      return new Project(projectRootPath,
                Paths.convert(path.resolve(POM_PATH)),
                projectRootPath.getFileName());
    } else {
      return null;
    }
  } catch (Exception e) {
    throw ExceptionUtilities.handleException(e);
  }
}
origin: kiegroup/appformer

@Override
public Module resolveParentModule(final Path resource) {
  try {
    //Null resource paths cannot resolve to a Module
    if (resource == null) {
      return null;
    }
    //Check if resource is the module root
    final org.uberfire.java.nio.file.Path path = Paths.convert(resource).normalize();
    if (hasPom(path)) {
      final Path moduleRootPath = Paths.convert(path);
      final Path pomXMLPath = Paths.convert(path.resolve(POM_PATH));
      final POM pom = pomService.load(pomXMLPath);
      return new Module(moduleRootPath,
               pomXMLPath,
               pom);
    } else {
      return null;
    }
  } catch (Exception e) {
    throw ExceptionUtilities.handleException(e);
  }
}
origin: org.uberfire/uberfire-project-backend

@Override
public Module resolveParentModule(final Path resource) {
  try {
    //Null resource paths cannot resolve to a Module
    if (resource == null) {
      return null;
    }
    //Check if resource is the module root
    final org.uberfire.java.nio.file.Path path = Paths.convert(resource).normalize();
    if (hasPom(path)) {
      final Path moduleRootPath = Paths.convert(path);
      final Path pomXMLPath = Paths.convert(path.resolve(POM_PATH));
      final POM pom = pomService.load(pomXMLPath);
      return new Module(moduleRootPath,
               pomXMLPath,
               pom);
    } else {
      return null;
    }
  } catch (Exception e) {
    throw ExceptionUtilities.handleException(e);
  }
}
origin: org.uberfire/uberfire-project-backend

@Override
public Module resolveToParentModule(final Path resource) {
  try {
    //Null resource paths cannot resolve to a Module
    if (resource == null) {
      return null;
    }
    //Check if resource is the module root
    org.uberfire.java.nio.file.Path path = Paths.convert(resource).normalize();
    org.uberfire.java.nio.file.Path parentPomPath = path.resolve(POM_PATH);
    if (hasPom(path)) {
      POM parent = pomService.load(Paths.convert(parentPomPath));
      final Path moduleRootPath = Paths.convert(path);
      Module module = new Module(moduleRootPath,
                    Paths.convert(parentPomPath),
                    parent,
                    parent.getModules());
      return module;
    } else {
      return null;
    }
  } catch (Exception e) {
    throw ExceptionUtilities.handleException(e);
  }
}
origin: kiegroup/appformer

@Override
public Module resolveToParentModule(final Path resource) {
  try {
    //Null resource paths cannot resolve to a Module
    if (resource == null) {
      return null;
    }
    //Check if resource is the module root
    org.uberfire.java.nio.file.Path path = Paths.convert(resource).normalize();
    org.uberfire.java.nio.file.Path parentPomPath = path.resolve(POM_PATH);
    if (hasPom(path)) {
      POM parent = pomService.load(Paths.convert(parentPomPath));
      final Path moduleRootPath = Paths.convert(path);
      Module module = new Module(moduleRootPath,
                    Paths.convert(parentPomPath),
                    parent,
                    parent.getModules());
      return module;
    } else {
      return null;
    }
  } catch (Exception e) {
    throw ExceptionUtilities.handleException(e);
  }
}
origin: org.guvnor/guvnor-project-backend

@Override
public Project resolveToParentProject(final Path resource) {
  try {
    //Null resource paths cannot resolve to a Project
    if (resource == null) {
      return null;
    }
    //Check if resource is the project root
    org.uberfire.java.nio.file.Path path = Paths.convert(resource).normalize();
    org.uberfire.java.nio.file.Path parentPomPath = path.resolve(POM_PATH);
    if (hasPom(path)) {
      POM parent = pomService.load(Paths.convert(parentPomPath));
      final Path projectRootPath = Paths.convert(path);
      Project project = new Project(projectRootPath,
                     Paths.convert(parentPomPath),
                     projectRootPath.getFileName(),
                     parent.getModules());
      return project;
    } else {
      return null;
    }
  } catch (Exception e) {
    throw ExceptionUtilities.handleException(e);
  }
}
org.guvnor.common.services.project.backend.serverResourceResolverhasPom

Popular methods of ResourceResolver

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

Popular in Java

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
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