package faqapp;

import java.rmi.RemoteException;
import javax.ejb.EJBObject;

/**
 * This is AppSessionFacadeBean's Remote Interface
 *
 * These are the public business methods of AppSessionFacadeBean.
 **/
public interface AppSessionFacade extends EJBObject {
    /**
     * Method to create Area
     * @param areaDesc: area description
     * @return the areaID of the newly created Area
     **/
    public int createArea(String areaDesc) throws RemoteException;

    /**
     * Method to update Area
     * @param areaID: area ID (PK)
     * @param areaDesc: area description
     **/
    public void updateArea(int areaID, String areaDesc) throws RemoteException;

    /**
     * Method to find all AreaTOs
     * @return the array of all AreaTOs
     **/
    public AreaTO[] findAreaAll() throws RemoteException;

    /**
     * Method to find an AreaTO by given areaID (PK)
     * @param areaID: area ID (PK)
     * @return the found AreaTO
     **/
    public AreaTO findAreaByPK(int areaID) throws RemoteException;

    /**
     * Method to create Topic
     * @param topicDesc: topic description
     * @param areaID: the id of the associated area
     * @return the topicID of the newly created Topic
     **/
    public int createTopic(String topicDesc, int areaID) throws RemoteException;

    /**
     * Method to update Topic
     * @param topicID: topic ID (PK)
     * @param topicDesc: topic description
     * @param areaID: area ID
     **/
    public void updateTopic(int topicID, String topicDesc, int areaID) throws RemoteException;

    /**
     * Method to find all TopicTOs
     * @return the array of all TopicTOs
     **/
    public TopicTO[] findTopicAll() throws RemoteException;

    /**
     * Method to find a TopicTO by given topicID (PK)
     * @param topicID: Topic ID (PK)
     * @return the found TopicTO
     **/
    public TopicTO findTopicByPK(int topicID) throws RemoteException;

    /**
     * Method to find TopicTOs by given areaID
     * @param areaID: area ID
     * @return the array of TopicTOs
     **/
    public TopicTO[] findTopicsByAreaID(int areaID) throws RemoteException;

    /**
     * Method to create FAQ
     * @param question: the question
     * @param answer: the answer
     * @param internalFlag: is this FAQ for internal use only (Y/N)?
     * @param productVersion: product version
     * @param createdBy: userid of the creator
     * @param areaIDs: array of ids of the associated areas
     * @param topicIDs: array of the ids of the associated topics
     * @return the questionID of the newly created question
     **/
    public int createFAQ(String question, String answer, boolean internalFlag, String productVersion, String createdBy, int[] areaIDs, int[] topicIDs) throws RemoteException;

    /**
     * Method to update FAQ
     * @param questionID: the ID (PK) of the question to be updated
     * @param question: the question
     * @param answer: the answer
     * @param internalFlag: is this FAQ for internal use only (Y/N)?
     * @param productVersion: product version
     * @param modifiedBy: userid of the modifier
     * @param areaIDs: array of ids of the associated areas
     * @param topicIDs: array of the ids of the associated topics
     **/
    public void updateFAQ(int questionID, String question, String answer, boolean internalFlag, String productVersion, String modifiedBy, int[] areaIDs, int[] topicIDs) throws RemoteException;

    /**
     * Method to find a FAQTO by given questionID (PK)
     * @param questionID: question ID (PK)
     * @return the found FAQTO
     **/
    public FAQTO findFAQByPK(int questionID) throws RemoteException;

    /**
     * Method to find FAQTOs by given areaID
     * @param areaID: area ID
     * @return the array of FAQTOs
     **/
    public FAQTO[] findFAQsByAreaID(int areaID) throws RemoteException;
}
