Class BookmarkBean
- All Implemented Interfaces:
Serializable
BookmarkBean class.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Resets the current bookmark list and returns to the overview of own bookmark lists.int
countSessionBookmarkListItems.createNewBookmarkListAction.Deletes currentBookmarkList.void
deleteCurrentItemAction
(Bookmark bookmark) Removes the currently selected Bookmark from the currently selected BookmarkList.editBookmarkListAction
(BookmarkList bookmarkList) editBookmarkListAction.Returns a list of all existing bookmark lists owned by current usergetBookmarkListsForUser
(User user) getBookmarkListsForUser.static List<BookmarkList>
getBookmarkListsSharedWithUser.Getter for the fieldcurrentBookmark
.Getter for the fieldcurrentBookmarkList
.getCurrentBookmarkListId.getCurrentBookmarkListNames.Getter for the fieldcurrentUserGroup
.Returns a list of all existing bookmark list that are marked public.Returns the names all existing user groups (minus the ones currentBookmarkList is already shared with).Getter for the fieldsessionBookmarkListEmail
.getShareKey.getShareLink
(BookmarkList bookmarkList) getShareLink.void
init()
init.boolean
isCurrentBookmarkListMine.boolean
isCurrentBookmarkListShared.boolean
isNewBookmarkList.void
prepareItemForBookmarkList.void
Sets currentBookmarkList to a new object.void
resetShareLink
(BookmarkList bookmarkList) Updates the currently selected Bookmark if it is already part of the current BookmarkList, otherwise adds a new Bookmark.Updates the currently selected bookmark list if it already in the user's list of bookmark lists, adds it to the list otherwise.void
selectBookmarkListAction
(javax.faces.event.ValueChangeEvent event) selectBookmarkListAction.void
sendSessionBookmarkListAsMail.void
setCurrentBookmark
(Bookmark currentBookmark) Setter for the fieldcurrentBookmark
.void
setCurrentBookmarkList
(BookmarkList currentBookmarkList) Setter for the fieldcurrentBookmarkList
.void
setCurrentBookmarkListId
(String bookmarkListId) setCurrentBookmarkListId.void
void
setCurrentUserGroup
(UserGroup currentUserGroup) Setter for the fieldcurrentUserGroup
.void
setNewBookmarkListName
(String newBookmarkListName) void
setPublic
(BookmarkList bookmarkList, boolean isPublic) void
setSessionBookmarkListEmail
(String sessionBookmarkListEmail) Setter for the fieldsessionBookmarkListEmail
.void
setShareKey
(String key) setShareKey.void
Removes currentUserGroup from the shares list of currentBookmarkList.void
userGroupSelectedAction
(javax.faces.event.ValueChangeEvent event) userGroupSelectedAction.void
validateName
(javax.faces.context.FacesContext context, javax.faces.component.UIComponent toValidate, Object value) validateName.viewBookmarkListAction
(BookmarkList bookmarkList) viewBookmarkListAction.
-
Constructor Details
-
BookmarkBean
public BookmarkBean()Empty Constructor.
-
-
Method Details
-
init
@PostConstruct public void init()init.
-
cancelEditCurrentBookmarkListAction
Resets the current bookmark list and returns to the overview of own bookmark lists.- Returns:
- a
String
object.
-
saveCurrentBookmarkListAction
Updates the currently selected bookmark list if it already in the user's list of bookmark lists, adds it to the list otherwise. Saves DataManager in both cases.- Returns:
- a
String
object.
-
deleteCurrentBookmarkListAction
Deletes currentBookmarkList.- Returns:
- a
String
object.
-
resetCurrentBookmarkListAction
public void resetCurrentBookmarkListAction()Sets currentBookmarkList to a new object. -
prepareItemForBookmarkList
prepareItemForBookmarkList.
- Throws:
IndexUnreachableException
- if any.
-
saveCurrentBookmarkAction
Updates the currently selected Bookmark if it is already part of the current BookmarkList, otherwise adds a new Bookmark. Saves DataManager in both cases.- Returns:
- a
String
object.
-
deleteCurrentItemAction
Removes the currently selected Bookmark from the currently selected BookmarkList.- Parameters:
bookmark
- aBookmark
object.
-
getRemainingUserGroupNames
Returns the names all existing user groups (minus the ones currentBookmarkList is already shared with). TODO Filter some user groups, if required (e.g. admins)- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getPublicBookmarkLists
Returns a list of all existing bookmark list that are marked public.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getBookmarkLists
Returns a list of all existing bookmark lists owned by current user- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getBookmarkListsForUser
getBookmarkListsForUser.
- Parameters:
user
- aUser
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
selectBookmarkListAction
selectBookmarkListAction.
- Parameters:
event
- aValueChangeEvent
object.- Throws:
DAOException
- if any.
-
isNewBookmarkList
public boolean isNewBookmarkList()isNewBookmarkList.
- Returns:
- a boolean.
-
createNewBookmarkListAction
createNewBookmarkListAction.
- Returns:
- a
String
object.
-
userGroupSelectedAction
userGroupSelectedAction.
- Parameters:
event
-ValueChangeEvent
- Throws:
DAOException
- if any.
-
validateName
public void validateName(javax.faces.context.FacesContext context, javax.faces.component.UIComponent toValidate, Object value) throws javax.faces.validator.ValidatorException, DAOException validateName.
- Parameters:
context
- aFacesContext
object.toValidate
- aUIComponent
object.value
- aObject
object.- Throws:
javax.faces.validator.ValidatorException
- if any.DAOException
- if any.
-
isCurrentBookmarkListMine
public boolean isCurrentBookmarkListMine()isCurrentBookmarkListMine.
- Returns:
- a boolean.
-
getCurrentBookmarkList
Getter for the field
currentBookmarkList
.- Returns:
- the currentBookmarkList
-
getCurrentBookmarkListNames
getCurrentBookmarkListNames.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
setCurrentBookmarkList
Setter for the field
currentBookmarkList
.- Parameters:
currentBookmarkList
- the currentBookmarkList to set
-
getCurrentBookmarkListId
getCurrentBookmarkListId.
- Returns:
- Identifier of currentBookmarkList; null if none loaded
-
setCurrentBookmarkListId
public void setCurrentBookmarkListId(String bookmarkListId) throws PresentationException, DAOException setCurrentBookmarkListId.
- Parameters:
bookmarkListId
- aString
object.- Throws:
PresentationException
- if any.DAOException
- if any.
-
viewBookmarkListAction
viewBookmarkListAction.
- Parameters:
bookmarkList
- aBookmarkList
object.- Returns:
- a
String
object.
-
editBookmarkListAction
editBookmarkListAction.
- Parameters:
bookmarkList
- aBookmarkList
object.- Returns:
- a
String
object.
-
getCurrentBookmark
Getter for the field
currentBookmark
.- Returns:
- the currentBookmark
-
setCurrentBookmark
Setter for the field
currentBookmark
.- Parameters:
currentBookmark
- the currentBookmark to set
-
getCurrentUserGroup
Getter for the field
currentUserGroup
.- Returns:
- the currentUserGroup
-
setCurrentUserGroup
Setter for the field
currentUserGroup
.- Parameters:
currentUserGroup
- the currentUserGroup to set
-
setSessionBookmarkListEmail
Setter for the field
sessionBookmarkListEmail
.- Parameters:
sessionBookmarkListEmail
- the sessionBookmarkListEmail to set
-
getSessionBookmarkListEmail
Getter for the field
sessionBookmarkListEmail
.- Returns:
- the sessionBookmarkListEmail
-
getCurrentBookmarkListKey
-
setCurrentBookmarkListKey
- Throws:
PresentationException
DAOException
-
setPublic
-
sendSessionBookmarkListAsMail
public void sendSessionBookmarkListAsMail()sendSessionBookmarkListAsMail.
-
countSessionBookmarkListItems
public int countSessionBookmarkListItems()countSessionBookmarkListItems.
- Returns:
- Size of items in the session bookmark list
-
getNewBookmarkListName
- Returns:
- the newBookmarkName
-
setNewBookmarkListName
- Parameters:
newBookmarkListName
- the newBookmarkListName to set
-
addBookmarkList
public void addBookmarkList()
-