net.sf.mmm.util.resource.impl.spi
Class FileResourceProvider

java.lang.Object
  extended by net.sf.mmm.util.component.base.AbstractComponent
      extended by net.sf.mmm.util.component.base.AbstractLoggableComponent
          extended by net.sf.mmm.util.resource.base.spi.AbstractDataResourceProvider<FileResource>
              extended by net.sf.mmm.util.resource.impl.spi.FileResourceProvider
All Implemented Interfaces:
DataResourceProvider<FileResource>

@Singleton
@Named
public class FileResourceProvider
extends AbstractDataResourceProvider<FileResource>

This is the implementation of DataResourceProvider for FileResource.

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

Field Summary
private  FileUtil fileUtil
           
 
Constructor Summary
FileResourceProvider()
          The constructor.
 
Method Summary
 FileResource createResource(ResourceUri resourceUri)
          This method creates a new resource for the given resourceUri.
protected  void doInitialize()
          This method performs the actual initialization.
 Class<FileResource> 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.
 void setFileUtil(FileUtil fileUtil)
           
 
Methods inherited from class net.sf.mmm.util.component.base.AbstractLoggableComponent
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
 

Field Detail

fileUtil

private FileUtil fileUtil
See Also:
createResource(ResourceUri)
Constructor Detail

FileResourceProvider

public FileResourceProvider()
The constructor.

Method Detail

doInitialize

protected void doInitialize()
This method performs the actual initialization. It is called when AbstractComponent.initialize() is invoked for the first time.
ATTENTION:
When you override this method from a sub-class you need to do a super.AbstractComponent.doInitialize().

Overrides:
doInitialize in class AbstractLoggableComponent

setFileUtil

@Inject
public void setFileUtil(FileUtil fileUtil)
Parameters:
fileUtil - is the fileUtil to set

getSchemePrefixes

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

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

getResourceType

public Class<FileResource> 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

public FileResource 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.