Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-13077

Allow programatically configure Resource Mapping by exposing a service interface

    Details

    • Sprint:
      5.0.0.Alpha2 - Sprint 1

      Description

      A concept of a service should allow to programatically provide a mapped URL for a resource, either local one (JSF resource) or remote (on static server, CDN, etc.).

      public interface ResourceMapper {
         /**
          * @return null when no mapping should be involved
         public ResourceMapping mapResource(ResourceKey key);
      }
      
      public interface ResourceMapping {
          URL getURL(FacesContext context);
      }
      
      public interface StaticURLResourceMapping implements ResourceMapping {
          URL getURL();
      }
      
      public class FacesResourceMapping implements ResourceMapping {
          public ResourceKey getResourceKey() {
              ...
          }
      }
      

      This way people may decide e.g. move all resources from given resource library to another library.

      This is related to RF-11543.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                lfryc Lukáš Fryč
                Reporter:
                lfryc Lukáš Fryč
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 4 hours
                  4h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified