org.specrunner.core.pipes
Class PipeTimestamp

java.lang.Object
  extended by org.specrunner.core.pipes.AbstractPipeModel
      extended by org.specrunner.core.pipes.PipeTimestamp
All Implemented Interfaces:
IPipe

public class PipeTimestamp
extends AbstractPipeModel

Adds a time stamp tag to the channel.

Author:
Thiago Santos

Field Summary
static String DATE
          Time model information.
protected  SimpleDateFormat sdf
          Report date format.
 
Constructor Summary
PipeTimestamp()
           
 
Method Summary
protected  SimpleDateFormat createFormatter()
          Creates the formatter.
static Long lookup(IChannel channel)
          Recover time stamp from channel.
 IChannel process(IChannel channel, Map<String,Object> model)
          Process the channel with the model already recovered.
 
Methods inherited from class org.specrunner.core.pipes.AbstractPipeModel
check, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATE

public static final String DATE
Time model information.

See Also:
Constant Field Values

sdf

protected SimpleDateFormat sdf
Report date format.

Constructor Detail

PipeTimestamp

public PipeTimestamp()
Method Detail

createFormatter

protected SimpleDateFormat createFormatter()
Creates the formatter.

Returns:
The formater.

process

public IChannel process(IChannel channel,
                        Map<String,Object> model)
                 throws PipelineException
Description copied from class: AbstractPipeModel
Process the channel with the model already recovered.

Specified by:
process in class AbstractPipeModel
Parameters:
channel - The pipeline channel.
model - The model.
Returns:
The channel itself.
Throws:
PipelineException - On pipeline errors.

lookup

public static Long lookup(IChannel channel)
                   throws NotFoundException,
                          InvalidTypeException
Recover time stamp from channel.

Parameters:
channel - The channel.
Returns:
The time stamp.
Throws:
NotFoundException - On lookup errors.
InvalidTypeException - On type errors.


Copyright © 2014. All rights reserved.