/** * Overridden version which checks for PortletContextResource * and uses {@code PortletContext.getResourcePaths} to find * matching resources below the web application root directory. * In case of other resources, delegates to the superclass version. * @see #doRetrieveMatchingPortletContextResources * @see PortletContextResource * @see javax.portlet.PortletContext#getResourcePaths */ @Override protected Set<Resource> doFindPathMatchingFileResources(Resource rootDirResource, String subPattern) throws IOException { if (rootDirResource instanceof PortletContextResource) { PortletContextResource pcResource = (PortletContextResource) rootDirResource; PortletContext pc = pcResource.getPortletContext(); String fullPattern = pcResource.getPath() + subPattern; Set<Resource> result = new HashSet<Resource>(); doRetrieveMatchingPortletContextResources(pc, fullPattern, pcResource.getPath(), result); return result; } return super.doFindPathMatchingFileResources(rootDirResource, subPattern); }
/** * Overridden version which checks for PortletContextResource * and uses <code>PortletContext.getResourcePaths</code> to find * matching resources below the web application root directory. * In case of other resources, delegates to the superclass version. * @see #doRetrieveMatchingPortletContextResources * @see org.springframework.web.portlet.context.PortletContextResource * @see javax.portlet.PortletContext#getResourcePaths */ @Override protected Set<Resource> doFindPathMatchingFileResources(Resource rootDirResource, String subPattern) throws IOException { if (rootDirResource instanceof PortletContextResource) { PortletContextResource pcResource = (PortletContextResource) rootDirResource; PortletContext pc = pcResource.getPortletContext(); String fullPattern = pcResource.getPath() + subPattern; Set<Resource> result = new HashSet<Resource>(); doRetrieveMatchingPortletContextResources(pc, fullPattern, pcResource.getPath(), result); return result; } return super.doFindPathMatchingFileResources(rootDirResource, subPattern); }