Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/service/INoticeboardService.java =================================================================== diff -u -r7065c3c7f27c9dbc49864cefcea4740b0ced2fc4 -r0048b5d3c999c59bd1fb45b2b231fa97343801e7 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/service/INoticeboardService.java (.../INoticeboardService.java) (revision 7065c3c7f27c9dbc49864cefcea4740b0ced2fc4) +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/service/INoticeboardService.java (.../INoticeboardService.java) (revision 0048b5d3c999c59bd1fb45b2b231fa97343801e7) @@ -37,13 +37,7 @@ // NoticeboardContent access methods //=================================================================== - /** - *

Retrieve an instance of NoticeboardContent with the given - * identifier uid

- * @param uid The given unique identifier of the NoticeboardContent instance - * @return an instance of NoticeboardContent - */ - public NoticeboardContent retrieveNoticeboardByUID(Long uid); + /** *

Returns the persistent instance of NoticeboardContent @@ -116,16 +110,8 @@ */ public NoticeboardSession retrieveNoticeboardSession(Long nbSessionId); + /** - *

Return the persistent instance of a NoticeboardSession - * with the given identifier uid, returns null if not found.

- * - * @param uid an identifier for the NoticeboardSession object. - * @return the persistent instance of a NoticeboardSession or null if not found - */ - public NoticeboardSession retrieveNoticeboardSessionByUID(Long uid); - - /** * Persists the new NoticeboardSession object into the database. * * @param nbSession the NoticeboardSession object to persist @@ -155,15 +141,8 @@ */ 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); - - /** *

Deletes all instances of NoticeboardUser that are associated * with the given instance of NoticeboardSession

* @@ -193,14 +172,6 @@ */ public NoticeboardUser retrieveNoticeboardUser(Long nbUserId); - /** - *

Return the persistent instance of a NoticeboardUser - * with the given identifier uid, returns null if not found.

- * - * @param uid an identifier for the NoticeboardUser object. - * @return the persistent instance of a NoticeboardUser or null if not found - */ - public NoticeboardUser retrieveNoticeboardUserByUID(Long uid); /** * Persists the new NoticeboardUser object into the database. @@ -231,21 +202,24 @@ * @param nbUser The instance of NoticeboardUser to delete. */ public void removeUser(NoticeboardUser nbUser); - - - + /** - *

Performs a check on the flag indicated by flag - * In this noticeboard tool, there are 3 possible flags: - *

  • defineLater
  • - *
  • contentInUse
  • - *
  • runOffline
  • - *
    Returns true if the flag is set, false otherwise

    + *

    Saves the instance of NoticeboardSession to the database. + * This instance is added to the collection of sessions from + * NoticeboardContent with tool content id nbContentId

    * - * @param contentId The tool content id - * @param flag The flag to check, can take the following set of values (defineLater, contentInUse, runOffline) - * @return Returns true if flag is set, false otherwise + * @param nbContentId The tool content Id + * @param session The instance of NoticeboardSession to persist */ - public boolean isFlagSet(Long contentId, int flag); + public void addSession(Long nbContentId, NoticeboardSession session); + /** + *

    Saves the instance of NoticeboardUser to the database. + * nbUser is added to the collection of users from + * NoticeboardSession with tool session id nbSessionId

    + * + * @param nbSessionId The tool session id + * @param user The instance of NoticeboardUser to persist + */ + public void addUser(Long nbSessionId, NoticeboardUser nbUser); }