All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.ssi.IfCommand

java.lang.Object
   |
   +----w3c.jigsaw.ssi.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)
 o execute(SSIResource, Request, ArrayDictionary, Dictionary)
Executes this command.
 o getName()
Returns the name of this command.
 o getPosition(String)
 o getValue(Dictionary, String)
Returns the (String) value of the given variable.
 o jumpTo(SSIResource, CommandRegistry, ArrayDictionary, Dictionary)
Give the next position in the structure witch store the SSIResource.
 o setPosition(SSIResource, CommandRegistry, ArrayDictionary, Dictionary, int)
register the command position in the structure witch store the SSIResource.

Variables

 o ifstore
 protected static Hashtable ifstore

Constructors

 o IfCommand
 public IfCommand()

Methods

 o getValue
 public String getValue(Dictionary variables,
                        String var)
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(SSIResource resource,
                         CommandRegistry registry,
                         ArrayDictionary parameters,
                         Dictionary variables,
                         int position)
register the command position in the structure witch store the SSIResource.

 o execute
 public Reply execute(SSIResource resource,
                      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 SSIResource.

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)
 o jumpTo
 public int jumpTo(SSIResource resource,
                   CommandRegistry registry,
                   ArrayDictionary parameters,
                   Dictionary variables) throws ControlCommandException
Give the next position in the structure witch store the SSIResource.

 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