Index: lams_common/src/java/org/lamsfoundation/lams/tool/ToolContentManager.java =================================================================== diff -u --- lams_common/src/java/org/lamsfoundation/lams/tool/ToolContentManager.java (revision 0) +++ lams_common/src/java/org/lamsfoundation/lams/tool/ToolContentManager.java (revision 14092613cbb3d0bec8c306d5a6abdf6de151307f) @@ -0,0 +1,35 @@ +/* ******************************************************************************** + * Copyright Notice + * ================= + * This file contains propriety information of LAMS Foundation. + * Copying or reproduction with prior written permission is prohibited. + * Copyright (c) 2004 + * Created on 2004-12-7 + ******************************************************************************** */ + +package org.lamsfoundation.lams.tool; + + +/** + * Tool interface that defines the contract regarding tool content manipulation. + * + * @author Jacky Fang 2004-12-7 + * + */ +public interface ToolContentManager +{ + /** + * Make a copy of requested tool content. It will be needed by lams to + * create a copy of learning design and start a new tool session. + * @param fromContentId the original tool content id. + * @param toContentId the destination tool content id. + */ + public void copyToolContent(Long fromContentId, Long toContentId); + + /** + * Remove tool's content according specified the content id. It will be + * needed by lams to modify the learning design. + * @param toolContentId the requested tool content id. + */ + public void removeToolContent(Long toolContentId); +} Index: lams_common/src/java/org/lamsfoundation/lams/tool/ToolSessionExportOutputData.java =================================================================== diff -u --- lams_common/src/java/org/lamsfoundation/lams/tool/ToolSessionExportOutputData.java (revision 0) +++ lams_common/src/java/org/lamsfoundation/lams/tool/ToolSessionExportOutputData.java (revision 14092613cbb3d0bec8c306d5a6abdf6de151307f) @@ -0,0 +1,49 @@ +/* ******************************************************************************** + * Copyright Notice + * ================= + * This file contains propriety information of LAMS Foundation. + * Copying or reproduction with prior written permission is prohibited. + * Copyright (c) 2004 + * Created on 2004-12-7 + ******************************************************************************** */ + +package org.lamsfoundation.lams.tool; + +import java.util.List; + + +/** + * Value object for exporting output. We expect this object to be immutable once + * it is created. + * @author Jacky Fang 2004-12-7 + * + */ +public class ToolSessionExportOutputData +{ + private List toolSessionIds; + private String exportData; + + /** + * Construtor + */ + public ToolSessionExportOutputData(String exportData,List toolSessionIds) + { + this.exportData=exportData; + this.toolSessionIds=toolSessionIds; + } + + /** + * @return Returns the exportData. + */ + public String getExportData() + { + return exportData; + } + /** + * @return Returns the toolSessionIds. + */ + public List getToolSessionIds() + { + return toolSessionIds; + } +} Index: lams_common/src/java/org/lamsfoundation/lams/tool/ToolSessionManager.java =================================================================== diff -u --- lams_common/src/java/org/lamsfoundation/lams/tool/ToolSessionManager.java (revision 0) +++ lams_common/src/java/org/lamsfoundation/lams/tool/ToolSessionManager.java (revision 14092613cbb3d0bec8c306d5a6abdf6de151307f) @@ -0,0 +1,36 @@ +/* ******************************************************************************** + * Copyright Notice + * ================= + * This file contains propriety information of LAMS Foundation. + * Copying or reproduction with prior written permission is prohibited. + * Copyright (c) 2004 + * Created on 2004-12-6 + ******************************************************************************** */ + +package org.lamsfoundation.lams.tool; + +import java.util.List; + + + +/** + * + * @author Jacky Fang 2004-12-6 + * + */ +public interface ToolSessionManager +{ + public void createToolSession(Long toolSessionId, Long toolContentId); + + /** + * Call the controller service to complete and leave the tool session. + * @param toolSessionId the runtime tool session id. + * @return the data object that wraps the progess information. + */ + public ProgressOutputData leaveToolSession(Long toolSessionId); + + public ToolSessionExportOutputData exportToolSession(Long toolSessionId); + + public ToolSessionExportOutputData exportToolSession(List toolSessionIds); + +} Index: lams_common/src/java/org/lamsfoundation/lams/tool/ToolSessionManagerGroupingAware.java =================================================================== diff -u --- lams_common/src/java/org/lamsfoundation/lams/tool/ToolSessionManagerGroupingAware.java (revision 0) +++ lams_common/src/java/org/lamsfoundation/lams/tool/ToolSessionManagerGroupingAware.java (revision 14092613cbb3d0bec8c306d5a6abdf6de151307f) @@ -0,0 +1,24 @@ +/* ******************************************************************************** + * Copyright Notice + * ================= + * This file contains propriety information of LAMS Foundation. + * Copying or reproduction with prior written permission is prohibited. + * Copyright (c) 2004 + * Created on 2004-12-7 + ******************************************************************************** */ + +package org.lamsfoundation.lams.tool; + + + +/** + * + * @author Jacky Fang 2004-12-7 + * + */ +public interface ToolSessionManagerGroupingAware extends ToolSessionManager +{ + + public void joinToolSession(Long toolSessionId); + +}