/*
 * 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@ricochet.com>,
 * for Silverwrist Design Studios.  Portions created by Eric J. Bowersox are
 * Copyright (C) 2001-2004 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 void initialize(Document config, String app_root) throws ConfigException, DataException;

  public void shutdown() throws ConfigException;

  public UserContext createUserContext(String remote_addr) throws DataException;

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

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

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

  public UserContext createNewAccount(String remote_addr, String username, String password,
				      String reminder, java.sql.Date dob) throws DataException, AccessError;

  public boolean aliasExists(String alias, int exist_cid);

  public boolean isValidCategoryID(int catid);

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

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

  public int getStdNumSearchResults();

  public boolean isEmailAddressBanned(String email);

  public boolean confAliasExists(String alias);

  public HTMLChecker getEscapingChecker();

  public int getNumPostsPerPage();

  public int getNumOldPostsBeforeNew();

  public int getMaxNumConferenceMembersDisplay();

  public int getMaxNumCommunityMembersDisplay();

  public List getMasterSideBoxList();

  public List getPublishedMessages(boolean all) throws DataException;

  public int getNumAuditRecordsPerPage();

  public Advertisement getAdByID(int id);

  public Advertisement selectAd();

  public BinaryData loadImage(int id) throws DataException;

  public Dimension getUserPhotoSize();

  public Dimension getCommunityLogoSize();

  public SecurityInfo getSecurityInfo();

  public boolean useCategories();

  public String testIPBan(String ip_address) throws DataException;

} // end interface VeniceEngine
