Class DefaultModuleResourcePathResolver

    • Constructor Detail

      • DefaultModuleResourcePathResolver

        public DefaultModuleResourcePathResolver()
    • Method Detail

      • getPriority

        public int getPriority()
        Specified by:
        getPriority in interface ModuleResourcePathResolver
        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: ModuleResourcePathResolver
        Indicates if this path resolver resolves the given resource type.
        Specified by:
        accept in interface ModuleResourcePathResolver
        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: ModuleResourcePathResolver
        Given 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:
        resolveDefaultPath in interface ModuleResourcePathResolver
        Parameters:
        pkg - A package within a module.
        Returns:
        the expected by default path for the given extension.