Class BookmarkBean
- All Implemented Interfaces:
Serializable
BookmarkBean class.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidResets the current bookmark list and returns to the overview of own bookmark lists.intcountSessionBookmarkListItems.createNewBookmarkListAction.Deletes currentBookmarkList.voiddeleteCurrentItemAction(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.voidinit()init.booleanisCurrentBookmarkListMine.booleanisCurrentBookmarkListShared.booleanisNewBookmarkList.voidprepareItemForBookmarkList.voidSets currentBookmarkList to a new object.voidresetShareLink(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.voidselectBookmarkListAction(jakarta.faces.event.ValueChangeEvent event) selectBookmarkListAction.voidsendSessionBookmarkListAsMail.voidsetCurrentBookmark(Bookmark currentBookmark) Setter for the fieldcurrentBookmark.voidsetCurrentBookmarkList(BookmarkList currentBookmarkList) Setter for the fieldcurrentBookmarkList.voidsetCurrentBookmarkListId(String bookmarkListId) setCurrentBookmarkListId.voidvoidsetCurrentUserGroup(UserGroup currentUserGroup) Setter for the fieldcurrentUserGroup.voidsetNewBookmarkListName(String newBookmarkListName) voidsetPublic(BookmarkList bookmarkList, boolean isPublic) voidsetSessionBookmarkListEmail(String sessionBookmarkListEmail) Setter for the fieldsessionBookmarkListEmail.voidsetShareKey(String key) setShareKey.voidRemoves currentUserGroup from the shares list of currentBookmarkList.voiduserGroupSelectedAction(jakarta.faces.event.ValueChangeEvent event) userGroupSelectedAction.voidvalidateName(jakarta.faces.context.FacesContext context, jakarta.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
Stringobject.
-
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
Stringobject.
-
deleteCurrentBookmarkListAction
Deletes currentBookmarkList.- Returns:
- a
Stringobject.
-
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
Stringobject.
-
deleteCurrentItemAction
Removes the currently selected Bookmark from the currently selected BookmarkList.- Parameters:
bookmark- aBookmarkobject.
-
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
Listobject. - Throws:
DAOException- if any.
-
getPublicBookmarkLists
Returns a list of all existing bookmark list that are marked public.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getBookmarkLists
Returns a list of all existing bookmark lists owned by current user- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getBookmarkListsForUser
getBookmarkListsForUser.
- Parameters:
user- aUserobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
selectBookmarkListAction
public void selectBookmarkListAction(jakarta.faces.event.ValueChangeEvent event) throws DAOException selectBookmarkListAction.
- Parameters:
event- aValueChangeEventobject.- Throws:
DAOException- if any.
-
isNewBookmarkList
public boolean isNewBookmarkList()isNewBookmarkList.
- Returns:
- a boolean.
-
createNewBookmarkListAction
createNewBookmarkListAction.
- Returns:
- a
Stringobject.
-
userGroupSelectedAction
userGroupSelectedAction.
- Parameters:
event-ValueChangeEvent- Throws:
DAOException- if any.
-
validateName
public void validateName(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent toValidate, Object value) throws jakarta.faces.validator.ValidatorException, DAOException validateName.
- Parameters:
context- aFacesContextobject.toValidate- aUIComponentobject.value- aObjectobject.- Throws:
jakarta.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
Listobject. - 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- aStringobject.- Throws:
PresentationException- if any.DAOException- if any.
-
viewBookmarkListAction
viewBookmarkListAction.
- Parameters:
bookmarkList- aBookmarkListobject.- Returns:
- a
Stringobject.
-
editBookmarkListAction
editBookmarkListAction.
- Parameters:
bookmarkList- aBookmarkListobject.- Returns:
- a
Stringobject.
-
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:
PresentationExceptionDAOException
-
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()
-