org.w3c.jigsaw.ssi.commands
Class CounterCommand

java.lang.Object
  |
  +--org.w3c.jigsaw.ssi.commands.CounterCommand

public class CounterCommand
extends java.lang.Object
implements Command

Implementation of the SSI counter command. Used to do things like cpt = cpt + 1.


Field Summary
protected  int defaultinit
           
 
Constructor Summary
CounterCommand()
           
 
Method Summary
 boolean acceptCaching()
          return true if reply can be cached.
protected  void changeCounterValue(java.util.Dictionary d, java.lang.String name, java.lang.String incr)
           
 Reply execute(SSIFrame ssiframe, Request request, ArrayDictionary parameters, java.util.Dictionary variables)
           
protected  int getCounterValue(java.util.Dictionary d, java.lang.String name)
           
 java.lang.String getName()
           
 java.lang.String getValue(java.util.Dictionary variables, java.lang.String var, Request request)
           
protected  void initCounterValue(java.util.Dictionary d, java.lang.String name, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultinit

protected final int defaultinit
Constructor Detail

CounterCommand

public CounterCommand()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface Command

getValue

public java.lang.String getValue(java.util.Dictionary variables,
                                 java.lang.String var,
                                 Request request)
Specified by:
getValue in interface Command

initCounterValue

protected void initCounterValue(java.util.Dictionary d,
                                java.lang.String name,
                                java.lang.String value)

changeCounterValue

protected void changeCounterValue(java.util.Dictionary d,
                                  java.lang.String name,
                                  java.lang.String incr)

getCounterValue

protected int getCounterValue(java.util.Dictionary d,
                              java.lang.String name)

acceptCaching

public boolean acceptCaching()
return true if reply can be cached.
Specified by:
acceptCaching in interface Command
Returns:
a boolean.

execute

public Reply execute(SSIFrame ssiframe,
                     Request request,
                     ArrayDictionary parameters,
                     java.util.Dictionary variables)
Specified by:
execute in interface Command