org.richfaces.resource.mapping

## Class PropertiesResourceMapper

- java.lang.Object
- - org.richfaces.resource.mapping.PropertiesResourceMapper

- All Implemented Interfaces:
    Initializable, ResourceAggregator, ResourceMapper, Prioritizable

      public class PropertiesResourceMapper
      extends Object
      implements ResourceMapper, ResourceAggregator, Initializable, Prioritizable

  Maps resources according to properties configuration of Resource Mapping and Resource Optimization
  Author:
    Lukas Fryc

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PropertiesResourceMapper()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Set<ResourceKey>` | `getAggregatedResources(ResourcePath resourcePath)` Returns a set of resources which can be found on common URL.
    `int` | `getPriority()` Zero-relative priority.
    `void` | `init()` Called during service initialization time
    `ResourceMapping` | `mapResource(ResourceKey resourceKey)` Determines whether resource identified by given key is mapped to another resource.
    `void` | `release()` Called when releasing associated services

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

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

- - ### Constructor Detail

    - #### PropertiesResourceMapper

          public PropertiesResourceMapper()

  - ### Method Detail

    - #### init

          public void init()

      Description copied from interface: `Initializable`
      Called during service initialization time
      Specified by:
        `init` in interface `Initializable`

    - #### release

          public void release()

      Description copied from interface: `Initializable`
      Called when releasing associated services
      Specified by:
        `release` in interface `Initializable`

    - #### mapResource

          public ResourceMapping mapResource(ResourceKey resourceKey)

      Description copied from interface: `ResourceMapper`
      Determines whether resource identified by given key is mapped to another resource.
      Specified by:
        `mapResource` in interface `ResourceMapper`
      Parameters:
        `resourceKey` - the key of the resource to be checked for existence of its mapping
      Returns:
        the mapping for a resource given by a key; or null if no mapping is specified by this

    - #### getAggregatedResources

          public Set<ResourceKey> getAggregatedResources(ResourcePath resourcePath)

      Description copied from interface: `ResourceAggregator`
      Returns a set of resources which can be found on common URL.
      Specified by:
        `getAggregatedResources` in interface `ResourceAggregator`
      Parameters:
        `resourcePath` - an absolute URL under which resource can be found
      Returns:
        a set of resources which can be found on common URL.

    - #### getPriority

          public int getPriority()

      Description copied from interface: `Prioritizable`

      Zero-relative priority.

      The higher priority means that the service will be loaded sooner,
      the lower priority means that the service will be loaded later.

      By default, any service (even though it isn't Prioritizable has priority equal to 0.

      Specified by:
        `getPriority` in interface `Prioritizable`
      Returns:
        priority of the service as compared to other service of same type

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.