Class DefaultModuleResourcePathResolver
- java.lang.Object
-
- org.guvnor.common.services.project.backend.server.DefaultModuleResourcePathResolver
-
- All Implemented Interfaces:
ModuleResourcePathResolver
@ApplicationScoped public class DefaultModuleResourcePathResolver extends Object implements ModuleResourcePathResolver
This is the by default resource path resolver to apply when no resolver has been set for a given resource type.
-
-
Constructor Summary
Constructors Constructor Description DefaultModuleResourcePathResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(String resourceType)Indicates if this path resolver resolves the given resource type.intgetPriority()org.uberfire.backend.vfs.PathresolveDefaultPath(org.guvnor.common.services.project.model.Package pkg)Given a package resolves where the currently accepted resourceType should be placed by default.
-
-
-
Method Detail
-
getPriority
public int getPriority()
- Specified by:
getPriorityin interfaceModuleResourcePathResolver- Returns:
- Defines the resolver priority. If two resolvers are found for the same resource type, the one with highest priority will be used.
-
accept
public boolean accept(String resourceType)
Description copied from interface:ModuleResourcePathResolverIndicates if this path resolver resolves the given resource type.- Specified by:
acceptin interfaceModuleResourcePathResolver- Parameters:
resourceType- a file extension.- Returns:
- true if current resolver resolves the given resourceType, false in any other case.
-
resolveDefaultPath
public org.uberfire.backend.vfs.Path resolveDefaultPath(org.guvnor.common.services.project.model.Package pkg)
Description copied from interface:ModuleResourcePathResolverGiven a package resolves where the currently accepted resourceType should be placed by default. e.g. for a package org.kie and a drl extension, the by default target path will be src/main/resources/org/kie, and for a java extension with the same package the by default target path will be src/main/java/org/kie- Specified by:
resolveDefaultPathin interfaceModuleResourcePathResolver- Parameters:
pkg- A package within a module.- Returns:
- the expected by default path for the given extension.
-
-