You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by eg...@apache.org on 2003/07/17 13:01:19 UTC
cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/ac LDAPUser.java User.java
egli 2003/07/17 04:01:18
Modified: src/test/org/apache/lenya/cms/ac FileUserTest.java
src/java/org/apache/lenya/cms/ac LDAPUser.java User.java
Log:
Since getFullName simply returns getName() the getFullName
method has been deprecated in favour of the getName method.
This of course implies changes in the LDAPUser where
getFullname was overwritten and in the unit test cases.
Revision Changes Path
1.10 +5 -5 cocoon-lenya/src/test/org/apache/lenya/cms/ac/FileUserTest.java
Index: FileUserTest.java
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/test/org/apache/lenya/cms/ac/FileUserTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- FileUserTest.java 8 Jul 2003 11:58:14 -0000 1.9
+++ FileUserTest.java 17 Jul 2003 11:01:18 -0000 1.10
@@ -233,12 +233,12 @@
* @throws AccessControlException if an error occurs
*/
final public void testGetFullName() throws AccessControlException {
- String userName = "alice";
- String fullName = "Alice Wonderland";
- FileUser user = createAndSaveUser(userName, fullName, "alice@wonderland.org", "secret");
- assertTrue(user.getFullName().equals(fullName));
+ String userID = "alice";
+ String userName = "Alice Wonderland";
+ FileUser user = createAndSaveUser(userID, userName, "alice@wonderland.org", "secret");
+ assertTrue(user.getName().equals(userName));
user = loadUser(userName);
- assertTrue(user.getFullName().equals(fullName));
+ assertTrue(user.getName().equals(userName));
}
/**
1.10 +6 -7 cocoon-lenya/src/java/org/apache/lenya/cms/ac/LDAPUser.java
Index: LDAPUser.java
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/ac/LDAPUser.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- LDAPUser.java 30 Jun 2003 10:34:05 -0000 1.9
+++ LDAPUser.java 17 Jul 2003 11:01:18 -0000 1.10
@@ -196,9 +196,9 @@
}
/** (non-Javadoc)
- * @see org.apache.lenya.cms.ac.User#getFullName()
+ * @see org.apache.lenya.cms.ac.User#getName()
*/
- public String getFullName() {
+ public String getName() {
String fullName = null;
LdapContext ctx;
@@ -232,16 +232,15 @@
}
/**
- * LDAP Users fetch their full name information from the LDAP server,
+ * LDAP Users fetch their name information from the LDAP server,
* so we don't store it locally. Since we only have read access we basically
- * can't set the full name, i.e. any request to change the full name
- * is ignored.
+ * can't set the name, i.e. any request to change the name is ignored.
*
* @param string is ignored
*/
- public void setFullName(String string) {
+ public void setName(String string) {
// we do not have write access to LDAP, so we ignore
- // change request to the full name.
+ // change request to the name.
}
/**
1.20 +2 -1 cocoon-lenya/src/java/org/apache/lenya/cms/ac/User.java
Index: User.java
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/ac/User.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- User.java 7 Jul 2003 09:44:48 -0000 1.19
+++ User.java 17 Jul 2003 11:01:18 -0000 1.20
@@ -1,5 +1,5 @@
/*
-$Id
+$Id$
<License>
============================================================================
@@ -108,6 +108,7 @@
* Get the full name
*
* @return a <code>String</code>
+ * @deprecated has been superceded by getName()
*/
public String getFullName() {
return getName();
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org