Class JarResourceLoader

java.lang.Object
fr.paris.lutece.plugins.resource.loader.AbstractResourceLoader
fr.paris.lutece.plugins.resource.loader.JarResourceLoader
All Implemented Interfaces:
ResourceLoader

@Named("jar") @Dependent public class JarResourceLoader extends AbstractResourceLoader
Author:
Jason van Zyl
  • Field Details

  • Constructor Details

    • JarResourceLoader

      public JarResourceLoader()
  • Method Details

    • getResource

      public LuteceResource getResource(String source) throws ResourceNotFoundException
      Get an LuteceResource by name.
      Parameters:
      source - name of resource to get
      Returns:
      PlexusResource containing the resource
      Throws:
      ResourceNotFoundException - if resource not found.
    • addSearchPath

      public void addSearchPath(String path)
      Specified by:
      addSearchPath in interface ResourceLoader
      Overrides:
      addSearchPath in class AbstractResourceLoader
    • getId

      public String getId()
      Description copied from interface: ResourceLoader
      Returns the Identifier Named class
      Returns:
      Identifier Named loader
    • getOrdinal

      public int getOrdinal()
      Description copied from interface: ResourceLoader
      Return the ordinal priority value of this configuration source.

      If a resource can be loaded by multiple resource loader, the value in the resource loader with the highest ordinal takes precedence. For resource loader with the same ordinal value, the resource loader name will be used for sorting according to string sorting criteria.

      Note that this method is only evaluated during the construction of the resource manager, and does not affect the ordering of configuration sources within a configuration after that time.

      The ordinal values for the default configuration sources can be found above.

      The default implementation of this method looks for a configuration property named "config_ordinal" to determine the ordinal value for this configuration source. If the property is not found, then the default ordinal value is used.

      This method may be overridden by source loader implementations to provide a different behavior.

      Returns:
      the ordinal value