/*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * (the "License"); you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
 * 
 * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
 * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
 * language governing rights and limitations under the License.
 * 
 * The Original Code is the Venice Web Communities System.
 * 
 * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
 * for Silverwrist Design Studios.  Portions created by Eric J. Bowersox are
 * Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios.  All Rights Reserved.
 * 
 * Contributor(s): 
 */
package com.silverwrist.venice.ui;

import java.awt.Dimension;
import java.io.InputStream;
import java.io.IOException;
import java.util.Date;
import java.util.Enumeration;
import java.util.Map;
import com.silverwrist.util.ServletMultipartException;
import com.silverwrist.venice.core.CommunityContext;
import com.silverwrist.venice.core.UserContext;
import com.silverwrist.venice.core.VeniceEngine;
import com.silverwrist.venice.except.*;
import com.silverwrist.venice.ui.dlg.Dialog;
import com.silverwrist.venice.ui.helpers.ErrorBox;
import com.silverwrist.venice.ui.menus.MenuComponent;
import com.silverwrist.venice.ui.script.ScriptManager;

public interface RequestInput extends LinkTypes
{
  public static final String LOGIN_COOKIE = "VeniceAuth";
  public static final int LOGIN_COOKIE_AGE = 60*60*24*365;  // one year
  public static final String LEFT_MENU_SESSION_ATTR = "LeftMenu";

  public abstract String mapPath(String s);

  public abstract String getContextPath();

  public abstract String getServletPath();

  public abstract String getPathInfo();

  public abstract String getQueryString();

  public abstract String getVerb();

  public abstract String getSourceAddress();

  public abstract boolean hasParameter(String name);

  public abstract String getParameter(String name);

  public abstract int getParameterInt(String name, int default_value);

  public abstract short getParameterShort(String name, short default_value);

  public abstract long getParameterLong(String name, long default_value);

  public abstract Enumeration getParameterNames();

  public abstract String[] getParameterValues(String name);

  public abstract boolean isFileParam(String name);

  public abstract String getParameterType(String name);

  public abstract int getParameterSize(String name);

  public abstract InputStream getParameterDataStream(String name) throws ServletMultipartException;

  public abstract boolean isImageButtonClicked(String name);

  public abstract Object getAppAttribute(String name);

  public abstract void setAppAttribute(String name, Object o);

  public abstract Object getSessionAttribute(String name);

  public abstract void setSessionAttribute(String name, Object o);

  public abstract Object getRequestAttribute(String name);

  public abstract void setRequestAttribute(String name, Object o);

  public abstract void savePersistentCookie(String name, String value, int max_age);

  public abstract void saveTemporaryCookie(String name, String value);

  public abstract void deleteCookie(String name);

  public abstract VeniceEngine getEngine();

  public abstract UserContext getUser();

  public abstract void replaceUser(UserContext new_user);

  public abstract ScriptManager getScriptManager();

  public abstract String getStyleSheetData() throws IOException;

  public abstract String getColor(int selector);

  public abstract String getColor(String name);

  public abstract boolean useHTMLComments();

  public abstract String formatURL(String url, int type);

  public abstract String formatDate(Date date);

  public abstract String getFontTag(int colorsel, int size);

  public abstract String getFontTag(String color, int size);

  public abstract String getFontTag(int colorsel, String size);

  public abstract String getFontTag(String color, String size);

  public abstract int convertLinkType(String str);

  public abstract String getLocation();

  public abstract void setLocation(String str);

  public abstract boolean getDisplayLogin();

  public abstract void setDisplayLogin(boolean val);

  public abstract String getStockMessage(String key);

  public abstract String getStockMessage(String key, Map vars);

  public abstract String getStaticPath(String s);

  public abstract String getExternalStaticPath(String s);

  public abstract String getImagePath(String s);

  public abstract MenuComponent getMenu(String name);

  public abstract MenuComponent getMenu(String name, Map vars);

  public abstract String getScriptName(String raw_name);

  public abstract String getScriptName(boolean strip_ext);

  public abstract String getScriptLoggerName(String raw_name);

  public abstract String getScriptLoggerName();

  public abstract Dialog getDialog(String name);

  public abstract Content[] getSideBoxes() throws AccessError, DataException;

  public abstract String getUserPhotoTag(String url);

  public abstract String getUserPhotoTag(String url, Dimension size);

  public abstract CommunityContext getCommunity();

  public abstract CommunityContext getCommunity(boolean required, String on_error) throws ErrorBox;

  public abstract String getActivityString(Date date);

  public abstract String getDefaultServletAddress(CommunityContext comm);

  public abstract String getCommunityLogoTag(String url);

  public abstract String expandServletPath(String spath);

  public abstract void registerCleanup(AutoCleanup ac);

} // end interface RequestInput
