railo.commons.io.res
Interface ResourceProvider

All Superinterfaces:
java.io.Serializable

public interface ResourceProvider
extends java.io.Serializable

Interface for resource provider, loaded by "Resources", classes that implement a provider that produce resources, that match given path.


Method Summary
 java.util.Map getArguments()
          returns the arguments defined for this resource
 Resource getResource(java.lang.String path)
          return a resource that match given path
 java.lang.String getScheme()
          returns the scheme of the resource
 ResourceProvider init(java.lang.String scheme, java.util.Map arguments)
          this class is called by the "Resources" at startup
 boolean isAttributesSupported()
          returns if the resource support attributes for his resources
 boolean isCaseSensitive()
          returns if the resources of the provider are case-sensitive or not
 boolean isModeSupported()
          returns if the resource support mode for his resources
 void lock(Resource res)
           
 void read(Resource res)
           
 void setResources(Resources resources)
           
 void unlock(Resource res)
           
 

Method Detail

init

public ResourceProvider init(java.lang.String scheme,
                             java.util.Map arguments)
this class is called by the "Resources" at startup

Parameters:
scheme - of the provider (can be "null")
arguments - initals argument (can be "null")

getResource

public Resource getResource(java.lang.String path)
return a resource that match given path

Parameters:
path -
Returns:
matching resource to path

getScheme

public java.lang.String getScheme()
returns the scheme of the resource

Returns:
scheme

getArguments

public java.util.Map getArguments()
returns the arguments defined for this resource

Returns:
scheme

setResources

public void setResources(Resources resources)

unlock

public void unlock(Resource res)

lock

public void lock(Resource res)
          throws java.io.IOException
Throws:
java.io.IOException

read

public void read(Resource res)
          throws java.io.IOException
Throws:
java.io.IOException

isCaseSensitive

public boolean isCaseSensitive()
returns if the resources of the provider are case-sensitive or not

Returns:
is resource case-sensitive or not

isModeSupported

public boolean isModeSupported()
returns if the resource support mode for his resources

Returns:
is mode supported or not

isAttributesSupported

public boolean isAttributesSupported()
returns if the resource support attributes for his resources

Returns:
is attributes supported or not