Index: lams_common/conf/xdoclet/servlet-mappings.xml =================================================================== RCS file: /usr/local/cvsroot/lams_common/conf/xdoclet/Attic/servlet-mappings.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_common/conf/xdoclet/servlet-mappings.xml 19 Apr 2005 06:13:41 -0000 1.1 @@ -0,0 +1,25 @@ + + + + action + *.do + \ No newline at end of file Index: lams_common/conf/xdoclet/servlets.xml =================================================================== RCS file: /usr/local/cvsroot/lams_common/conf/xdoclet/Attic/servlets.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_common/conf/xdoclet/servlets.xml 19 Apr 2005 06:13:41 -0000 1.1 @@ -0,0 +1,47 @@ + + + + context + org.springframework.web.context.ContextLoaderServlet + 1 + + + action + org.apache.struts.action.ActionServlet + + config + /WEB-INF/struts/struts-config.xml + + + debug + 999 + + + detail + 2 + + + validate + true + + 2 + Index: lams_common/conf/xdoclet/web-settings.xml =================================================================== RCS file: /usr/local/cvsroot/lams_common/conf/xdoclet/Attic/web-settings.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_common/conf/xdoclet/web-settings.xml 19 Apr 2005 06:13:41 -0000 1.1 @@ -0,0 +1,27 @@ + + + contextConfigLocation + /WEB-INF/spring/applicationContext.xml + /WEB-INF/spring/learningDesignApplicationContext.xml + /WEB-INF/spring/workspaceApplicationContext.xml + + Index: lams_common/src/java/org/lamsfoundation/lams/learningdesign/dao/ILearningDesignDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/learningdesign/dao/ILearningDesignDAO.java,v diff -u -r1.2 -r1.3 --- lams_common/src/java/org/lamsfoundation/lams/learningdesign/dao/ILearningDesignDAO.java 13 Apr 2005 01:36:00 -0000 1.2 +++ lams_common/src/java/org/lamsfoundation/lams/learningdesign/dao/ILearningDesignDAO.java 19 Apr 2005 06:14:04 -0000 1.3 @@ -54,5 +54,13 @@ */ public List getAllLearningDesignsInFolder(Integer workspaceFolderID); - + /** + * This method returns a List of Learning Designs with given + * parent_learning_design_id + * + * @param parentDesignID The parent_learning_design_id + * @return List The List of all corresponding Learning designs with + * given parent_learning_design_id + */ + public List getLearningDesignsByParent(Long parentDesignID); } Index: lams_common/src/java/org/lamsfoundation/lams/learningdesign/dao/hibernate/LearningDesignDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/learningdesign/dao/hibernate/LearningDesignDAO.java,v diff -u -r1.2 -r1.3 --- lams_common/src/java/org/lamsfoundation/lams/learningdesign/dao/hibernate/LearningDesignDAO.java 13 Apr 2005 01:36:01 -0000 1.2 +++ lams_common/src/java/org/lamsfoundation/lams/learningdesign/dao/hibernate/LearningDesignDAO.java 19 Apr 2005 06:13:56 -0000 1.3 @@ -28,6 +28,8 @@ private static final String ALL_IN_FOLDER ="from " + TABLENAME +" in class " + LearningDesign.class.getName()+ " where workspace_folder_id=?"; + private static final String FIND_BY_PARENT ="from " + TABLENAME +" in class " + LearningDesign.class.getName()+ + " where parent_learning_design_id=?"; /* @@ -75,5 +77,13 @@ public List getAllLearningDesignsInFolder(Integer workspaceFolderID) { return this.getHibernateTemplate().find(ALL_IN_FOLDER,workspaceFolderID); } + /** + * (non-Javadoc) + * @see org.lamsfoundation.lams.learningdesign.dao.ILearningDesignDAO#getLearningDesignsByParent(java.lang.Long) + */ + public List getLearningDesignsByParent(Long parentDesignID){ + List list = this.getHibernateTemplate().find(FIND_BY_PARENT,parentDesignID); + return list; + } } Index: lams_common/src/java/org/lamsfoundation/lams/workspace/service/IWorkspaceManagementService.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/workspace/service/Attic/IWorkspaceManagementService.java,v diff -u -r1.2 -r1.3 --- lams_common/src/java/org/lamsfoundation/lams/workspace/service/IWorkspaceManagementService.java 15 Apr 2005 02:49:08 -0000 1.2 +++ lams_common/src/java/org/lamsfoundation/lams/workspace/service/IWorkspaceManagementService.java 19 Apr 2005 06:14:18 -0000 1.3 @@ -2,17 +2,77 @@ import java.io.IOException; +import org.lamsfoundation.lams.usermanagement.WorkspaceFolder; +import org.lamsfoundation.lams.usermanagement.exception.UserException; +import org.lamsfoundation.lams.workspace.exception.WorkspaceFolderException; + /** * @author Manpreet Minhas */ public interface IWorkspaceManagementService { + /** + * This method returns the contents of the folder with given + * workspaceFolderID depending upon the mode. + * Before it does so, it checks whether the given User + * is authorized to perform this action. + * + * The mode can be either of the following + * + * + * + *

Note: It only returns the top level contents. To navigate to + * the contents of the sub-folders of the given WorkspaceFolder + * we have to call this method again with there workspaceFolderID

+ * + *

For Example:

+ *

For a folder with given tree structure + *

+	 *                       A	 						
+	 * 					     |
+	 * 				--------------------
+	 * 				|        |          |
+	 * 			   A1		A2         A3
+	 * 				|
+	 * 			---------
+	 * 			|		|
+	 * 		   AA1	   AA2
+	 * 
+ * This function will only retun A1, A2 and A3 and to get the contents if A1 we have to again call this + * method with workspaceFolderID of A1. + * + * @param userID The user_id of the User who has requested the contents + * @param workspaceFolderID The workspace_folder_id of the WorkspaceFolder + * whose contents are requested + * @param mode It can be either 1(AUTHORING) or 2(MONITORING) + * @return String The required information in WDDX format + * @throws IOException + */ public String getFolderContents(Integer userID, Integer workspaceFolderID, Integer mode)throws IOException; /** * This method creates a new folder under the given parentFolder * inside the user's default workspace. * + * @param parentFolderID The parent_folder_id of the WorkspaceFolder + * under which the new folder has to be created + * @param name The name of the new folder + * @param userID The user_id of the User who owns this folder + * @return WorkspaceFolder The WorkspaceFolder freshly created + * @throws UserException + * @throws WorkspaceFolderException + */ + public WorkspaceFolder createFolder(Integer parentFolderID, String name, Integer userID) throws UserException,WorkspaceFolderException; + + /** + * This method creates a new folder under the given parentFolder + * inside the user's default workspace. + * * @param parentFolderID The parent_folder_id under which the new folder * has to be created * @param name The name of the new folder @@ -43,5 +103,69 @@ * @throws IOException */ public String deleteFolder(Integer workspaceFolderID, Integer userID)throws IOException; + + /** + * This method deletes a LearningDesign with given learningDesignID + * provied the User is authorized to do so. + *

Note:

+ *

+ * @param learningDesignID The learning_design_id of the + * LearningDesign to be deleted. + * @param userID The user_id of the User who has + * requested this opeartion + * @return String The acknowledgement/error message in WDDX format for FLASH + * @throws IOException + */ + public String deleteLearningDesign(Long learningDesignID, Integer userID)throws IOException; + + /** + * This method copies one folder inside another folder. To be able to + * successfully perform this action following conditions must be met in the + * order they are listed. + *