com.dtolabs.rundeck.core.storage
Class StorageTimestamperConverter

java.lang.Object
  extended by com.dtolabs.rundeck.core.storage.StorageTimestamperConverter
All Implemented Interfaces:
StorageConverterPlugin

public class StorageTimestamperConverter
extends java.lang.Object
implements StorageConverterPlugin

StorageTimestamperConverter sets modification and creation timestamp metadata for updated/created resources.

Since:
2014-03-16

Constructor Summary
StorageTimestamperConverter()
           
 
Method Summary
 HasInputStream createResource(Path path, ResourceMetaBuilder resourceMetaBuilder, HasInputStream hasInputStream)
          Convert a resource during create operation and return a new data stream, or null to pass the data without changing.
 HasInputStream readResource(Path path, ResourceMetaBuilder resourceMetaBuilder, HasInputStream hasInputStream)
          Convert a resource during read operation and return a new data stream, or null to pass the data without changing.
 HasInputStream updateResource(Path path, ResourceMetaBuilder resourceMetaBuilder, HasInputStream hasInputStream)
          Convert a resource during update operation and return a new data stream, or null to pass the data without changing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StorageTimestamperConverter

public StorageTimestamperConverter()
Method Detail

readResource

public HasInputStream readResource(Path path,
                                   ResourceMetaBuilder resourceMetaBuilder,
                                   HasInputStream hasInputStream)
Description copied from interface: StorageConverterPlugin
Convert a resource during read operation and return a new data stream, or null to pass the data without changing.

Specified by:
readResource in interface StorageConverterPlugin
Parameters:
path - input path
resourceMetaBuilder - builder to modify metadata
hasInputStream - accessor for underlying data stream
Returns:
new data stream, or null

createResource

public HasInputStream createResource(Path path,
                                     ResourceMetaBuilder resourceMetaBuilder,
                                     HasInputStream hasInputStream)
Description copied from interface: StorageConverterPlugin
Convert a resource during create operation and return a new data stream, or null to pass the data without changing.

Specified by:
createResource in interface StorageConverterPlugin
Parameters:
path - input path
resourceMetaBuilder - builder to modify metadata
hasInputStream - accessor for underlying data stream
Returns:
new data stream, or null

updateResource

public HasInputStream updateResource(Path path,
                                     ResourceMetaBuilder resourceMetaBuilder,
                                     HasInputStream hasInputStream)
Description copied from interface: StorageConverterPlugin
Convert a resource during update operation and return a new data stream, or null to pass the data without changing.

Specified by:
updateResource in interface StorageConverterPlugin
Parameters:
path - input path
resourceMetaBuilder - builder to modify metadata
hasInputStream - accessor for underlying data stream
Returns:
new data stream, or null