/*
 * 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-02 Eric J. Bowersox/Silverwrist Design Studios.  All Rights Reserved.
 * 
 * Contributor(s): 
 */
package com.silverwrist.venice.core;

import java.awt.Dimension;
import java.util.BitSet;
import java.util.List;
import org.w3c.dom.Document;
import com.silverwrist.venice.except.AccessError;
import com.silverwrist.venice.except.ConfigException;
import com.silverwrist.venice.except.DataException;
import com.silverwrist.venice.except.EmailException;
import com.silverwrist.venice.htmlcheck.HTMLChecker;

public interface VeniceEngine extends SearchMode, ServiceGroup
{
  public abstract void initialize(Document config, String app_root) throws ConfigException, DataException;

  public abstract void shutdown() throws ConfigException;

  public abstract UserContext createUserContext(String remote_addr) throws DataException;

  public abstract String getEmailAddressForUser(String username) throws DataException, AccessError;

  public abstract void sendPasswordReminder(String username)
      throws DataException, AccessError, EmailException;

  public abstract void completePasswordChange(int uid, int authentication)
      throws DataException, AccessError, EmailException;

  public abstract UserContext createNewAccount(String remote_addr, String username, String password,
					       String reminder) throws DataException, AccessError;

  public abstract boolean aliasExists(String alias, int exist_cid);

  public abstract boolean isValidCategoryID(int catid);

  public abstract List searchForUsers(int field, int mode, String term, int offset, int count)
      throws DataException;

  public abstract int getSearchUserCount(int field, int mode, String term) throws DataException;

  public abstract int getStdNumSearchResults();

  public abstract boolean isEmailAddressBanned(String email);

  public abstract boolean confAliasExists(String alias);

  public abstract HTMLChecker getEscapingChecker();

  public abstract int getNumPostsPerPage();

  public abstract int getNumOldPostsBeforeNew();

  public abstract int getMaxNumConferenceMembersDisplay();

  public abstract int getMaxNumCommunityMembersDisplay();

  public abstract List getMasterSideBoxList();

  public abstract List getPublishedMessages(boolean all) throws DataException;

  public abstract int getNumAuditRecordsPerPage();

  public abstract Advertisement getAdByID(int id);

  public abstract Advertisement selectAd();

  public abstract BinaryData loadImage(int id) throws DataException;

  public abstract Dimension getUserPhotoSize();

  public abstract Dimension getCommunityLogoSize();

  public abstract SecurityInfo getSecurityInfo();

  public abstract boolean useCategories();

} // end interface VeniceEngine
