/*
 * 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.internals;

import java.util.BitSet;
import java.util.List;
import com.silverwrist.venice.security.Role;
import com.silverwrist.venice.core.GlobalProperties;
import com.silverwrist.venice.core.SideBoxDescriptor;
import com.silverwrist.venice.core.TopicMessageContext;
import com.silverwrist.venice.core.VeniceEngine;
import com.silverwrist.venice.except.DataException;

public interface EngineBackend
{
  // Integer parameter indexes
  public static final int IP_POSTSPERPAGE = 0;
  public static final int IP_POSTSATTOP = 1;
  public static final int IP_MAXSEARCHRETURN = 2;
  public static final int IP_MAXCOMMUNITYMEMBERDISPLAY = 3;
  public static final int IP_MAXCONFMEMBERDISPLAY = 4;
  public static final int IP_NUMFRONTPAGEPOSTS = 5;
  public static final int IP_NUMAUDITRECSPERPAGE = 6;
  public static final int IP_CREATECOMMUNITYLVL = 7;
  public static final int IPC_NUM_PARAMS = 8;

  // Boolean parameter indexes
  public static final int BP_POSTPICTURES = 0;
  public static final int BP_NOCATEGORIES = 1;

  // role parameter indexes
  public static final int ROLEP_CREATECOMMUNITY = 0;

  public abstract CommunityData getCommunityDataObject(int cid) throws DataException;

  public abstract void detachCommunityDataObject(int cid);

  public abstract void registerNewCommunity(CommunityData comm);

  public abstract ConferenceData getConferenceDataObject(int confid) throws DataException;

  public abstract void detachConferenceDataObject(int confid);

  public abstract void registerNewConference(ConferenceData conf);

  public abstract int getParamInt(int selector);

  public abstract boolean getParamBoolean(int selector);

  public abstract Role getParamRole(int selector);

  public abstract void forceParamReload() throws DataException;

  public abstract SideBoxDescriptor getMasterSideBoxDescriptor(int id);

  public abstract void startPublish();

  public abstract void publishNew(TopicMessageContext pubmsg);

  public abstract void unpublish(long postid);

  public abstract boolean isNoCompressMimeType(String type);

  public abstract GlobalProperties getProperties();

  public abstract void setProperties(GlobalProperties props) throws DataException;

} // end interface EngineBackend
