All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.w3c.jigsaw.ssi.commands.IfCommand

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

public class IfCommand
extends Object
implements ControlCommand
Implementation of the SSI if command.


Variable Index

 o ifstore

Constructor Index

 o IfCommand()

Method Index

 o check(CommandRegistry, ArrayDictionary, Dictionary, Request)
 o execute(SSIFrame, Request, ArrayDictionary, Dictionary)
Executes this command.
 o getName()
Returns the name of this command.
 o getPosition(String)
 o getValue(Dictionary, String, Request)
Returns the (String) value of the given variable.
 o jumpTo(SSIFrame, Request, CommandRegistry, ArrayDictionary, Dictionary)
Give the next position in the structure witch store the SSIFrame.
 o setPosition(SSIFrame, Request, CommandRegistry, ArrayDictionary, Dictionary, int)
register the command position in the structure witch store the SSIFrame.

Variables

 o ifstore
 protected static Hashtable ifstore

Constructors

 o IfCommand
 public IfCommand()

Methods

 o getValue
 public String getValue(Dictionary variables,
                        String var,
                        Request request)
Returns the (String) value of the given variable.

Returns:
a String instance.
 o getPosition
 protected static int getPosition(String name) throws ControlCommandException
 o setPosition
 public void setPosition(SSIFrame ssiframe,
                         Request request,
                         CommandRegistry registry,
                         ArrayDictionary parameters,
                         Dictionary variables,
                         int position)
register the command position in the structure witch store the SSIFrame.

 o execute
 public Reply execute(SSIFrame ssiframe,
                      Request request,
                      ArrayDictionary parameters,
                      Dictionary variables)
Executes this command. Might modify variables. Must not modify the parameters.

It may handle conditional requests, except that if it replies with a status of HTTP.NOT_MODIFIED, it must still reply with a content (the same content that it would have returned for an inconditional request). This is because further SSI commands down the line may decide thay they have been modified, and then a content must be emitted by SSIFrame.

Parameters:
request - the original HTTP request
parameters - The parameters for this command
variables - The global variables for the parse
Returns:
a Reply with the output from the command
 o check
 protected boolean check(CommandRegistry registry,
                         ArrayDictionary parameters,
                         Dictionary variables,
                         Request request)
 o jumpTo
 public int jumpTo(SSIFrame ssiframe,
                   Request request,
                   CommandRegistry registry,
                   ArrayDictionary parameters,
                   Dictionary variables) throws ControlCommandException
Give the next position in the structure witch store the SSIFrame.

Returns:
An integer
Throws: ControlCommandException
if action failed.
 o getName
 public String getName()
Returns the name of this command. (Case sensitivity is up to the lookupCommand method in the command registry.)

Returns:
the name of the command
See Also:
lookupCommand

All Packages  Class Hierarchy  This Package  Previous  Next  Index