Fisheye: Tag a4c0781b761a40fb513ad939d6d342a086dad701 refers to a dead (removed) revision in file `lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/beans/AuthoringSessionBean.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/util/ChatConstants.java =================================================================== diff -u -r47041304a9d027531f04cc2a0217b7dda2acc913 -ra4c0781b761a40fb513ad939d6d342a086dad701 --- lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/util/ChatConstants.java (.../ChatConstants.java) (revision 47041304a9d027531f04cc2a0217b7dda2acc913) +++ lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/util/ChatConstants.java (.../ChatConstants.java) (revision a4c0781b761a40fb513ad939d6d342a086dad701) @@ -24,6 +24,10 @@ package org.lamsfoundation.lams.tool.chat.util; +import java.util.LinkedList; + +import org.lamsfoundation.lams.tool.chat.model.ChatAttachment; + public interface ChatConstants { public static final String TOOL_SIGNATURE = "lachat11"; @@ -40,9 +44,9 @@ public static final int MONITORING_SUMMARY_MAX_MESSAGES = 5; - // Attribute names public static final String ATTR_MESSAGE = "message"; + public static final String ATTR_SESSION_MAP = "sessionMap"; // Parameter names public static final String PARAM_PARENT_PAGE = "parentPage"; Index: lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/util/SessionMap.java =================================================================== diff -u --- lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/util/SessionMap.java (revision 0) +++ lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/util/SessionMap.java (revision a4c0781b761a40fb513ad939d6d342a086dad701) @@ -0,0 +1,59 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ + +package org.lamsfoundation.lams.tool.chat.util; + +/* $Id$ */ + +import java.util.HashMap; + +public class SessionMap extends HashMap { + + private static final long serialVersionUID = -4702185515740658324L; + + private static long counter = (long) 0; + + private String sessionID; + + public SessionMap() { + this.sessionID = "sessionMapID-" + getCount();; + } + + private long getCount() { + synchronized (SessionMap.class) { + if (counter < 0) + counter = 0; + return counter++; + } + } + + public String getSessionID() { + return sessionID; + } + + public void setSessionID(String sessionID) { + this.sessionID = sessionID; + } +} \ No newline at end of file Index: lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/web/actions/AuthoringAction.java =================================================================== diff -u -r47041304a9d027531f04cc2a0217b7dda2acc913 -ra4c0781b761a40fb513ad939d6d342a086dad701 --- lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/web/actions/AuthoringAction.java (.../AuthoringAction.java) (revision 47041304a9d027531f04cc2a0217b7dda2acc913) +++ lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/web/actions/AuthoringAction.java (.../AuthoringAction.java) (revision a4c0781b761a40fb513ad939d6d342a086dad701) @@ -27,6 +27,7 @@ import java.util.Date; import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Set; @@ -43,12 +44,12 @@ import org.lamsfoundation.lams.authoring.web.AuthoringConstants; import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; import org.lamsfoundation.lams.tool.ToolAccessMode; -import org.lamsfoundation.lams.tool.chat.beans.AuthoringSessionBean; import org.lamsfoundation.lams.tool.chat.model.Chat; import org.lamsfoundation.lams.tool.chat.model.ChatAttachment; import org.lamsfoundation.lams.tool.chat.service.ChatServiceProxy; import org.lamsfoundation.lams.tool.chat.service.IChatService; import org.lamsfoundation.lams.tool.chat.util.ChatConstants; +import org.lamsfoundation.lams.tool.chat.util.SessionMap; import org.lamsfoundation.lams.tool.chat.web.forms.AuthoringForm; import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.action.LamsDispatchAction; @@ -70,6 +71,19 @@ public IChatService chatService; + // Authoring SessionMap key names + private static final String KEY_MODE = "mode"; + + private static final String KEY_ONLINE_FILES = "onlineFiles"; + + private static final String KEY_OFFLINE_FILES = "offlineFiles"; + + private static final String KEY_UNSAVED_ONLINE_FILES = "unsavedOnlineFiles"; + + private static final String KEY_UNSAVED_OFFLINE_FILES = "unsavedOfflineFiles"; + + private static final String KEY_DELETED_FILES = "deletedFiles"; + /** * Default method when no dispatch parameter is specified. It is expected * that the parameter toolContentID will be passed in. This @@ -82,10 +96,6 @@ // Extract toolContentID from parameters. Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); - if (logger.isDebugEnabled()) { - logger.debug("entering method unspecified: toolContentID = " - + toolContentID); - } // set up chatService if (chatService == null) { @@ -104,106 +114,72 @@ // check if content in use is set if (chat.getContentInUse()) { - // Cannot edit while content is in use. - request.setAttribute(ChatConstants.ATTR_MESSAGE, getResources(request).getMessage( - "error.content.locked")); + // Cannot edit, send to message page. + request.setAttribute(ChatConstants.ATTR_MESSAGE, getResources( + request).getMessage("error.content.locked")); return mapping.findForward("message_page"); } - // set the defineLater flag so that learners cannot use content while we - // are editing. - // This flag is released when updateContent is called. + // Set the defineLater flag so that learners cannot use content while we + // are editing. This flag is released when updateContent is called. chat.setDefineLater(true); chatService.saveOrUpdateChat(chat); - // set the access mode. - ToolAccessMode mode = getAccessMode(request); - request.setAttribute(AttributeNames.ATTR_MODE, mode.toString()); + // Set up sessionMap + SessionMap map = new SessionMap(); + initSessionMap(map, request); + updateSessionMap(map, chat); - // create a new authoringSessionBean and add to session - AuthoringSessionBean authSession = new AuthoringSessionBean(); - String id = ChatConstants.AUTH_SESSION_ID - + createAuthSessionId(request.getSession()); - authSession.setAuthSessionId(id); - authSession.setMode(mode); - request.getSession().setAttribute(id, authSession); - - // set up the form. + // Set up the authForm. AuthoringForm authForm = (AuthoringForm) form; + updateAuthForm(authForm, chat); - // populating the AuthoringForm using Chat content - populateAuthForm(authForm, chat); - resetAuthSession(authSession, chat); + // add the sessionMapID to form + authForm.setSessionMapID(map.getSessionID()); - authForm.setAuthSession(authSession); - authForm.setAuthSessionId(authSession.getAuthSessionId()); + // add the sessionMap to HTTPSession. + request.getSession().setAttribute(map.getSessionID(), map); + // add the sessionMap to the HttpServletRequest + // TODO workaround until we can figure out how to get request + // attributes using dynamic attributes in jsps. + request.setAttribute(ChatConstants.ATTR_SESSION_MAP, map); + return mapping.findForward("success"); } - private synchronized Long createAuthSessionId(HttpSession httpSession) { - Long authSessionId = (Long) httpSession - .getAttribute(ChatConstants.AUTH_SESSION_ID_COUNTER); - if (authSessionId == null) { - authSessionId = 1L; - httpSession.setAttribute(ChatConstants.AUTH_SESSION_ID_COUNTER, - authSessionId); - } else { - authSessionId++; - } - return authSessionId; - } - public ActionForward updateContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { - - setAccessMode(request, form); - // TODO need error checking. + + // get authForm and session map. AuthoringForm authForm = (AuthoringForm) form; + SessionMap map = getSessionMap(request, authForm); - // retrieving authoring session bean - AuthoringSessionBean authSession = (AuthoringSessionBean) request - .getSession().getAttribute(authForm.getAuthSessionId()); - - // retrieve the content. - if (chatService == null) { - chatService = ChatServiceProxy.getChatService(this.getServlet() - .getServletContext()); - } + // get chat content. Chat chat = chatService.getChatByContentId(authForm.getToolContentID()); - // copy form inputs to content - populateChat(chat, authForm); + // update chat content using form inputs. + updateChat(chat, authForm); - // adding unsaved uploaded files. + // remove attachments marked for deletion. Set attachments = chat.getChatAttachments(); if (attachments == null) { attachments = new HashSet(); } - attachments.addAll(authSession.getUnsavedOnlineFilesList()); - attachments.addAll(authSession.getUnsavedOfflineFilesList()); - // Removing attachments marked for deletion. - List deletedAttachments = authSession - .getDeletedFilesList(); - for (ChatAttachment delAtt : deletedAttachments) { - // remove from repository - chatService.deleteFromRepository(delAtt.getFileUuid(), delAtt + for (ChatAttachment att : getAttList(KEY_DELETED_FILES, map)) { + // remove from repository and db + chatService.deleteFromRepository(att.getFileUuid(), att .getFileVersionId()); - - // remove from ChatAttachments - Iterator attIter = attachments.iterator(); - while (attIter.hasNext()) { - ChatAttachment att = (ChatAttachment) attIter.next(); - if (delAtt.getUid().equals(att.getUid())) { - attIter.remove(); - break; - } - } + attachments.remove(att); } - - // set attachments in case it didnt exist + + // add unsaved attachments + attachments.addAll(getAttList(KEY_UNSAVED_ONLINE_FILES, map)); + attachments.addAll(getAttList(KEY_UNSAVED_OFFLINE_FILES, map)); + + // set attachments in case it didn't exist chat.setChatAttachments(attachments); // set the update date @@ -212,7 +188,6 @@ // releasing defineLater flag so that learner can start using the tool. chat.setDefineLater(false); - // persist changes. chatService.saveOrUpdateChat(chat); request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG, @@ -223,126 +198,97 @@ public ActionForward uploadOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { - - setAccessMode(request, form); - - return uploadFile(mapping, form, IToolContentHandler.TYPE_ONLINE, - request); + return uploadFile(mapping, (AuthoringForm) form, + IToolContentHandler.TYPE_ONLINE, request); } public ActionForward uploadOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { - - setAccessMode(request, form); - - return uploadFile(mapping, form, IToolContentHandler.TYPE_OFFLINE, - request); + return uploadFile(mapping, (AuthoringForm) form, + IToolContentHandler.TYPE_OFFLINE, request); } public ActionForward deleteOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { - - setAccessMode(request, form); - - return deleteFile(mapping, form, IToolContentHandler.TYPE_ONLINE, - request); + return deleteFile(mapping, (AuthoringForm) form, + IToolContentHandler.TYPE_ONLINE, request); } public ActionForward deleteOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { - - setAccessMode(request, form); - - return deleteFile(mapping, form, IToolContentHandler.TYPE_OFFLINE, - request); + return deleteFile(mapping, (AuthoringForm) form, + IToolContentHandler.TYPE_OFFLINE, request); } public ActionForward removeUnsavedOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { - - setAccessMode(request, form); - - return removeUnsaved(mapping, form, IToolContentHandler.TYPE_ONLINE, - request); + return removeUnsaved(mapping, (AuthoringForm) form, + IToolContentHandler.TYPE_ONLINE, request); } public ActionForward removeUnsavedOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { - - setAccessMode(request, form); - - return removeUnsaved(mapping, form, IToolContentHandler.TYPE_OFFLINE, - request); + return removeUnsaved(mapping, (AuthoringForm) form, + IToolContentHandler.TYPE_OFFLINE, request); } /* ========== Private Methods ********** */ - private ActionForward uploadFile(ActionMapping mapping, ActionForm form, - String type, HttpServletRequest request) { + private ActionForward uploadFile(ActionMapping mapping, + AuthoringForm authForm, String type, HttpServletRequest request) { + SessionMap map = getSessionMap(request, authForm); - setAccessMode(request, form); - - AuthoringForm authForm = (AuthoringForm) form; - - // retrieving authoring session bean - AuthoringSessionBean authSession = (AuthoringSessionBean) request - .getSession().getAttribute(authForm.getAuthSessionId()); - - // setting up variable to be used. FormFile file; - List unsavedFilesList; - List savedFilesList; + List unsavedFiles; + List savedFiles; if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) { file = (FormFile) authForm.getOfflineFile(); - unsavedFilesList = authSession.getUnsavedOfflineFilesList(); - savedFilesList = authSession.getOfflineFilesList(); + unsavedFiles = getAttList(KEY_UNSAVED_OFFLINE_FILES, map); + + savedFiles = getAttList(KEY_OFFLINE_FILES, map); } else { file = (FormFile) authForm.getOnlineFile(); - unsavedFilesList = authSession.getUnsavedOnlineFilesList(); - savedFilesList = authSession.getOnlineFilesList(); + unsavedFiles = getAttList(KEY_UNSAVED_ONLINE_FILES, map); + + savedFiles = getAttList(KEY_ONLINE_FILES, map); } // upload file to repository - ChatAttachment newAttachment = chatService.uploadFileToContent(authForm + ChatAttachment newAtt = chatService.uploadFileToContent(authForm .getToolContentID(), file, type); - // Add attachment to unsavedFileList - // checking to see if file with same name exists - ChatAttachment currentAttachment; - Iterator iter = savedFilesList.iterator(); + // Add attachment to unsavedFiles + // check to see if file with same name exists + ChatAttachment currAtt; + Iterator iter = savedFiles.iterator(); while (iter.hasNext()) { - currentAttachment = (ChatAttachment) iter.next(); - if (StringUtils.equals(currentAttachment.getFileName(), - newAttachment.getFileName())) { + currAtt = (ChatAttachment) iter.next(); + if (StringUtils.equals(currAtt.getFileName(), newAtt.getFileName())) { // move from this this list to deleted list. - authSession.getDeletedFilesList().add(currentAttachment); + getAttList(KEY_DELETED_FILES, map).add(currAtt); iter.remove(); break; } } - unsavedFilesList.add(newAttachment); + unsavedFiles.add(newAtt); - authForm.setAuthSession(authSession); + request.setAttribute(ChatConstants.ATTR_SESSION_MAP, map); request.setAttribute("unsavedChanges", new Boolean(true)); return mapping.findForward("success"); } - private ActionForward deleteFile(ActionMapping mapping, ActionForm form, - String type, HttpServletRequest request) { - AuthoringForm authForm = (AuthoringForm) form; + private ActionForward deleteFile(ActionMapping mapping, + AuthoringForm authForm, String type, HttpServletRequest request) { + SessionMap map = getSessionMap(request, authForm); - // retrieving authoring session bean - AuthoringSessionBean authSession = (AuthoringSessionBean) request - .getSession().getAttribute(authForm.getAuthSessionId()); - List fileList; if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) { - fileList = authSession.getOfflineFilesList(); + fileList = getAttList(KEY_OFFLINE_FILES, map); } else { - fileList = authSession.getOnlineFilesList(); + fileList = getAttList(KEY_ONLINE_FILES, map); } Iterator iter = fileList.iterator(); @@ -351,66 +297,59 @@ ChatAttachment att = (ChatAttachment) iter.next(); if (att.getFileUuid().equals(authForm.getDeleteFileUuid())) { - // move to delete file list, at next updateContent it will be - // deleted - authSession.getDeletedFilesList().add(att); + // move to delete file list, deleted at next updateContent + getAttList(KEY_DELETED_FILES, map).add(att); // remove from this list iter.remove(); break; } } - authForm.setAuthSession(authSession); + request.setAttribute(ChatConstants.ATTR_SESSION_MAP, map); request.setAttribute("unsavedChanges", new Boolean(true)); return mapping.findForward("success"); } - private ActionForward removeUnsaved(ActionMapping mapping, ActionForm form, - String type, HttpServletRequest request) { - AuthoringForm authForm = (AuthoringForm) form; + private ActionForward removeUnsaved(ActionMapping mapping, + AuthoringForm authForm, String type, HttpServletRequest request) { + SessionMap map = getSessionMap(request, authForm); - // retrieving authoring session bean - AuthoringSessionBean authSession = (AuthoringSessionBean) request - .getSession().getAttribute(authForm.getAuthSessionId()); + List unsavedFiles; - List unsavedAttachments; - if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) { - unsavedAttachments = authSession.getUnsavedOfflineFilesList(); + unsavedFiles = getAttList(KEY_UNSAVED_OFFLINE_FILES, map); } else { - unsavedAttachments = authSession.getUnsavedOnlineFilesList(); + unsavedFiles = getAttList(KEY_UNSAVED_ONLINE_FILES, map); } - Iterator iter = unsavedAttachments.iterator(); + Iterator iter = unsavedFiles.iterator(); while (iter.hasNext()) { - ChatAttachment remAtt = (ChatAttachment) iter.next(); + ChatAttachment att = (ChatAttachment) iter.next(); - if (remAtt.getFileUuid().equals(authForm.getDeleteFileUuid())) { - // delete from repository - chatService.deleteFromRepository(remAtt.getFileUuid(), remAtt + if (att.getFileUuid().equals(authForm.getDeleteFileUuid())) { + // delete from repository and list + chatService.deleteFromRepository(att.getFileUuid(), att .getFileVersionId()); - - // remove from session list iter.remove(); break; } } - authForm.setAuthSession(authSession); + request.setAttribute(ChatConstants.ATTR_SESSION_MAP, map); request.setAttribute("unsavedChanges", new Boolean(true)); return mapping.findForward("success"); } /** - * Populates a Chat using inputs in AuthoringForm. + * Updates Chat content using AuthoringForm inputs. * * @param authForm * @return */ - private void populateChat(Chat chat, AuthoringForm authForm) { + private void updateChat(Chat chat, AuthoringForm authForm) { chat.setTitle(authForm.getTitle()); chat.setInstructions(authForm.getInstructions()); chat.setOfflineInstructions(authForm.getOnlineInstruction()); @@ -421,13 +360,13 @@ } /** - * Populates the AuthoringForm with content from Chat + * Updates AuthoringForm using Chat content. * * @param chat * @param authForm * @return */ - private void populateAuthForm(AuthoringForm authForm, Chat chat) { + private void updateAuthForm(AuthoringForm authForm, Chat chat) { authForm.setToolContentID(chat.getToolContentId()); authForm.setTitle(chat.getTitle()); authForm.setInstructions(chat.getInstructions()); @@ -439,23 +378,29 @@ // TODO add the rest. } - private void resetAuthSession(AuthoringSessionBean authSession, Chat chat) { - // clear the lists in session. - authSession.getUnsavedOfflineFilesList().clear(); - authSession.getUnsavedOnlineFilesList().clear(); - authSession.getDeletedFilesList().clear(); - authSession.getOnlineFilesList().clear(); - authSession.getOfflineFilesList().clear(); + /** + * Updates SessionMap using Chat content. + * + * @param map + * @param chat + */ + private void updateSessionMap(SessionMap map, Chat chat) { + getAttList(KEY_UNSAVED_OFFLINE_FILES, map).clear(); + getAttList(KEY_UNSAVED_ONLINE_FILES, map).clear(); + getAttList(KEY_DELETED_FILES, map).clear(); + getAttList(KEY_OFFLINE_FILES, map).clear(); + getAttList(KEY_ONLINE_FILES, map).clear(); + Iterator iter = chat.getChatAttachments().iterator(); while (iter.hasNext()) { ChatAttachment attachment = (ChatAttachment) iter.next(); String type = attachment.getFileType(); if (type.equals(IToolContentHandler.TYPE_OFFLINE)) { - authSession.getOfflineFilesList().add(attachment); + getAttList(KEY_OFFLINE_FILES, map).add(attachment); } if (type.equals(IToolContentHandler.TYPE_ONLINE)) { - authSession.getOnlineFilesList().add(attachment); + getAttList(KEY_ONLINE_FILES, map).add(attachment); } } } @@ -479,17 +424,43 @@ } /** - * Set the request attribute 'mode'using value stored in - * AuthoringSessionBean. + * Set up SessionMap for first use. Creates empty lists and sets the access + * mode. * + * @param map * @param request - * @param form */ - private void setAccessMode(HttpServletRequest request, ActionForm form) { - AuthoringForm authForm = (AuthoringForm) form; - AuthoringSessionBean authSession = (AuthoringSessionBean) request - .getSession().getAttribute(authForm.getAuthSessionId()); - request.setAttribute(AttributeNames.ATTR_MODE, authSession.getMode() - .toString()); + private void initSessionMap(SessionMap map, HttpServletRequest request) { + map.put(KEY_MODE, getAccessMode(request)); + map.put(KEY_ONLINE_FILES, new LinkedList()); + map.put(KEY_OFFLINE_FILES, new LinkedList()); + map.put(KEY_UNSAVED_ONLINE_FILES, new LinkedList()); + map.put(KEY_UNSAVED_OFFLINE_FILES, new LinkedList()); + map.put(KEY_DELETED_FILES, new LinkedList()); } + + /** + * Retrieves a List of attachments from the map using the key. + * + * @param key + * @param map + * @return + */ + private List getAttList(String key, SessionMap map) { + List list = (List) map.get(key); + return list; + } + + /** + * Retrieve the SessionMap from the HttpSession. + * + * @param request + * @param authForm + * @return + */ + private SessionMap getSessionMap(HttpServletRequest request, + AuthoringForm authForm) { + return (SessionMap) request.getSession().getAttribute( + authForm.getSessionMapID()); + } } \ No newline at end of file Index: lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/web/forms/AuthoringForm.java =================================================================== diff -u -r7c0c408e15f94b0c133d296b19d34398fa3436f9 -ra4c0781b761a40fb513ad939d6d342a086dad701 --- lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/web/forms/AuthoringForm.java (.../AuthoringForm.java) (revision 7c0c408e15f94b0c133d296b19d34398fa3436f9) +++ lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/web/forms/AuthoringForm.java (.../AuthoringForm.java) (revision a4c0781b761a40fb513ad939d6d342a086dad701) @@ -33,7 +33,7 @@ import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionMessages; import org.apache.struts.upload.FormFile; -import org.lamsfoundation.lams.tool.chat.beans.AuthoringSessionBean; +import org.lamsfoundation.lams.tool.chat.util.SessionMap; /** * @struts.form name="authoringForm" @@ -68,11 +68,11 @@ String dispatch; - String authSessionId; + String sessionMapID; Long deleteFileUuid; - AuthoringSessionBean authSession; + SessionMap sessionMap; @Override public ActionErrors validate(ActionMapping arg0, HttpServletRequest arg1) { @@ -82,12 +82,12 @@ return ac; } - public String getAuthSessionId() { - return authSessionId; + public String getSessionMapID() { + return sessionMapID; } - public void setAuthSessionId(String authSessionId) { - this.authSessionId = authSessionId; + public void setSessionMapID(String sessionMapID) { + this.sessionMapID = sessionMapID; } public String getCurrentTab() { @@ -170,13 +170,13 @@ this.toolContentID = toolContentID; } - public void setAuthSession(AuthoringSessionBean authSession) { - this.authSession = authSession; + public void setSessionMap(SessionMap sessionMap) { + this.sessionMap = sessionMap; } - public AuthoringSessionBean getAuthSession() { - return authSession; + public SessionMap getSessionMap() { + return sessionMap; } public Long getDeleteFileUuid() { Index: lams_tool_chat/web/pages/authoring/authoring.jsp =================================================================== diff -u -r47041304a9d027531f04cc2a0217b7dda2acc913 -ra4c0781b761a40fb513ad939d6d342a086dad701 --- lams_tool_chat/web/pages/authoring/authoring.jsp (.../authoring.jsp) (revision 47041304a9d027531f04cc2a0217b7dda2acc913) +++ lams_tool_chat/web/pages/authoring/authoring.jsp (.../authoring.jsp) (revision a4c0781b761a40fb513ad939d6d342a086dad701) @@ -17,7 +17,7 @@ - +
@@ -32,22 +32,20 @@ - + <%-- Form Controls --%> + + accessMode="${requestScope.sessionMap.mode}" defineLater="${defineLater}" /> +
- - - - Index: lams_tool_chat/web/pages/authoring/instructions.jsp =================================================================== diff -u -r0ac012d04d1fa2ee4df7139645ba7fecaa8b2a6e -ra4c0781b761a40fb513ad939d6d342a086dad701 --- lams_tool_chat/web/pages/authoring/instructions.jsp (.../instructions.jsp) (revision 0ac012d04d1fa2ee4df7139645ba7fecaa8b2a6e) +++ lams_tool_chat/web/pages/authoring/instructions.jsp (.../instructions.jsp) (revision a4c0781b761a40fb513ad939d6d342a086dad701) @@ -1,9 +1,8 @@ <%@ include file="/common/taglibs.jsp"%> - + - @@ -12,7 +11,7 @@ @@ -25,7 +24,7 @@ @@ -115,7 +112,7 @@

- +
  • @@ -135,7 +132,7 @@ - +
  • *
  • - +

    - +
  • @@ -41,13 +40,11 @@ - -
  • <%-- Displaying unsaved Files --%> - +
  • * @@ -101,7 +98,7 @@
  • - +