public interface MenuDAO extends PersistentObjectDAO<Menu>
Modifier and Type | Method and Description |
---|---|
boolean |
applyRithtToTree(long id)
Propagates the security policies of a node to the whole subree
|
String |
computePathExtended(long id)
Dynamically computes the path extended for the specified menu.
|
void |
deleteAll(List<Menu> menus)
For each menu, save the folder delete history entry for each folder and
delete the folder
|
List<Menu> |
findByGroupId(long groupId)
Finds all menus accessible by the passed group
|
List<Menu> |
findByParentId(long parentId)
Finds all children(direct and indirect) by parentId
|
List<Menu> |
findByText(Menu parent,
String text,
boolean caseSensitive)
Finds all menus by menu text, contained in the parent menu
|
List<Menu> |
findByText(String text)
Finds all menus by menu text.
|
List<Menu> |
findByTextAndParentId(String text,
long parentId)
Finds that folder that lies under a specific parent (given by the id) an
with a given text(like operator is used)
|
List<Menu> |
findByUserId(long userId)
Finds authorized menus for a user.
|
List<Menu> |
findByUserId(long userId,
long parentId)
Finds direct children of a menu.
|
List<Menu> |
findChildren(long parentId,
Integer max)
Finds direct children of a menu.
|
List<Menu> |
findChildren(long parentId,
long userId)
Finds direct children of a menu accessible by the given user.
|
List<Long> |
findIdByUserId(long userId,
long parentId)
This method selects only the menuId from the menus for which a user is
authorized.
|
List<Long> |
findMenuIdByUserId(long userId)
This method selects only the menuId from the menus for which a user is
authorized.
|
List<Long> |
findMenuIdByUserIdAndPermission(long userId,
Permission permission)
Finds all menus ids with a specific permission enabled on the specifies
user
|
List<Menu> |
findParents(long id)
Returns a List of menus being a parent of the given menu.
|
String |
findTextById(long id)
This method selects only the menu text from a menu.
|
boolean |
hasWriteAccess(Menu menu,
long userId)
Checks that the user has access to the menu and all its sub-items
|
int |
isMenuWriteable(long id,
long userId)
Returns if a menu is writeable for a user
|
boolean |
isReadEnable(long id,
long userId) |
boolean |
isWriteEnable(long id,
long userId)
This method is looking up for writing rights for a menu and an user.
|
void |
restore(long id,
boolean parents)
Restores a previously deleted menu
|
boolean |
store(Menu menu)
Same as store(Menu, boolean)
|
bulkUpdate, delete, deleteAll, findAll, findAllIds, findById, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, initialize, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForRowSet
List<Menu> findByText(String text)
text
- List<Menu> findByText(Menu parent, String text, boolean caseSensitive)
parent
- The parent menu(optional)text
- The menutext to search forcaseSensitive
- List<Menu> findByUserId(long userId)
userId
- ID of the user.List<Long> findMenuIdByUserIdAndPermission(long userId, Permission permission)
userId
- The user identifierpermission
- The permission to checkList<Menu> findByUserId(long userId, long parentId)
parentId
- MenuId of the menu which children are wanted.List<Menu> findByParentId(long parentId)
parentId
- List<Menu> findChildren(long parentId, Integer max)
parentId
- MenuId of the menu which children are wantedmax
- Optional, maximum number of childrenList<Menu> findChildren(long parentId, long userId)
parentId
- MenuId of the menu which children are wanteduserId
- Identifier of the user that mush have read accessboolean isWriteEnable(long id, long userId)
id
- ID of the menu.userId
- ID of the user.boolean isReadEnable(long id, long userId)
String findTextById(long id)
id
- Id of the menu.List<Long> findMenuIdByUserId(long userId)
userId
- ID of the user.List<Long> findIdByUserId(long userId, long parentId)
userId
- ID of the user.parentId
- Parent menuint isMenuWriteable(long id, long userId)
id
- check this menuuserId
- privileges for this should be checkedboolean hasWriteAccess(Menu menu, long userId)
List<Menu> findByGroupId(long groupId)
groupId
- The group idList<Menu> findParents(long id)
id
- void restore(long id, boolean parents)
id
- The menu identifierparents
- true if parents must be restored alsoList<Menu> findByTextAndParentId(String text, long parentId)
text
- parentId
- boolean store(Menu menu)
store
in interface PersistentObjectDAO<Menu>
menu
- entity to be stored.void deleteAll(List<Menu> menus)
menu
- List of menu to be deleteString computePathExtended(long id)
id
- boolean applyRithtToTree(long id)
Copyright © 2008-2014 Logical Objects. All Rights Reserved.