com.hammurapi.common

## Class ResourceLoaderImpl

- java.lang.Object
- - com.hammurapi.common.ResourceLoaderImpl

- All Implemented Interfaces:
    ResourceLoader
  Direct Known Subclasses:
    ClassResourceLoader

      public class ResourceLoaderImpl
      extends Object
      implements ResourceLoader

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResourceLoaderImpl(ResourceSet resourceSet, String... resolutionPaths)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,Object>` | `getProperties(String profile, Locale locale, String extension)` Collects properties from class hierarchy.
    `Map<String,Object>` | `getProperties(String profile, Locale locale, String extension, ClassLoader classLoader)` Collects properties from class hierarchy.
    `Map<String,Object>` | `getProperties(String profile, String extension)` Collects properties from class hierarchy.
    `URL` | `getResource(String scriptName, Locale locale, String extension)`
    `URL` | `getResource(String scriptName, String extension)`
    `InputStream` | `getResourceStream(String scriptName, Locale locale, String extension)`
    `InputStream` | `getResourceStream(String scriptName, String extension)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ResourceLoaderImpl

          public ResourceLoaderImpl(ResourceSet resourceSet,
                            String... resolutionPaths)

  - ### Method Detail

    - #### getResourceStream

          public InputStream getResourceStream(String scriptName,
                                      String extension)

      Specified by:
        `getResourceStream` in interface `ResourceLoader`
      Parameters:
        `profile` - Profile, can be null
        `extension` - Extension, can be null
      Returns:

    - #### getResource

          public URL getResource(String scriptName,
                        String extension)

      Specified by:
        `getResource` in interface `ResourceLoader`

    - #### getResourceStream

          public InputStream getResourceStream(String scriptName,
                                      Locale locale,
                                      String extension)

      Specified by:
        `getResourceStream` in interface `ResourceLoader`
      Parameters:
        `scriptName` -
        `extension` -
      Returns:

    - #### getResource

          public URL getResource(String scriptName,
                        Locale locale,
                        String extension)

      Specified by:
        `getResource` in interface `ResourceLoader`
      Parameters:
        `scriptName` -
        `extension` -
      Returns:

    - #### getProperties

          public Map<String,Object> getProperties(String profile,
                                         String extension)

      Collects properties from class hierarchy.
      Specified by:
        `getProperties` in interface `ResourceLoader`
      Parameters:
        `profile` - Profile, can be null
        `extension` - Extension, can be null
      Returns:

    - #### getProperties

          public Map<String,Object> getProperties(String profile,
                                         Locale locale,
                                         String extension)

      Collects properties from class hierarchy.
      Specified by:
        `getProperties` in interface `ResourceLoader`
      Parameters:
        `profile` -
        `extension` -
      Returns:

    - #### getProperties

          public Map<String,Object> getProperties(String profile,
                                         Locale locale,
                                         String extension,
                                         ClassLoader classLoader)

      Collects properties from class hierarchy. Property can have type. Type name is enclosed into parenthesis, e.g. `attempts(java.lang.Integer)=33`. If property is defined with type then string value of the property is converted to the target type. If not, property type is String.
      Parameters:
        `profile` -
        `extension` -
      Returns: