Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/service/INoticeboardService.java =================================================================== diff -u -r51baa92eb2330b3d5bed3d2a2c4cd622e665b83d -r6cce13e2c656d9cab6d0fc4a133245be0e2299c0 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/service/INoticeboardService.java (.../INoticeboardService.java) (revision 51baa92eb2330b3d5bed3d2a2c4cd622e665b83d) +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/service/INoticeboardService.java (.../INoticeboardService.java) (revision 6cce13e2c656d9cab6d0fc4a133245be0e2299c0) @@ -23,6 +23,7 @@ import org.lamsfoundation.lams.tool.noticeboard.NoticeboardContent; import org.lamsfoundation.lams.tool.noticeboard.NoticeboardSession; +; /** * Defines the contract that the tool service provider must follow @@ -31,51 +32,97 @@ */ public interface INoticeboardService { - /** - * Return the NoticeboardContent object that has id nbContentId. - * - * @param nbContentid The id of the requested NoticeboardContent object - * @return NoticeboardContent object or null if not found - */ - + //=================================================================== + // NoticeboardContent access methods + //=================================================================== + + /** + *
Retrieve an instance of NoticeboardContent with the given
+ * identifier uid
Returns the persistent instance of NoticeboardContent
+ * with the given tool session id nbSessionId
, returns null if not found.
+ *
+ * @param nbSessionId The tool session id
+ * @return a persistent instance of NoticeboardContent or null if not found.
+ */
+ public NoticeboardContent retrieveNoticeboardBySessionID(Long nbSessionId);
+
+ /**
+ *
Retrieve an instance of NoticeboardContent with the given
+ * tool content id nbContentId
Update the given persistent instance of NoticeboardContent.
+ * + * @param nbContent The instance of NoticeboardContent to persist. + */ public void updateNoticeboard(NoticeboardContent nbContent); /** - * Save the content of the NoticeboardContent object + *Persist the given persistent instance of NoticeboardContent.
* - * @param nbContent the NoticeboardContent object to persist - */ + * @param nbContent The instance of NoticeboardContent to persist. + */ public void saveNoticeboard(NoticeboardContent nbContent); + /** + *Deletes all instances of NoticeboardSession that are associated + * with the given instance of NoticeboardContent
+ * + * @param nbContent The instance of NoticeboardContent in which corresponding instances of NoticeboardSession should be deleted. + */ + public void removeNoticeboardSessions(NoticeboardContent nbContent); + /** - * Removes the NoticeboardSessions which is associated with the particular - * NoticeboardContent object. + *Delete the given instance of NoticeboardContent with the
+ * given tool content id nbContentId
+ *
+ * @param nbContentId The tool content Id.
+ */
+ public void removeNoticeboard(Long nbContentId);
+
+ /**
+ *
Delete the given instance of NoticeboardContent
+ * + * @param nbContent The instance of NoticeboardContent to delete. + */ + public void removeNoticeboard(NoticeboardContent nbContent); + + + //=================================================================== + // NoticeboardSession access methods + //=================================================================== + /** + * Return the persistent instance of a NoticeboardSession
+ * with the given tool session id nbSessionId
,
+ * returns null if not found.
Return the persistent instance of a NoticeboardSession
+ * with the given identifier uid
, returns null if not found.
Delete the given instance of NoticeboardSession
+ * + * @param nbSession The instance of NoticeboardSession to delete. + */ + public void removeSession(NoticeboardSession nbSession); + + /** + *Delete the given instance of NoticeboardSession with the
+ * given identifier uid
+ *
+ * @param uid an identifier for the NoticeboardSession instance.
+ */
+ public void removeSessionByUID(Long uid);
}