Source Code Cross Referenced for CmsRegistrationInfo.java in  » Content-Management-System » opencms » com » alkacon » opencms » registration » 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 » opencms » com.alkacon.opencms.registration 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * File   : $Source: /usr/local/cvs/alkacon/com.alkacon.opencms.registration/src/com/alkacon/opencms/registration/CmsRegistrationInfo.java,v $
003:         * Date   : $Date: 2008-02-19 13:22:30 $
004:         * Version: $Revision: 1.1 $
005:         *
006:         * This file is part of the Alkacon OpenCms Add-On Module Package
007:         *
008:         * Copyright (c) 2007 Alkacon Software GmbH (http://www.alkacon.com)
009:         *
010:         * The Alkacon OpenCms Add-On Module Package is free software: 
011:         * you can redistribute it and/or modify
012:         * it under the terms of the GNU General Public License as published by
013:         * the Free Software Foundation, either version 3 of the License, or
014:         * (at your option) any later version.
015:         * 
016:         * The Alkacon OpenCms Add-On Module Package is distributed 
017:         * in the hope that it will be useful,
018:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
019:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
020:         * GNU General Public License for more details.
021:         * 
022:         * You should have received a copy of the GNU General Public License
023:         * along with the Alkacon OpenCms Add-On Module Package.  
024:         * If not, see http://www.gnu.org/licenses/.
025:         *
026:         * For further information about Alkacon Software GmbH, please see the
027:         * company website: http://www.alkacon.com.
028:         *
029:         * For further information about OpenCms, please see the
030:         * project website: http://www.opencms.org.
031:         */
032:
033:        package com.alkacon.opencms.registration;
034:
035:        import org.opencms.file.CmsObject;
036:        import org.opencms.file.CmsUser;
037:        import org.opencms.main.CmsException;
038:        import org.opencms.main.OpenCms;
039:        import org.opencms.security.CmsOrganizationalUnit;
040:
041:        import java.util.ArrayList;
042:        import java.util.Iterator;
043:        import java.util.List;
044:
045:        /**
046:         * This class can be used to display statistical information.<p>
047:         * 
048:         * @author Michael Moossen 
049:         * 
050:         * @version $Revision: 1.1 $
051:         * 
052:         * @since 7.0.4 
053:         */
054:        public class CmsRegistrationInfo {
055:
056:            private static CmsObject m_cms = CmsRegistrationModuleAction
057:                    .getAdminCms();
058:            private CmsOrganizationalUnit m_ou;
059:
060:            /**
061:             * Bean Constructor.<p>
062:             */
063:            public CmsRegistrationInfo() {
064:
065:                // empty
066:            }
067:
068:            /**
069:             * Returns the activated users.<p>
070:             * 
071:             * @return the activated users
072:             * 
073:             * @throws CmsException if something goes wrong
074:             */
075:            public List getActivatedUsers() throws CmsException {
076:
077:                List users = new ArrayList(getUsers());
078:                Iterator itUsers = users.iterator();
079:                while (itUsers.hasNext()) {
080:                    CmsUser user = (CmsUser) itUsers.next();
081:                    if (!user.isEnabled()) {
082:                        itUsers.remove();
083:                    }
084:                }
085:                return users;
086:            }
087:
088:            /**
089:             * Returns the registered but not activated users.<p>
090:             * 
091:             * @return the registered but not activated users
092:             * 
093:             * @throws CmsException if something goes wrong
094:             */
095:            public List getNotActivatedUsers() throws CmsException {
096:
097:                List users = new ArrayList(getUsers());
098:                Iterator itUsers = users.iterator();
099:                while (itUsers.hasNext()) {
100:                    CmsUser user = (CmsUser) itUsers.next();
101:                    if (user.isEnabled()) {
102:                        itUsers.remove();
103:                    }
104:                }
105:                return users;
106:            }
107:
108:            /**
109:             * Returns the total number of online users.<p>
110:             * 
111:             * @return the total number of online users
112:             * 
113:             * @throws CmsException if something goes wrong
114:             */
115:            public int getNumOnlineUsers() throws CmsException {
116:
117:                return getOnlineUsers().size();
118:            }
119:
120:            /**
121:             * Returns the total number of users.<p>
122:             * 
123:             * @return the total number of users
124:             * 
125:             * @throws CmsException if something goes wrong
126:             */
127:            public int getNumUsers() throws CmsException {
128:
129:                return getUsers().size();
130:            }
131:
132:            /**
133:             * Returns the logged in users.<p>
134:             * 
135:             * @return the logged in users
136:             * 
137:             * @throws CmsException if something goes wrong
138:             */
139:            public List getOnlineUsers() throws CmsException {
140:
141:                List users = new ArrayList(getUsers());
142:                Iterator itUsers = users.iterator();
143:                while (itUsers.hasNext()) {
144:                    CmsUser user = (CmsUser) itUsers.next();
145:                    if (OpenCms.getSessionManager().getSessionInfos(
146:                            user.getId()).isEmpty()) {
147:                        itUsers.remove();
148:                    }
149:                }
150:                return users;
151:            }
152:
153:            /**
154:             * Returns the users.<p>
155:             * 
156:             * @return the users
157:             * 
158:             * @throws CmsException if something goes wrong
159:             */
160:            public List getUsers() throws CmsException {
161:
162:                return OpenCms.getOrgUnitManager().getUsers(m_cms,
163:                        m_ou.getName(), false);
164:            }
165:
166:            /**
167:             * Sets the organizational unit fqn.<p>
168:             *
169:             * @param oufqn the organizational unit fqn to set
170:             * 
171:             * @throws CmsException if something goes wrong 
172:             */
173:            public void setOu(String oufqn) throws CmsException {
174:
175:                m_ou = OpenCms.getOrgUnitManager().readOrganizationalUnit(
176:                        m_cms, oufqn);
177:            }
178:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.