|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.util.component.base.AbstractComponent
net.sf.mmm.util.component.base.AbstractLoggableComponent
net.sf.mmm.util.resource.base.AbstractDataResourceFactory
net.sf.mmm.util.resource.base.AbstractBrowsableResourceFactory
public abstract class AbstractBrowsableResourceFactory
This is the abstract base implementation of the
BrowsableResourceFactory interface.
| Nested Class Summary | |
|---|---|
protected class |
AbstractBrowsableResourceFactory.BrowsableResourceAdapter
This is an implementation of the BrowsableResource interface, that
adapts another BrowsableResource and
enhances the AbstractBrowsableResourceFactory.BrowsableResourceAdapter.navigate(String)-method to support switching schemes
via the BrowsableResourceFactory that created this
BrowsableResource. |
| Nested classes/interfaces inherited from class net.sf.mmm.util.resource.base.AbstractDataResourceFactory |
|---|
AbstractDataResourceFactory.DataResourceAdapter |
| Field Summary | |
|---|---|
private Map<String,DataResourceProvider<? extends DataResource>> |
schema2providerMap
|
| Constructor Summary | |
|---|---|
AbstractBrowsableResourceFactory()
The constructor. |
|
| Method Summary | |
|---|---|
protected BrowsableResource |
createBrowsableResource(ResourceUri resourceUri)
This method creates the actual raw
BrowsableResource. |
BrowsableResource |
createBrowsableResource(String resourceUri)
This method creates a new BrowsableResource from the given
resourceUri. |
protected DataResource |
createDataResource(ResourceUri resourceUri)
This method creates the actual raw
DataResource. |
protected DataResourceProvider<? extends DataResource> |
getProvider(ResourceUri resourceUri)
This method gets the provider for the given
resourceUri. |
void |
registerProvider(DataResourceProvider<? extends DataResource> provider)
This method registers the given provider. |
void |
registerProvider(DataResourceProvider<? extends DataResource> provider,
String schemaPrefix)
This method registers the given provider for the given
schemaPrefix. |
| Methods inherited from class net.sf.mmm.util.resource.base.AbstractDataResourceFactory |
|---|
createDataResource |
| Methods inherited from class net.sf.mmm.util.component.base.AbstractLoggableComponent |
|---|
doInitialize, getLogger, setLogger |
| Methods inherited from class net.sf.mmm.util.component.base.AbstractComponent |
|---|
doInitialized, getInitializationState, initialize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.mmm.util.resource.api.DataResourceFactory |
|---|
createDataResource |
| Field Detail |
|---|
private final Map<String,DataResourceProvider<? extends DataResource>> schema2providerMap
createBrowsableResource(ResourceUri)| Constructor Detail |
|---|
public AbstractBrowsableResourceFactory()
| Method Detail |
|---|
public void registerProvider(DataResourceProvider<? extends DataResource> provider)
throws DuplicateObjectException
provider.
provider - is the DataResourceProvider to register.
DuplicateObjectException - if a DataResourceProvider is
already registered for one of the
scheme-prefixes.
public void registerProvider(DataResourceProvider<? extends DataResource> provider,
String schemaPrefix)
throws DuplicateObjectException
provider for the given
schemaPrefix.
provider - is the DataResourceProvider to register.schemaPrefix - is the scheme-prefix for which the provider shall be registered.
DuplicateObjectException - if a DataResourceProvider is
already registered with the same
scheme-prefix.
protected DataResourceProvider<? extends DataResource> getProvider(ResourceUri resourceUri)
throws ResourceUriUndefinedException
provider for the given
resourceUri.
resourceUri - is the ResourceUriImpl.
DataResourceProvider
responsible for
the given resourceUri.
ResourceUriUndefinedException - if no provider is registered that is responsible.
protected DataResource createDataResource(ResourceUri resourceUri)
throws ResourceUriUndefinedException
creates the actual raw
DataResource.
createDataResource in class AbstractDataResourceFactoryresourceUri - is the parsed and qualified ResourceUriImpl.
DataResource.
ResourceUriUndefinedException - if the given resourceUri
is undefined, e.g. the scheme-prefix is NOT supported by this factory.
protected BrowsableResource createBrowsableResource(ResourceUri resourceUri)
throws ResourceUriUndefinedException
creates the actual raw
BrowsableResource.
resourceUri - is the parsed and qualified ResourceUriImpl.
BrowsableResource.
ResourceUriUndefinedException - if the given resourceUri
is undefined, e.g. the scheme-prefix is NOT supported by this factory.
public BrowsableResource createBrowsableResource(String resourceUri)
throws ResourceUriUndefinedException
BrowsableResource from the given
resourceUri. The following URI-schemes are guaranteed to be
supported:
| scheme | example URI | default implementation |
|---|---|---|
| file | file:///tmp/foo.xml | FileResource |
createBrowsableResource in interface BrowsableResourceFactoryresourceUri - is the absolute URI
pointing to the location of the requested BrowsableResource.
BrowsableResource.
ResourceUriUndefinedException - if the given resourceUri
is undefined (e.g. the scheme is NOT supported).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||