    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.

##

ifstore

##

IfCommand()

##

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

##

ifstore

     protected static Hashtable ifstore

##

IfCommand

     public IfCommand()

##

getValue

     public String getValue(Dictionary variables,
                            String var)

  Returns the (String) value of the given variable.

  Returns:
    a String instance.

getPosition

     protected static int getPosition(String name) throws ControlCommandException

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.

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

check

     protected boolean check(CommandRegistry registry,
                             ArrayDictionary parameters,
                             Dictionary variables)

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.

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