Update of 
/var/cvs/contributions/CMSContainer/cmsc/servicemanagement/src/java/com/finalist/cmsc/services/community
In directory 
james.mmbase.org:/tmp/cvs-serv10002/cmsc/servicemanagement/src/java/com/finalist/cmsc/services/community

Modified Files:
        Community.java DummyCommunityService.java 
        CommunityService.java 
Log Message:
CMSC-617 Personal Pages module
Synced branch 1.4 fixes to head


See also: 
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/servicemanagement/src/java/com/finalist/cmsc/services/community
See also: http://www.mmbase.org/jira/browse/CMSC-617


Index: Community.java
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer/cmsc/servicemanagement/src/java/com/finalist/cmsc/services/community/Community.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- Community.java      21 Feb 2008 17:14:31 -0000      1.10
+++ Community.java      31 Mar 2008 19:48:54 -0000      1.11
@@ -47,20 +47,51 @@
       return communityService.getPreferenceValues(module, userId, key);
    }
 
-   public Map<String, Map<String,List<String>>> getPreferences(String module, 
String userId, String key, String value){
+   public static Map<String, Map<String,List<String>>> getPreferences(String 
module, String userId, String key, String value){
       return communityService.getPreferences(module, userId, key, value);
    }
 
-   public void createPreference(String module, String userId, String key, 
List<String> values){
+   public static void createPreference(String module, String userId, String 
key, List<String> values){
       communityService.createPreference(module, userId, key, values);
    }
 
-   public void removePreferences(String module, String userId, String key){
+   public static void removePreferences(String module, String userId, String 
key){
       communityService.removePreferences(module, userId, key);
    }
 
-   public Map<String, Map<String, String>> getUserProperty(String userName){
+   public static Map<String, Map<String, String>> getUserProperty(String 
userName){
       return communityService.getUserProperty(userName);
    }
 
+   /**
+    * DO NOT USE THIS METHOD. Really, <strong>DO NOT USE THIS METHOD</strong>.
+    * <br />
+    * <br />
+    * The passwords should normally be stored in an encrypted form which makes
+    * this method useless. For 4en5mei.nl the passwords are stored in plain 
text
+    * and we moved this method here instead of creating a dependency hell on 
the
+    * login-portlet. This is so we can remove this functionality easily and
+    * trade it for a way to <em>reset</em> a password rather than email the
+    * account data.
+    *
+    * @param username
+    *           The username to search for a password.
+    * @param senderName
+    *           Name used as email sender
+    * @param senderEmail
+    *           Email used as email sender
+    * @param emailSubject
+    *           The email subject
+    * @param emailBody
+    *           The email body
+    * @return <code>true</code> if a password was succesfully send to the
+    *         user, <code>false</code> otherwise.
+    *
+    * @deprecated Don't use this method, this functionality should be
+    *             implemented somewhere else.
+    */
+   public static boolean sendPassword(String username, String senderName, 
String senderEmail, String emailSubject, String emailBody) {
+      return communityService.sendPassword(username, senderName, senderEmail, 
emailSubject, emailBody);
+   }
+
 }


Index: DummyCommunityService.java
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer/cmsc/servicemanagement/src/java/com/finalist/cmsc/services/community/DummyCommunityService.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- DummyCommunityService.java  21 Feb 2008 17:14:31 -0000      1.10
+++ DummyCommunityService.java  31 Mar 2008 19:48:54 -0000      1.11
@@ -23,4 +23,5 @@
        @Override public void createPreference(String module, String userId, 
String key, List<String> values) {}
        @Override public void removePreferences(String module, String userId, 
String key) {}
        @Override public Map<String, Map<String, String>> 
getUserProperty(String userName) { return null; }
+   @Override boolean sendPassword(String email, String senderName, String 
senderEmail, String emailSubject, String emailBody) { return true; }
 }


Index: CommunityService.java
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer/cmsc/servicemanagement/src/java/com/finalist/cmsc/services/community/CommunityService.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- CommunityService.java       21 Feb 2008 17:14:31 -0000      1.11
+++ CommunityService.java       31 Mar 2008 19:48:54 -0000      1.12
@@ -7,7 +7,7 @@
 
 /**
  * CommunityService, this is a CMSc service class.
- * This class is the abstract service class that wil be used by the
+ * This class is the abstract service class that will be used by the
  * community class.
  *
  * @author menno menninga
@@ -36,4 +36,10 @@
 
    public abstract Map<String, Map<String, String>> getUserProperty(String 
userName);
 
+   /**
+    * Do not use.
+    *
+    * @see Community#sendPassword(String, String, String, String, String)
+    */
+   abstract boolean sendPassword(String username, String senderName, String 
senderEmail, String emailSubject, String emailBody);
 }
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to