Resource
by toolContentID.
+ * @param contentId
+ * @return
+ */
Resource getResourceByContentId(Long contentId);
-
+ /**
+ * Get a cloned copy of tool default tool content (Resource) and assign the toolContentId of that copy as the
+ * given contentId
+ * @param contentId
+ * @return
+ * @throws ResourceApplicationException
+ */
Resource getDefaultContent(Long contentId) throws ResourceApplicationException;
-
+
+ /**
+ * Get list of resource items by given resourceUid. These resource items must be created by author.
+ * @param resourceUid
+ * @return
+ */
List getAuthoredItems(Long resourceUid);
-
+ /**
+ * Upload instruciton file into repository.
+ * @param file
+ * @param type
+ * @return
+ * @throws UploadResourceFileException
+ */
ResourceAttachment uploadInstructionFile(FormFile file, String type) throws UploadResourceFileException;
-
+
+ /**
+ * Upload resource item file to repository. i.e., single file, websize zip file, or learning object zip file.
+ * @param item
+ * @param file
+ * @throws UploadResourceFileException
+ */
void uploadResourceItemFile(ResourceItem item, FormFile file) throws UploadResourceFileException;
//********** for user methods *************
+ /**
+ * Create a new user in database.
+ */
void createUser(ResourceUser resourceUser);
- ResourceUser getUserByID(Long long1);
+ /**
+ * Get user by given userID.
+ * @param long1
+ * @return
+ */
+ ResourceUser getUserByID(Long userID);
//********** Repository methods ***********************
+ /**
+ * Delete file from repository.
+ */
void deleteFromRepository(Long fileUuid, Long fileVersionId) throws ResourceApplicationException ;
+ /**
+ * Save or update resource into database.
+ * @param Resource
+ */
void saveOrUpdateResource(Resource Resource);
-
+ /**
+ * Delete reource attachment(i.e., offline/online instruction file) from database. This method does not
+ * delete the file from repository.
+ *
+ * @param attachmentUid
+ */
void deleteResourceAttachment(Long attachmentUid);
-
+ /**
+ * Delete resoruce item from database.
+ * @param uid
+ */
void deleteResourceItem(Long uid);
/**
@@ -73,10 +131,23 @@
* @return
*/
ListHttpRequest
* @param request
*/
private ListActionForward
from request.
+ * @param type
+ * @param mapping
+ * @return
+ */
private ActionForward findForward(short type, ActionMapping mapping) {
ActionForward forward;
switch (type) {
@@ -791,7 +866,7 @@
}
/**
- *
+ * Extract web from content to resource item.
* @param request
* @param instructionList
* @param itemForm
@@ -885,6 +960,7 @@
}
/**
+ * Vaidate resource item regards to their type (url/file/learning object/website zip file)
* @param itemForm
* @return
*/
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/action/MonitoringAction.java
===================================================================
diff -u -r6f9ce8030c9939df344a3aa7f5894116491a90d8 -r00546fef27c802810d1b2ac3d621f9c3e2d64cb0
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/action/MonitoringAction.java (.../MonitoringAction.java) (revision 6f9ce8030c9939df344a3aa7f5894116491a90d8)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/action/MonitoringAction.java (.../MonitoringAction.java) (revision 00546fef27c802810d1b2ac3d621f9c3e2d64cb0)
@@ -67,9 +67,11 @@
return hideitem(mapping, form, request, response);
}
+
return mapping.findForward(ResourceConstants.ERROR);
}
+
private ActionForward hideitem(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) {
Long itemUid = WebUtil.readLongParam(request, ResourceConstants.PARAM_RESOURCE_ITEM_UID);
Index: lams_tool_larsrc/web/pages/authoring/definelater.jsp
===================================================================
diff -u
--- lams_tool_larsrc/web/pages/authoring/definelater.jsp (revision 0)
+++ lams_tool_larsrc/web/pages/authoring/definelater.jsp (revision 00546fef27c802810d1b2ac3d621f9c3e2d64cb0)
@@ -0,0 +1,101 @@
+<%@ include file="/common/taglibs.jsp" %>
+<%@ page import="java.util.HashSet" %>
+<%@ page import="java.util.Set" %>
+ <%
+
+ Set tabs = new HashSet();
+ tabs.add("label.authoring.heading.basic");
+ pageContext.setAttribute("tabs", tabs);
+
+ %>
+
++ <%@ include file="/common/messages.jsp" %> + | +
+