|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.jcr.resource.internal.helper.ResourceProviderEntry
public class ResourceProviderEntry
The ResourceProviderEntry
class represents a node in the tree of
resource providers spanned by the root paths of the provider resources.
This class is comparable to itself to help keep the child entries list sorted by their prefix.
Constructor Summary | |
---|---|
ResourceProviderEntry(String path,
ResourceProvider[] providerList)
Creates an instance of this class with the given path relative to the parent resource provider entry, encapsulating the given ResourceProvider, and a number of inital child entries. |
Method Summary | |
---|---|
boolean |
addResourceProvider(String prefix,
ResourceProvider provider,
Comparable<?> comparable)
Adds the given resource provider into the tree for the given prefix. |
int |
compareTo(ResourceProviderEntry o)
|
boolean |
containsKey(String key)
|
ResourceProviderEntry |
get(String key)
|
String |
getResolutionStats()
|
Resource |
getResource(ResourceResolver resourceResolver,
String path)
Returns the resource with the given path or null if neither
the resource provider of this entry nor the resource provider of any of
the child entries can provide the resource. |
ResourceProvider[] |
getResourceProviders()
Returns the resource provider contained in this entry |
void |
put(String key,
ResourceProviderEntry value)
|
boolean |
removeResourceProvider(String prefix,
ResourceProvider resourceProvider,
Comparable<?> comparable)
|
String |
toString()
|
Collection<ResourceProviderEntry> |
values()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ResourceProviderEntry(String path, ResourceProvider[] providerList)
path
- The relative path supported by the providerproviderList
- The resource provider to encapsulate by this entry.Method Detail |
---|
public ResourceProvider[] getResourceProviders()
public Resource getResource(ResourceResolver resourceResolver, String path)
null
if neither
the resource provider of this entry nor the resource provider of any of
the child entries can provide the resource.
path
- The path to the resource to return.
null
if no resource can
be found.
SlingException
- if an error occurrs trying to access an existing resource.public boolean addResourceProvider(String prefix, ResourceProvider provider, Comparable<?> comparable)
true
if the provider could be entered into the
subtree below this entry. Otherwise false
is
returned.public void put(String key, ResourceProviderEntry value)
public boolean containsKey(String key)
public ResourceProviderEntry get(String key)
public Collection<ResourceProviderEntry> values()
public boolean removeResourceProvider(String prefix, ResourceProvider resourceProvider, Comparable<?> comparable)
public int compareTo(ResourceProviderEntry o)
compareTo
in interface Comparable<ResourceProviderEntry>
public String getResolutionStats()
public String toString()
toString
in class Object
AbstractMap.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |