Interface PathMatchingHelper


  • public interface PathMatchingHelper
    An interface for plug ins to JBossEnabledResourcePatternResolver that avoids direct dependencies on application server specifics.
    Author:
    dward
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean canHandle​(URL rootURL)
      Indicates whether this helper is capable of searching the given URL (i.e.
      org.springframework.core.io.Resource getResource​(URL url)
      Gets the resource at the given URL.
      Set<org.springframework.core.io.Resource> getResources​(org.springframework.util.PathMatcher matcher, URL rootURL, String subPattern)
      Gets the set of resources under the given URL whose path matches the given sub pattern.
    • Method Detail

      • canHandle

        boolean canHandle​(URL rootURL)
        Indicates whether this helper is capable of searching the given URL (i.e. its protocol is supported).
        Parameters:
        rootURL - the root url to be searched
        Returns:
        true if this helper is capable of searching the given URL
      • getResource

        org.springframework.core.io.Resource getResource​(URL url)
                                                  throws IOException
        Gets the resource at the given URL.
        Parameters:
        url - URL
        Returns:
        the resource at the given URL
        Throws:
        IOException - for any error
      • getResources

        Set<org.springframework.core.io.Resource> getResources​(org.springframework.util.PathMatcher matcher,
                                                               URL rootURL,
                                                               String subPattern)
                                                        throws IOException
        Gets the set of resources under the given URL whose path matches the given sub pattern.
        Parameters:
        matcher - the matcher
        rootURL - the root URL to be searched
        subPattern - the ant-style pattern to match
        Returns:
        the set of matching resources
        Throws:
        IOException - for any error