Source Code Cross Referenced for UserGroupAccessor.java in  » Portal » mypersonalizer » es » udc » mypersonalizer » kernel » model » repository » interfaces » 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 » Portal » mypersonalizer » es.udc.mypersonalizer.kernel.model.repository.interfaces 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $Header: /export/home/cvsroot/MyPersonalizerRepository/MyPersonalizer/Subsystems/Kernel/Sources/es/udc/mypersonalizer/kernel/model/repository/interfaces/UserGroupAccessor.java,v 1.1.1.1 2004/03/25 12:08:36 fbellas Exp $
003:         * $Revision: 1.1.1.1 $
004:         * $Date: 2004/03/25 12:08:36 $
005:         *
006:         * =============================================================================
007:         *
008:         * Copyright (c) 2003, The MyPersonalizer Development Group
009:         * (http://www.tic.udc.es/~fbellas/mypersonalizer/index.html) at 
010:         * University Of A Coruna
011:         * All rights reserved.
012:         *
013:         * Redistribution and use in source and binary forms, with or without
014:         * modification, are permitted provided that the following conditions are met:
015:         *
016:         *  - Redistributions of source code must retain the above copyright notice, 
017:         *    this list of conditions and the following disclaimer.
018:         *
019:         *  - Redistributions in binary form must reproduce the above copyright notice,
020:         *    this list of conditions and the following disclaimer in the documentation
021:         *    and/or other materials provided with the distribution.
022:         *
023:         *  - Neither the name of the University Of A Coruna nor the names of its 
024:         *    contributors may be used to endorse or promote products derived from 
025:         *    this software without specific prior written permission.
026:         *
027:         * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
028:         * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
029:         * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
030:         * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
031:         * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
032:         * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
033:         * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
034:         * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
035:         * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
036:         * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
037:         * POSSIBILITY OF SUCH DAMAGE.
038:         *
039:         */
040:
041:        package es.udc.mypersonalizer.kernel.model.repository.interfaces;
042:
043:        import java.util.Collection;
044:
045:        import es.udc.mypersonalizer.kernel.util.exceptions.InstanceNotFoundException;
046:        import es.udc.mypersonalizer.kernel.util.exceptions.DuplicateInstanceException;
047:        import es.udc.mypersonalizer.kernel.util.exceptions.InternalErrorException;
048:        import es.udc.mypersonalizer.kernel.model.repository.interfaces.UserAlreadyExistsInGroupException;
049:        import es.udc.mypersonalizer.kernel.model.repository.interfaces.UserDoesNotExistInGroupException;
050:
051:        /**
052:         * This interface specifies the methods required to store and retrieve
053:         * instances of the <code>UserGroup</code> class.
054:         *
055:         * @author  Abel Iago Toral Quiroga
056:         * @see     UserGroup
057:         * @since 1.0
058:         */
059:        public interface UserGroupAccessor {
060:
061:            /**
062:             * Finds all groups assigned to a user. Implements Page-by-Page Iterator
063:             * design pattern.
064:             * @param loginName the user's login name.
065:             * @param startIndex the index of the group assigned to this user from
066:             *           which start to retrive groups.
067:             * @param count the number of groups to retrive begining in the 
068:             *        <code>startIndex</code> group.
069:             * @throws <code>InternalErrorException</code> if a severe failure occured
070:             * @return a <code>Collection</code> of <code>UserGroup</code> objects
071:             *         representing groups assigned to this user.
072:             */
073:            public Collection findAllGroupsAssignedToUser(String loginName,
074:                    int startIndex, int count) throws InternalErrorException;
075:
076:            /**
077:             * Finds all groups assigned to a user.
078:             * @param loginName the user's login name.
079:             * @throws <code>InternalErrorException</code> if a severe failure occured
080:             * @return a <code>Collection</code> of <code>UserGroup</code> objects
081:             *         representing groups assigned to this user.
082:             */
083:            public Collection findAllGroupsAssignedToUser(String loginName)
084:                    throws InternalErrorException;
085:
086:            /**
087:             * Finds all users assigned to a group. Implements Page-by-Page Iterator
088:             * design pattern.
089:             * @param groupId the group identifier.
090:             * @param startIndex the index of the user assigned to this group from
091:             *           which start to retrive users.
092:             * @param count the number of users to retrive begining in the 
093:             *        <code>startIndex</code> user.
094:             * @throws <code>InternalErrorException</code> if a severe failure occured
095:             * @return a <code>Collection</code> with the login names of the users
096:             *         assigned to the group.
097:             */
098:            public Collection findAllUsersAssignedToGroup(Long groupId,
099:                    int startIndex, int count) throws InternalErrorException;
100:
101:            /**
102:             * Finds all groups. Implements Page-by-Page Iterator design pattern.
103:             * @param startIndex the index of the group from
104:             *           which start to retrive groups.
105:             * @param count the number of groups to retrive begining in the 
106:             *        <code>startIndex</code> group.
107:             * @throws <code>InternalErrorException</code> if a severe failure occured
108:             * @return a <code>Collection</code> of <code>UserGroup</code> objects.
109:             */
110:            public Collection findAllGroups(int startIndex, int count)
111:                    throws InternalErrorException;
112:
113:            /**
114:             * Finds all groups.
115:             * @throws <code>InternalErrorException</code> if a severe failure occured
116:             * @return a <code>Collection</code> of <code>UserGroup</code> objects.
117:             */
118:            public Collection findAllGroups() throws InternalErrorException;
119:
120:            /**
121:             * Finds a specific group by its identifier. 
122:             * @param userGroupIdentifier the user group identifier
123:             * @throws <code>InternalErrorException</code> if a severe failure occured
124:             * @throws <code>InstanceNotFoundException</code> if the user group 
125:             *         does not exist.
126:             * @return a <code>UserGroup</code> with the group information
127:             */
128:            public UserGroup findGroup(Long userGroupIdentifier)
129:                    throws InternalErrorException, InstanceNotFoundException;
130:
131:            /**
132:             * Finds a specific group by its name. 
133:             * @param userGroupName the user group name.
134:             * @throws <code>InternalErrorException</code> if a severe failure occured
135:             * @throws <code>InstanceNotFoundException</code> if the user group does
136:             *          not exist.
137:             * @return a <code>UserGroup</code> with the group information
138:             */
139:            public UserGroup findGroupByName(String userGroupName)
140:                    throws InternalErrorException, InstanceNotFoundException;
141:
142:            /**
143:             * Adds a user to a group.
144:             * @param loginName the user's login name.
145:             * @param userGroupIdentifier the group where to add the user.
146:             * @throws <code>InternalErrorException</code> if a severe failure occured
147:             * @throws <code>InstanceNotFoundException</code> if the user group 
148:             *         does not exist.
149:             * @throws <code>UserAlreadyExistsInGroupException</code> if the user 
150:             *         was previously assigned to this group.
151:             */
152:            public void addUserToGroup(String loginName,
153:                    Long userGroupIdentifier) throws InternalErrorException,
154:                    InstanceNotFoundException,
155:                    UserAlreadyExistsInGroupException;
156:
157:            /**
158:             * Adds a new group of users.
159:             * @param userGroup a <code>UserGroup</code> representating the new group
160:             *        of users
161:             * @throws <code>InternalErrorException</code> if a severe failure occured
162:             * @throws <code>DuplicateInstanceException</code> if the group already
163:             *         exists.
164:             * @return a <code>UserGroup</code> with the added group, including its
165:             *         identifier.
166:             */
167:            public UserGroup addGroup(UserGroup userGroup)
168:                    throws InternalErrorException, DuplicateInstanceException;
169:
170:            /**
171:             * Removes a user from a group
172:             * @param loginName the user's login name.
173:             * @param userGroupIdentifier the group where to remove the user
174:             * @throws <code>InternalErrorException</code> if a severe failure occured
175:             * @throws <code>InstanceNotFoundException</code> if the user group 
176:             *         does not exist.
177:             * @throws <code>UserDoesNotExistInGroupException</code>
178:             *         if the user is not assigned to this group.
179:             */
180:            public void removeUserFromGroup(String loginName,
181:                    Long userGroupIdentifier) throws InternalErrorException,
182:                    InstanceNotFoundException, UserDoesNotExistInGroupException;
183:
184:            /**
185:             * Removes a group of users
186:             * @param userGroupIdentifier the group to remove
187:             * @throws <code>InternalErrorException</code> if a severe failure occured
188:             * @throws <code>InstanceNotFoundException</code> if the user group 
189:             *         does not exist.
190:             */
191:            public void removeGroup(Long userGroupIdentifier)
192:                    throws InternalErrorException, InstanceNotFoundException;
193:
194:            /**
195:             * Removes all groups assignments for a given user.
196:             * @param loginName the user login name.
197:             * @throws <code>InternalErrorException</code> if a severe failure occured
198:             */
199:            public void removeAllGroupAssignments(String loginName)
200:                    throws InternalErrorException;
201:
202:            /**
203:             * Updates a group of users.
204:             * @param userGroup the modified group
205:             * @throws <code>InternalErrorException</code> if a severe failure occured
206:             * @throws <code>InstanceNotFoundException</code> if the user group 
207:             *         does not exist.
208:             */
209:            public void updateGroup(UserGroup userGroup)
210:                    throws InternalErrorException, DuplicateInstanceException,
211:                    InstanceNotFoundException;
212:
213:        }
w___ww_.___j_av___a__2s___.__c__o__m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.