Source Code Cross Referenced for MenuDAO.java in  » Content-Management-System » contineo » org » contineo » core » security » dao » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » contineo » org.contineo.core.security.dao 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.contineo.core.security.dao;
002:
003:        import java.util.Collection;
004:        import java.util.Set;
005:
006:        import org.contineo.core.security.ExtMenu;
007:        import org.contineo.core.security.Menu;
008:
009:        /**
010:         * Instances of this class is a DAO-service for menu objects.
011:         * 
012:         * @author Michael Scholz
013:         * @version 1.0
014:         */
015:        public interface MenuDAO {
016:
017:            /**
018:             * This method persists the menu object.
019:             * 
020:             * @param menu Menu to be stored.
021:             * @return True if successful stored in a database.
022:             */
023:            public boolean store(Menu menu);
024:
025:            /**
026:             * This method deletes a menu in database.
027:             * 
028:             * @param menuId Menu to be deleted.
029:             * @return True if successful deleted.
030:             */
031:            public boolean delete(int menuId);
032:
033:            /**
034:             * Finds a menu by primarykey.
035:             * 
036:             * @param menuId Primarykey of wanted menu.
037:             * @return Wanted menu or null.
038:             */
039:            public Menu findByPrimaryKey(int menuId);
040:
041:            /**
042:             * Finds all menus by menutext.
043:             * 
044:             * @param menutext
045:             * @return Collection of menus with given menutext.
046:             */
047:            public Collection<Menu> findByMenuText(String menutext);
048:
049:            /**
050:             * Finds authorized menus for a user.
051:             * 
052:             * @param username Name of the user.
053:             * @return Collection of found menus.
054:             */
055:            public Collection<Menu> findByUserName(String username);
056:
057:            /**
058:             * Finds authorized menus for a user having a specified keyword.
059:             * 
060:             * @param username Name of the user.
061:             * @param keyword Keyword of the document bind with the menu.
062:             * @return Collection of found menus.
063:             */
064:            public Collection<Menu> findByUserNameAndKeyword(String username,
065:                    String keyword);
066:
067:            /**
068:             * Finds direct children of a menu.
069:             * 
070:             * @param parentId MenuId of the menu which children are wanted.
071:             * @return Collection of found menus.
072:             */
073:            public Collection<Menu> findByUserName(String username, int parentId);
074:
075:            /**
076:             * Finds all children(direct and indirect) by parentId
077:             * 
078:             * @param parentId
079:             * @return
080:             */
081:            public Collection<Menu> findByParentId(int parentId);
082:
083:            /**
084:             * Finds direct children of a menu.
085:             * 
086:             * @param parentId MenuId of the menu which children are wanted.
087:             * @return Collection of found menus.
088:             */
089:            public Collection<Menu> findChildren(int parentId);
090:
091:            /**
092:             * This method is looking up for writing rights for a menu and an user.
093:             * 
094:             * @param menuId ID of the menu.
095:             * @param username Name of the user.
096:             */
097:            public boolean isWriteEnable(int menuId, String username);
098:
099:            public boolean isReadEnable(int menuId, String username);
100:
101:            /**
102:             * This method selects only the menutext from a menu.
103:             * 
104:             * @param menuId Id of the menu.
105:             * @return Selected menutext.
106:             */
107:            public String findMenuTextByMenuId(int menuId);
108:
109:            /**
110:             * This method selects only the menuId from the menus for which a user is
111:             * authorized.
112:             * 
113:             * @param username Name of the user.
114:             * @return Collection of selected menuId's.
115:             */
116:            public Set<Integer> findMenuIdByUserName(String username);
117:
118:            /**
119:             * returns a collection with sub-menus contained in menu with the given id
120:             * 
121:             * @param menuid return all menus in this menu
122:             * @param userName only return those menus the user has at least read access
123:             *        to
124:             * @return a collection containing elements of type {@link ExtMenu}
125:             */
126:            public Collection<ExtMenu> getContainedMenus(int menuId,
127:                    String userName);
128:
129:            /**
130:             * returns if a menu is writeable for a user
131:             * 
132:             * @param menuid check this menu
133:             * @param userName privileges for this should be checked
134:             * @return a 0 if false, a 1 if true
135:             */
136:            public Integer isMenuWriteable(int menuId, String userName);
137:
138:            /**
139:             * checks that the user has access to the menu and all its sub-items
140:             */
141:            public boolean hasWriteAccess(Menu menu, String p_userName);
142:
143:            /**
144:             * Finds all menues associated to the passed group
145:             * 
146:             * @param groupName The group name
147:             * @return The collection of menues
148:             */
149:            public Collection<Menu> findByGroupName(String groupName);
150:
151:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.