001: /*
002: * Copyright (c) 2001 - 2005 ivata limited.
003: * All rights reserved.
004: * -----------------------------------------------------------------------------
005: * ivata groupware may be redistributed under the GNU General Public
006: * License as published by the Free Software Foundation;
007: * version 2 of the License.
008: *
009: * These programs are free software; you can redistribute them and/or
010: * modify them under the terms of the GNU General Public License
011: * as published by the Free Software Foundation; version 2 of the License.
012: *
013: * These programs are distributed in the hope that they will be useful,
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
016: *
017: * See the GNU General Public License in the file LICENSE.txt for more
018: * details.
019: *
020: * If you would like a copy of the GNU General Public License write to
021: *
022: * Free Software Foundation, Inc.
023: * 59 Temple Place - Suite 330
024: * Boston, MA 02111-1307, USA.
025: *
026: *
027: * To arrange commercial support and licensing, contact ivata at
028: * http://www.ivata.com/contact.jsp
029: * -----------------------------------------------------------------------------
030: * $Log: TestSecurityServer.java,v $
031: * Revision 1.6 2005/10/14 14:01:52 colinmacleod
032: * Changed password checking routines to return boolean, rather than throwing
033: * an exception.
034: *
035: * Revision 1.5 2005/10/11 18:53:07 colinmacleod
036: * Fixed some checkstyle and javadoc issues.
037: *
038: * Revision 1.4 2005/10/03 10:21:14 colinmacleod
039: * Fixed some style and javadoc issues.
040: *
041: * Revision 1.3 2005/09/29 14:17:03 colinmacleod
042: * Split UserGroupDO off from GroupDO.
043: * Moved UserGroupDO, Right classes to security subproject (from
044: * addressbook).
045: * Centralized user right handling into Rights and RightsImpl.
046: *
047: * Revision 1.2 2005/04/09 17:19:11 colinmacleod
048: * Changed copyright text to GPL v2 explicitly.
049: *
050: * Revision 1.1.1.1 2005/03/10 17:50:14 colinmacleod
051: * Restructured ivata op around Hibernate/PicoContainer.
052: * Renamed ivata groupware.
053: *
054: * Revision 1.2 2004/11/12 15:57:08 colinmacleod
055: * Removed dependencies on SSLEXT.
056: * Moved Persistence classes to ivata masks.
057: *
058: * Revision 1.1 2004/11/03 15:38:00 colinmacleod
059: * First version in CVS.
060: *
061: * -----------------------------------------------------------------------------
062: */
063: package com.ivata.groupware.admin.security.server;
064:
065: import com.ivata.groupware.admin.security.user.UserDO;
066: import com.ivata.mask.util.SystemException;
067:
068: /**
069: * <p>
070: * This class can be used as a dummy security server to test the security
071: * features.
072: * </p>
073: *
074: * @since ivata groupware 0.10 (Nov 2, 2004)
075: * @author Colin MacLeod
076: * <a href='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
077: * @version $Revision: 1.6 $
078: */
079:
080: public class TestSecurityServer implements SecurityServer {
081:
082: /**
083: * Serialization version (for <code>Serializable</code> interface).
084: */
085: private static final long serialVersionUID = 1L;
086:
087: /**
088: * {@inheritDoc}
089: *
090: * @param securitySession {@inheritDoc}
091: * @param userName {@inheritDoc}
092: * @param fullName {@inheritDoc}
093: * @throws SystemException {@inheritDoc}
094: */
095: public void addUser(final SecuritySession securitySession,
096: final String userName, final String fullName)
097: throws SystemException {
098: // TODO Auto-generated method stub
099:
100: }
101:
102: /**
103: * {@inheritDoc}
104: *
105: * @param securitySession {@inheritDoc}
106: * @param userName {@inheritDoc}
107: * @param password {@inheritDoc}
108: * @throws SystemException {@inheritDoc}
109: */
110: public boolean checkPassword(final SecuritySession securitySession,
111: final String userName, final String password)
112: throws SystemException {
113: return true;
114: }
115:
116: /**
117: * {@inheritDoc}
118: *
119: * @param securitySession {@inheritDoc}
120: * @param userName {@inheritDoc}
121: * @return {@inheritDoc}
122: */
123: public final String getSystemUserName(
124: final SecuritySession securitySession, final String userName) {
125: return null;
126: }
127:
128: /**
129: * {@inheritDoc}
130: *
131: * @param securitySession {@inheritDoc}
132: * @param systemUserName {@inheritDoc}
133: * @return {@inheritDoc}
134: */
135: public final String getUserNameFromSystemUserName(
136: final SecuritySession securitySession,
137: final String systemUserName) {
138: return null;
139: }
140:
141: /**
142: * {@inheritDoc}
143: *
144: * @param securitySession {@inheritDoc}
145: * @param {@inheritDoc}
146: * @return {@inheritDoc}
147: * @see com.ivata.groupware.admin.security.server.SecurityServer
148: * #isUser(java.lang.String)
149: */
150: public boolean isUser(final SecuritySession securitySession,
151: final String userNameParam) {
152: return false;
153: }
154:
155: /**
156: * {@inheritDoc}
157: *
158: * @param user {@inheritDoc}
159: * @param password {@inheritDoc}
160: * @return {@inheritDoc}
161: * @throws SystemException {@inheritDoc}
162: */
163: public SecuritySession login(final UserDO user,
164: final String password) throws SystemException {
165: return null;
166: }
167:
168: /**
169: * {@inheritDoc}
170: *
171: * @return {@inheritDoc}
172: * @throws SystemException {@inheritDoc}
173: */
174: public SecuritySession loginGuest() throws SystemException {
175: return null;
176: }
177:
178: /**
179: * {@inheritDoc}
180: *
181: * @param securitySession {@inheritDoc}
182: * @param userName {@inheritDoc}
183: * @throws SystemException {@inheritDoc}
184: */
185: public void removeUser(final SecuritySession securitySession,
186: final String userName) throws SystemException {
187: }
188:
189: /**
190: * {@inheritDoc}
191: *
192: * @param securitySession {@inheritDoc}
193: * @param userName {@inheritDoc}
194: * @param password {@inheritDoc}
195: * @throws SystemException {@inheritDoc}
196: */
197: public final void setPassword(
198: final SecuritySession securitySession,
199: final String userName, final String password)
200: throws SystemException {
201: }
202: }
|