com.uwyn.rife.resources
Interface ResourceWriter

All Known Implementing Classes:
DatabaseResources

public interface ResourceWriter

This interface defines the methods that classes with ResourceWriter functionalities have to implement.

A ResourceWriter provides an abstract way of modifying resources. According to a name, a resource and its content can be added, updated or removed.

Since:
1.0
Version:
$Revision: 3634 $
Author:
Geert Bevin (gbevin[remove] at uwyn dot com)
See Also:
ResourceFinder

Method Summary
 void addResource(String name, String content)
          Adds a resource with the provided name and content.
 boolean removeResource(String name)
          Removes the resource with the provided name.
 boolean updateResource(String name, String content)
          Updates the content of the resource with the provided name.
 

Method Detail

addResource

void addResource(String name,
                 String content)
                 throws ResourceWriterErrorException
Adds a resource with the provided name and content.

Parameters:
name - the name of the resource
content - the content of the resource
Throws:
ResourceWriterErrorException - if an error occurred during the resource addition.
Since:
1.0

updateResource

boolean updateResource(String name,
                       String content)
                       throws ResourceWriterErrorException
Updates the content of the resource with the provided name.

Parameters:
name - the name of the resource
content - the content of the resource
Throws:
ResourceWriterErrorException - if an error occurred during the resource update.
Since:
1.0

removeResource

boolean removeResource(String name)
                       throws ResourceWriterErrorException
Removes the resource with the provided name.

Parameters:
name - the name of the resource
Throws:
ResourceWriterErrorException - if an error occurred during the resource removal.
Since:
1.0


Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.