package org.plenix.jsp.language;

import com.kav.xsl.XSLStylesheet;
import java.util.Enumeration;
import javax.servlet.http.*;

public interface LanguageProcessor
{
  // Builders
  public void addName(String name);
  public void setSourceExtension(String extension);
  public void setObjectExtension(String extension);
  public void addStylesheet(String version, XSLStylesheet stylesheet);
  public void addParameter(String name, String value);

  // Accessors
  public String getName();
  public String[] getNames();
  public String getSourceExtension();
  public String getObjectExtension();
  public XSLStylesheet getStylesheet(String version);
  public String getParameter(String name);
  public Enumeration getParameterNames();

  // Program instance services
  public void init(String path) throws LanguageException;
  public void compile(String baseName, String path) throws LanguageException;
  public Object load(String baseName, String path) throws LanguageException;
  public void unload(Object program) throws LanguageException;
  public void execute(Object program, HttpServletRequest request, HttpServletResponse response)
          throws LanguageException;
}
