net.sf.mmm.util.resource.api.spi
Interface DataResourceProvider<R extends DataResource>

Type Parameters:
R - is the generic type of the managed resources.
All Known Implementing Classes:
AbstractDataResourceProvider, ClasspathResourceProvider, FileResourceProvider, UrlResourceProvider

public interface DataResourceProvider<R extends DataResource>

This is the interface for a provider of DataResource.

Since:
2.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Method Summary
 R createResource(ResourceUri resourceUri)
          This method creates a new resource for the given resourceUri.
 Class<R> getResourceType()
          This method gets the type of the resource managed by this provider.
 String[] getSchemePrefixes()
          This method gets the scheme-prefix of the resources managed by this provider.
 

Method Detail

getSchemePrefixes

String[] getSchemePrefixes()
This method gets the scheme-prefix of the resources managed by this provider.

Returns:
the scheme-prefix.
See Also:
ResourceUri.getSchemePrefix()

getResourceType

Class<R> getResourceType()
This method gets the type of the resource managed by this provider. This is e.g. used to determine if the managed resources implement BrowsableResource.

Returns:
the class reflecting the type of the resources.

createResource

R createResource(ResourceUri resourceUri)
This method creates a new resource for the given resourceUri.

Parameters:
resourceUri - is the ResourceUri.
Returns:
the resource for the given resourceUri.


Copyright © 2001-2010 mmm-Team. All Rights Reserved.