⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 questionmanager.java

📁 老外的在线考试
💻 JAVA
字号:
/* * SchoolEJB - CyberDemia's library of EJBs for educational related services. * Copyright (C) 2003 CyberDemia Research and Services * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Library General Public License for more details. *  * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA  02111-1307, USA. * * See the COPYING file located in the top-level-directory of * the archive of this library for complete text of license. */package com.cyberdemia.school;import javax.ejb.*;import java.rmi.RemoteException;/*** QuestionManager is a facade that provides* useful methods for managing questions.** @author Alexander Yap*/public interface QuestionManager extends EJBObject{	/**	 * Adds a new question to the database. 	 * @param data QuestionData instance with the data for the new question.	 * @return The unique ID of the new question.	 * @throws RemoteException if there is a problem creating the question.	 */	public String addQuestion(QuestionData data) throws RemoteException;	/**	 * Deactives the specified question, after which it may be considered to 	 * be logically removed from the system.	 * This method may perform some checks first to ensure that the question	 * can be safely deactivated.	 * 	 * @param id Question ID	 * @return true if the question is deactivated, false if it is not (either a problem or it is already inactive) 	 * @throws RemoteException if the question can't be found.	 */		 	public boolean deactivateQuestion(String id) throws RemoteException;		/**	 * Gets list of questions from database.	 * @param activeOnly true to only return active questions, false to return all questions.	 * @return Array of QuestionData instances.	 * @throws RemoteException	 */	public QuestionData[] getQuestions(boolean activeOnly) throws RemoteException;		/**	 * Gets Ids of questions that belong to specified test.	 * If testId is null or an empty String, this methods gets all questions that 	 * are not assigned to any test.	 * @param testId Test Id	 * @return Array of QuestionData instances.	 */	public QuestionData[] getQuestionsByTest(String testId) throws RemoteException;	/**	 * Gets the data of a specified question.	 * @param id Question ID.	 * @return QuestionData instance storing the question's data.	 * @throws RemoteException if the question can't be found.	 */	public QuestionData getQuestionData(String id) throws RemoteException;		/**	 * Sets the data of a specified question.	 * @param id Question ID.	 * @param data QuestionData instance with the question's data.	 * @throws RemoteException if the question can't be found.	 */	public void setQuestionData(String id, QuestionData data) throws RemoteException;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -