public class DefaultContentCache extends java.lang.Object implements ContentCache
| Constructor and Description | 
|---|
DefaultContentCache(java.util.List<ContentRoot> roots)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
acceptsUrl(ContentRoot root,
          java.net.URL url)
Gets whether a content root accepts a URL. 
 | 
ContentDirectory | 
getContainingDirectory(ContentDirectory directory)
Gets the containing content directory of a content set directory, or
 null if the directory is a root directory. 
 | 
java.util.Collection<ContentDirectory> | 
getDirectories(java.net.URL url)
Gets the content directories for a URL. 
 | 
java.util.Collection<ContentDirectory> | 
getRootDirectories(java.util.Set<ContentRoot.Type> types)
Gets the content directories for the content roots of the cached projects. 
 | 
java.util.Collection<ContentRoot> | 
getRoots()
Gets the content roots of the workspace or project. 
 | 
java.util.Collection<ContentRoot> | 
getRoots(java.net.URL url)
Gets the content roots which contain a URL, ordered from longest to
 shortest, or empty if none. 
 | 
public DefaultContentCache(java.util.List<ContentRoot> roots)
public java.util.Collection<ContentRoot> getRoots()
ContentCachegetRoots in interface ContentCachepublic java.util.Collection<ContentRoot> getRoots(java.net.URL url)
ContentCachegetRoots in interface ContentCacheContentCache.acceptsUrl(ContentRoot, URL)public boolean acceptsUrl(ContentRoot root, java.net.URL url)
ContentCacheIntersectedFilters.isIncluded(String); for directory URLs,
 with IntersectedFilters.inferFromFilters(String).acceptsUrl in interface ContentCacheroot - The content set root.url - The URL to test.public java.util.Collection<ContentDirectory> getRootDirectories(java.util.Set<ContentRoot.Type> types)
ContentCacheSince roots from different content sets that have the same URL are merged into a single content directory, there may be fewer content directories than roots. Note that neither project nor root filters apply to the roots themselves.
getRootDirectories in interface ContentCachetypes - The content root types for which to get directories.public java.util.Collection<ContentDirectory> getDirectories(java.net.URL url)
ContentCacheIf the specified URL is a directory URL, the URL of the directories will be that URL; if the specified URL is a file URL, the URL of the directories will be the parent of that URL.
getDirectories in interface ContentCachepublic ContentDirectory getContainingDirectory(ContentDirectory directory)
ContentCachegetContainingDirectory in interface ContentCache