01: // CommandRegistry.java
02: // $Id: CommandRegistry.java,v 1.3 2000/08/16 21:37:47 ylafon Exp $
03: // (c) COPYRIGHT MIT and INRIA, 1996.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05:
06: package org.w3c.jigsaw.ssi.commands;
07:
08: import java.util.Dictionary;
09: import org.w3c.jigsaw.http.Request;
10: import org.w3c.jigsaw.ssi.SSIFrame;
11:
12: /**
13: * This class represents a group of SSI commands. This is an abstract
14: * class. A concrete subclass of this class is supplied to the
15: * SSIFrame for finding the commands present in the document.
16: *
17: * @see org.w3c.jigsaw.ssi.commands.BasicCommandRegistry
18: * @see org.w3c.jigsaw.ssi.commands.DefaultCommandRegistry
19: * @author Antonio Ramirez <anto@mit.edu>
20: */
21:
22: public abstract class CommandRegistry implements java.io.Serializable {
23: /**
24: * Look up a command from its name.
25: * (Should <em>never</em> return null, and have a pseudo-command
26: * to handle non-existent commands).
27: *
28: * @param name the name
29: * @return the command
30: */
31: public abstract Command lookupCommand(String name);
32:
33: /**
34: * Initialize execution variables. Called before any of the SSI
35: * commands in the documents are executed. This method augments
36: * or modifies the dictionary given as argument. If the variable
37: * dictionary is null, it may create a new one and return it.
38: * SSIFrame will always call this method with variables set to
39: * null. Its existence is mainly to facilitate the subclassing of
40: * an existing registry.
41: *
42: * @param request the HTTP request
43: * @param variables other variables previously defined
44: * @return the modified/augmented set of variables */
45: public abstract Dictionary initVariables(SSIFrame ssiframe,
46: Request request, Dictionary variables);
47: }
|