copyright messages updated in all java filees.
[utils] / security / src / test / java / org / wamblee / usermgt / UsermgtTestUtils.java
index f21d670c40e701bf289ff1baaa8dd2ce18ffebb0..a8e1dd5154f33f1123160d7eb9acfc232bd530ee 100644 (file)
 /*
- * Copyright 2005 the original author or authors.
- *
+ * Copyright 2005-2010 the original author or authors.
+ * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- *
+ * 
  *      http://www.apache.org/licenses/LICENSE-2.0
- *
+ * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- */
+ */ 
 package org.wamblee.usermgt;
 
 import org.wamblee.security.encryption.Md5HexMessageDigester;
 
 import org.wamblee.usermgt.UserMgtException.Reason;
 
-
 /**
  * User management test utilities.
- *
+ * 
  * @author Erik Brakkee
  */
 public class UsermgtTestUtils {
-    /**
-     * DOCUMENT ME!
-     */
     private static final String DUMMY_GROUP = "dummygroup";
 
-    /**
-     * DOCUMENT ME!
-     */
     private static final String DUMMY_PASSWD = "dummypasswd";
 
-    /**
-     * DOCUMENT ME!
-     *
-     * @param aName DOCUMENT ME!
-     *
-     * @return DOCUMENT ME!
-     */
     public static Group createGroup(String aName) {
         return new Group(aName);
     }
 
-    /**
-     * DOCUMENT ME!
-     *
-     * @param aUsername DOCUMENT ME!
-     *
-     * @return DOCUMENT ME!
-     *
-     * @throws UserMgtException DOCUMENT ME!
-     */
     public static User createUser(String aUsername) throws UserMgtException {
         return createUser(aUsername, DUMMY_GROUP);
     }
 
-    /**
-     * DOCUMENT ME!
-     *
-     * @param aUsername DOCUMENT ME!
-     * @param aGroup DOCUMENT ME!
-     *
-     * @return DOCUMENT ME!
-     *
-     * @throws UserMgtException DOCUMENT ME!
-     */
     public static User createUser(String aUsername, String aGroup)
         throws UserMgtException {
         return createUser(aUsername, createGroup(aGroup));
     }
 
-    /**
-     * DOCUMENT ME!
-     *
-     * @param aUsername DOCUMENT ME!
-     * @param aGroup DOCUMENT ME!
-     *
-     * @return DOCUMENT ME!
-     *
-     * @throws UserMgtException DOCUMENT ME!
-     */
     public static User createUser(String aUsername, Group aGroup)
         throws UserMgtException {
         return createUser(aUsername, DUMMY_PASSWD, aGroup);
     }
 
-    /**
-     * DOCUMENT ME!
-     *
-     * @param aName DOCUMENT ME!
-     * @param aPassword DOCUMENT ME!
-     * @param aGroup DOCUMENT ME!
-     *
-     * @return DOCUMENT ME!
-     *
-     * @throws UserMgtException DOCUMENT ME!
-     */
     public static User createUser(String aName, String aPassword, Group aGroup)
         throws UserMgtException {
-        return new User(aName, aPassword, aGroup,
-            new RegexpNameValidator(RegexpNameValidator.PASSWORD_PATTERN,
-                Reason.INVALID_PASSWORD, "Password must be at least 6 chars"),
-            new Md5HexMessageDigester());
+        return new User(aName, aPassword, aGroup, new RegexpNameValidator(
+            RegexpNameValidator.PASSWORD_PATTERN, Reason.INVALID_PASSWORD,
+            "Password must be at least 6 chars"), new Md5HexMessageDigester());
     }
 
-    /**
-     * DOCUMENT ME!
-     *
-     * @param aUser DOCUMENT ME!
-     * @param aGroup DOCUMENT ME!
-     *
-     * @throws UserMgtException DOCUMENT ME!
-     */
     public static void addUserToGroup(User aUser, Group aGroup)
         throws UserMgtException {
         aUser.addGroup(aGroup);
     }
 
-    /**
-     * DOCUMENT ME!
-     *
-     * @param aUser DOCUMENT ME!
-     * @param aGroup DOCUMENT ME!
-     *
-     * @throws UserMgtException DOCUMENT ME!
-     */
     public static void removeUserFromGroup(User aUser, Group aGroup)
         throws UserMgtException {
         aUser.removeGroup(aGroup);