[jboss-svn-commits] JBL Code SVN: r23062 - labs/jbossrules/trunk/drools-process/drools-process-task/src/main/java/org/drools/task.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Sep 24 20:47:53 EDT 2008
Author: jervisliu
Date: 2008-09-24 20:47:53 -0400 (Wed, 24 Sep 2008)
New Revision: 23062
Modified:
labs/jbossrules/trunk/drools-process/drools-process-task/src/main/java/org/drools/task/UserProfileManager.java
Log:
Trivial update to UserProfileManager
Modified: labs/jbossrules/trunk/drools-process/drools-process-task/src/main/java/org/drools/task/UserProfileManager.java
===================================================================
--- labs/jbossrules/trunk/drools-process/drools-process-task/src/main/java/org/drools/task/UserProfileManager.java 2008-09-25 00:05:22 UTC (rev 23061)
+++ labs/jbossrules/trunk/drools-process/drools-process-task/src/main/java/org/drools/task/UserProfileManager.java 2008-09-25 00:47:53 UTC (rev 23062)
@@ -1,5 +1,7 @@
package org.drools.task;
+import java.util.List;
+
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
@@ -26,12 +28,8 @@
public class UserProfileManager {
UserProfileRepository userProfileRepository = null;
+ //get current user
public UserProfile getUserProfile() {
- if (userProfileRepository == null) {
- //TODO: throws exception?
- return null;
- }
-
String userName = "";
if (Contexts.isApplicationContextActive()) {
userName = Identity.instance().getCredentials().getUsername();
@@ -39,10 +37,33 @@
return userProfileRepository.getUserProfile(userName);
}
+ public UserProfile getUserProfile(String userName) {
+ if (userProfileRepository == null) {
+ //TODO: throws exception?
+ return null;
+ }
+
+ return userProfileRepository.getUserProfile(userName);
+ }
+
public void updateUserProfile(UserProfile info) {
}
+
+ public List<UserProfile> getUsers() {
+ //Not sure how to implement this yet. As the information of all registered users
+ //might be stored in a place different from where user profile info is stored,
+ //thus the UserProfileRepository may not be capable to do this job.
+ return null;
+ }
+ public List<Group> getGroups() {
+ //Not sure how to implement this yet. As the information of all registered groups
+ //might be stored in a place different from where user profile info is stored,
+ //thus the UserProfileRepository may not be capable to do this job.
+ return null;
+ }
+
public UserProfileRepository getUserProfileRepository() {
return userProfileRepository;
}
More information about the jboss-svn-commits
mailing list