@Override public Set<String> getResourcePaths(String path) { return wrapped.getResourcePaths(path); }
protected Set<String> getPaths(String path, String extension) { Set<String> paths = new HashSet<>(); PortletContext portletContext = getPortletContext(); Queue<String> queue = new ArrayDeque<>(); queue.add(path); while ((path = queue.poll()) != null) { Set<String> childPaths = portletContext.getResourcePaths(path); if (childPaths != null) { for (String childPath : childPaths) { if (childPath.charAt(childPath.length() - 1) == CharPool.SLASH) { queue.add(childPath); } else if (childPath.endsWith(extension)) { paths.add(childPath); } } } } return paths; }
@SuppressWarnings("unchecked") public Set<String> getResourcePaths(String s) { return mPortletContext.getResourcePaths(s); }
@Override public Set<String> getResourcePaths(String path) { return portletContext.getResourcePaths(path); }
/** * @see javax.servlet.ServletContext#getResourcePaths(String) */ public Set getResourcePaths(String arg0) { return portletContext.getResourcePaths(arg0); }
@Override protected Set<String> doGetResourcePaths(String path) throws IOException { return portletContext.getResourcePaths(path); }
@Override public Set<String> getResourcePaths(String path) { return portletContext.getResourcePaths(path); }
@Override protected Set<String> doGetResourcePaths(String path) throws IOException { return portletContext.getResourcePaths(path); }
public Set getResourcePaths(String path) { return _ctx.getResourcePaths(path); }
public Set getResourcePaths(String arg0) { return portletContext.getResourcePaths(arg0); }
@Override @SuppressWarnings("unchecked") public Set<String> getResourcePaths(String path) { checkNull(path, "path"); return _portletContext.getResourcePaths(path); }
public Set getResourcePaths(String path) { AssertionUtil.assertNotNull("path is null.", path); return portletContext.getResourcePaths(path); }
public Set<String> getResourcePaths(String path) { return getWrapped().getResourcePaths(path); }
public Set<String> getResourcePaths(String path) { return getWrapped().getResourcePaths(path); }
public Set<String> getResourcePaths(String path) { return getWrapped().getResourcePaths(path); }
/** * Recursively retrieve PortletContextResources that match the given pattern, * adding them to the given result set. * @param portletContext the PortletContext to work on * @param fullPattern the pattern to match against, * with preprended root directory path * @param dir the current directory * @param result the Set of matching Resources to add to * @throws IOException if directory contents could not be retrieved * @see org.springframework.web.portlet.context.PortletContextResource * @see javax.portlet.PortletContext#getResourcePaths */ protected void doRetrieveMatchingPortletContextResources( PortletContext portletContext, String fullPattern, String dir, Set<Resource> result) throws IOException { Set<String> candidates = portletContext.getResourcePaths(dir); if (candidates != null) { boolean dirDepthNotFixed = fullPattern.contains("**"); for (Iterator<String> it = candidates.iterator(); it.hasNext();) { String currPath = it.next(); if (currPath.endsWith("/") && (dirDepthNotFixed || StringUtils.countOccurrencesOf(currPath, "/") <= StringUtils.countOccurrencesOf(fullPattern, "/"))) { doRetrieveMatchingPortletContextResources(portletContext, fullPattern, currPath, result); } if (getPathMatcher().match(fullPattern, currPath)) { result.add(new PortletContextResource(portletContext, currPath)); } } } }
/** * Recursively retrieve PortletContextResources that match the given pattern, * adding them to the given result set. * @param portletContext the PortletContext to work on * @param fullPattern the pattern to match against, * with preprended root directory path * @param dir the current directory * @param result the Set of matching Resources to add to * @throws IOException if directory contents could not be retrieved * @see org.springframework.web.portlet.context.PortletContextResource * @see javax.portlet.PortletContext#getResourcePaths */ protected void doRetrieveMatchingPortletContextResources( PortletContext portletContext, String fullPattern, String dir, Set<Resource> result) throws IOException { Set candidates = portletContext.getResourcePaths(dir); if (candidates != null) { boolean dirDepthNotFixed = fullPattern.contains("**"); for (Iterator it = candidates.iterator(); it.hasNext();) { String currPath = (String) it.next(); if (currPath.endsWith("/") && (dirDepthNotFixed || StringUtils.countOccurrencesOf(currPath, "/") <= StringUtils.countOccurrencesOf(fullPattern, "/"))) { doRetrieveMatchingPortletContextResources(portletContext, fullPattern, currPath, result); } if (getPathMatcher().match(fullPattern, currPath)) { result.add(new PortletContextResource(portletContext, currPath)); } } } }