Author: glandais
Date: 2008-01-22 14:09:33 +0000 (Tue, 22 Jan 2008)
New Revision: 412
Added:
trunk/simexplorer-is-security/src/test/fr/cemagref/simexplorer/is/security/test/SecurityEqualsTestCase.java
Modified:
trunk/simexplorer-is-security/src/java/META-INF/orm.xml
trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/dao/DaoSecurityImpl.java
trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/entities/Actor.java
trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/entities/Group.java
trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/entities/User.java
trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/service/AuthenticationService.java
trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/service/AuthenticationServiceImpl.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Login.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserList.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/security/ProtectedPage.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/GroupValueEncoder.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/RemoteSecurityService.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/UserValueEncoder.java
Log:
User/group edit
Logon timeout
Modified: trunk/simexplorer-is-security/src/java/META-INF/orm.xml
===================================================================
--- trunk/simexplorer-is-security/src/java/META-INF/orm.xml 2008-01-22 12:56:16 UTC (rev 411)
+++ trunk/simexplorer-is-security/src/java/META-INF/orm.xml 2008-01-22 14:09:33 UTC (rev 412)
@@ -17,7 +17,7 @@
<id name="id">
<generated-value strategy="SEQUENCE" />
</id>
- <many-to-many name="groups" target-entity="Group">
+ <many-to-many name="groups" target-entity="Group" fetch="EAGER">
<cascade>
<cascade-all />
</cascade>
Modified: trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/dao/DaoSecurityImpl.java
===================================================================
--- trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/dao/DaoSecurityImpl.java 2008-01-22 12:56:16 UTC (rev 411)
+++ trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/dao/DaoSecurityImpl.java 2008-01-22 14:09:33 UTC (rev 412)
@@ -6,6 +6,7 @@
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
+import fr.cemagref.simexplorer.is.security.entities.Actor;
import fr.cemagref.simexplorer.is.security.entities.Group;
import fr.cemagref.simexplorer.is.security.entities.LoginAction;
import fr.cemagref.simexplorer.is.security.entities.User;
@@ -102,35 +103,44 @@
}
public List<Group> getGroups() {
- return em.createQuery("select g from Group g").getResultList();
+ List<Group> groups = em.createQuery("select g from Group g")
+ .getResultList();
+ return groups;
}
public List<Group> getGroupsOwnedBy(User user) {
- return em.createQuery("select g from Group g where g.owner=:owner")
- .setParameter("owner", user).getResultList();
+ List<Group> groups = em.createQuery(
+ "select g from Group g where g.owner=:owner").setParameter(
+ "owner", user).getResultList();
+ return groups;
}
public List<User> getUsers() {
- return em.createQuery("select u from User u").getResultList();
+ List<User> users = em.createQuery("select u from User u")
+ .getResultList();
+ return users;
}
public List<User> getUsersOfGroup(Group group) {
- return em
+ List<User> users = em
.createQuery(
"select distinct u from User u where :group member of u.groups")
.setParameter("group", group).getResultList();
+ return users;
}
public List<Group> getGroupsOfUser(User user) {
- return em.createQuery(
+ List<Group> groups = em.createQuery(
"select distinct u.groups from User u where u = :user")
.setParameter("user", user).getResultList();
+ return groups;
}
public List<Group> getGroupsOfGroup(Group group) {
- return em.createQuery(
+ List<Group> groups = em.createQuery(
"select distinct g.groups from Group g where g = :group")
.setParameter("group", group).getResultList();
+ return groups;
}
}
Modified: trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/entities/Actor.java
===================================================================
--- trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/entities/Actor.java 2008-01-22 12:56:16 UTC (rev 411)
+++ trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/entities/Actor.java 2008-01-22 14:09:33 UTC (rev 412)
@@ -2,6 +2,7 @@
import java.io.Serializable;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
public class Actor implements Serializable {
@@ -31,4 +32,67 @@
this.groups = groups;
}
+ private int hashCodeGroups(List<Group> groups) {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + groups.size();
+ for (Group group : groups) {
+ result = prime * result + ((group == null) ? 0 : group.hashCode());
+ }
+ return result;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + hashCodeGroups(groups);
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ return result;
+ }
+
+ private boolean equalsGroups(List<Group> groups1, List<Group> groups2) {
+ if (groups1 == groups2)
+ return true;
+ if (groups2 == null)
+ return false;
+ if (groups1.size() != groups2.size()) {
+ return false;
+ }
+ Iterator<Group> iterator2 = groups2.iterator();
+ for (Iterator<Group> iterator1 = groups1.iterator(); iterator1
+ .hasNext();) {
+ Group group1 = iterator1.next();
+ Group group2 = iterator2.next();
+ if (group1 == null) {
+ if (group2 != null)
+ return false;
+ } else if (!group1.equals(group2))
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final Actor other = (Actor) obj;
+ if (groups == null) {
+ if (other.groups != null)
+ return false;
+ } else if (!equalsGroups(groups, other.groups))
+ return false;
+ if (id == null) {
+ if (other.id != null)
+ return false;
+ } else if (!id.equals(other.id))
+ return false;
+ return true;
+ }
+
}
Modified: trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/entities/Group.java
===================================================================
--- trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/entities/Group.java 2008-01-22 12:56:16 UTC (rev 411)
+++ trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/entities/Group.java 2008-01-22 14:09:33 UTC (rev 412)
@@ -30,8 +30,9 @@
@Override
public int hashCode() {
final int prime = 31;
- int result = 1;
- result = prime * result + ((id == null) ? 0 : id.hashCode());
+ int result = super.hashCode();
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * result + ((owner == null) ? 0 : owner.hashCode());
return result;
}
@@ -39,17 +40,22 @@
public boolean equals(Object obj) {
if (this == obj)
return true;
- if (obj == null)
+ if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
- final Actor other = (Actor) obj;
- if (id == null) {
- if (other.id != null)
+ final Group other = (Group) obj;
+ if (name == null) {
+ if (other.name != null)
return false;
- } else if (!id.equals(other.id))
+ } else if (!name.equals(other.name))
return false;
+ if (owner == null) {
+ if (other.owner != null)
+ return false;
+ } else if (!owner.equals(other.owner))
+ return false;
return true;
}
-
+
}
Modified: trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/entities/User.java
===================================================================
--- trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/entities/User.java 2008-01-22 12:56:16 UTC (rev 411)
+++ trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/entities/User.java 2008-01-22 14:09:33 UTC (rev 412)
@@ -57,8 +57,13 @@
@Override
public int hashCode() {
final int prime = 31;
- int result = 1;
- result = prime * result + ((id == null) ? 0 : id.hashCode());
+ int result = super.hashCode();
+ result = prime * result + (admin ? 1231 : 1237);
+ result = prime * result + ((login == null) ? 0 : login.hashCode());
+ result = prime * result + ((mail == null) ? 0 : mail.hashCode());
+ result = prime * result
+ + ((passwordHash == null) ? 0 : passwordHash.hashCode());
+ result = prime * result + (superAdmin ? 1231 : 1237);
return result;
}
@@ -66,17 +71,31 @@
public boolean equals(Object obj) {
if (this == obj)
return true;
- if (obj == null)
+ if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
- final Actor other = (Actor) obj;
- if (id == null) {
- if (other.id != null)
+ final User other = (User) obj;
+ if (admin != other.admin)
+ return false;
+ if (login == null) {
+ if (other.login != null)
return false;
- } else if (!id.equals(other.id))
+ } else if (!login.equals(other.login))
return false;
+ if (mail == null) {
+ if (other.mail != null)
+ return false;
+ } else if (!mail.equals(other.mail))
+ return false;
+ if (passwordHash == null) {
+ if (other.passwordHash != null)
+ return false;
+ } else if (!passwordHash.equals(other.passwordHash))
+ return false;
+ if (superAdmin != other.superAdmin)
+ return false;
return true;
}
-
+
}
Modified: trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/service/AuthenticationService.java
===================================================================
--- trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/service/AuthenticationService.java 2008-01-22 12:56:16 UTC (rev 411)
+++ trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/service/AuthenticationService.java 2008-01-22 14:09:33 UTC (rev 412)
@@ -54,6 +54,8 @@
public String loginUser(String login, String password);
+ public void closeSessionTimer(String token);
+
public User getLoggedUser(String token);
}
Modified: trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/service/AuthenticationServiceImpl.java
===================================================================
--- trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/service/AuthenticationServiceImpl.java 2008-01-22 12:56:16 UTC (rev 411)
+++ trunk/simexplorer-is-security/src/java/fr/cemagref/simexplorer/is/security/service/AuthenticationServiceImpl.java 2008-01-22 14:09:33 UTC (rev 412)
@@ -153,13 +153,16 @@
loginAction.setToken(UUID.randomUUID().toString());
dao.saveToken(loginAction);
token = loginAction.getToken();
- // FIXME session length
- TimerService timerService = sessionContext.getTimerService();
- //timerService.createTimer(10 * 60 * 1000, token);
}
return token;
}
+ public void closeSessionTimer(String token) {
+ // FIXME session length
+ TimerService timerService = sessionContext.getTimerService();
+ timerService.createTimer(10 * 60 * 1000, token);
+ }
+
@Timeout
public void timeoutHandler(Timer timer) {
String token = (String) timer.getInfo();
Added: trunk/simexplorer-is-security/src/test/fr/cemagref/simexplorer/is/security/test/SecurityEqualsTestCase.java
===================================================================
--- trunk/simexplorer-is-security/src/test/fr/cemagref/simexplorer/is/security/test/SecurityEqualsTestCase.java (rev 0)
+++ trunk/simexplorer-is-security/src/test/fr/cemagref/simexplorer/is/security/test/SecurityEqualsTestCase.java 2008-01-22 14:09:33 UTC (rev 412)
@@ -0,0 +1,42 @@
+package fr.cemagref.simexplorer.is.security.test;
+
+import java.util.Properties;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import junit.framework.TestCase;
+import fr.cemagref.simexplorer.is.security.entities.User;
+import fr.cemagref.simexplorer.is.security.service.AuthenticationService;
+
+public class SecurityEqualsTestCase extends TestCase {
+
+ AuthenticationService authenticationService = null;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ Properties properties = (Properties) System.getProperties().clone();
+ properties.put("java.naming.provider.url", "jnp://localhost:1099");
+ properties.put("java.naming.factory.initial",
+ "org.jnp.interfaces.NamingContextFactory");
+ properties.put("java.naming.factory.url.pkgs", "org.jnp.interfaces");
+
+ Context context = new InitialContext(properties);
+ authenticationService = (AuthenticationService) context
+ .lookup("AuthenticationService");
+
+ }
+
+ public void testHashCode() {
+ User[] users1 = authenticationService.getUsers();
+ User[] users2 = authenticationService.getUsers();
+ for (int i = 0; i < users1.length; i++) {
+ User user1 = users1[i];
+ User user2 = users2[i];
+ System.out.println("User " + i + " :");
+ System.out.println(user1.hashCode() + " " + user2.hashCode());
+ System.out.println(user1.equals(user2));
+ }
+ }
+
+}
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.java 2008-01-22 12:56:16 UTC (rev 411)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.java 2008-01-22 14:09:33 UTC (rev 412)
@@ -42,14 +42,14 @@
this.group = new Group();
this.group.setOwner(getUserLogged());
} else {
- this.group = RemoteSecurityService.getSecurityService().getGroup(
+ this.group = RemoteSecurityService.getAuthentificationService().getGroup(
groupId);
- User[] users = RemoteSecurityService.getSecurityService()
+ User[] users = RemoteSecurityService.getAuthentificationService()
.getUsersOfGroup(group);
this.usersInGroup.addAll(Arrays.asList(users));
- Group[] groups = RemoteSecurityService.getSecurityService()
+ Group[] groups = RemoteSecurityService.getAuthentificationService()
.getGroupsOfGroup(group);
this.groupsInGroup.addAll(Arrays.asList(groups));
}
@@ -57,10 +57,10 @@
public Object onSuccess() throws Exception {
if (group.getId() == null) {
- group = RemoteSecurityService.getSecurityService().saveGroup(
+ group = RemoteSecurityService.getAuthentificationService().saveGroup(
group.getName(), getUserLogged());
} else {
- group = RemoteSecurityService.getSecurityService().updateGroup(
+ group = RemoteSecurityService.getAuthentificationService().updateGroup(
group);
}
@@ -70,7 +70,7 @@
usersIds[i] = user.getId();
i++;
}
- RemoteSecurityService.getSecurityService().setUsersOfGroup(group,
+ RemoteSecurityService.getAuthentificationService().setUsersOfGroup(group,
usersIds);
Integer[] groupsIds = new Integer[groupsInGroup.size()];
@@ -79,7 +79,7 @@
groupsIds[i] = group.getId();
i++;
}
- RemoteSecurityService.getSecurityService().setGroupsOfGroup(group,
+ RemoteSecurityService.getAuthentificationService().setGroupsOfGroup(group,
groupsIds);
return groupList;
@@ -90,14 +90,14 @@
}
public List<User> getUsers() throws Exception {
- User[] users = RemoteSecurityService.getSecurityService().getUsers();
+ User[] users = RemoteSecurityService.getAuthentificationService().getUsers();
List<User> result = new ArrayList<User>();
result.addAll(Arrays.asList(users));
return result;
}
public List<Group> getGroups() throws Exception {
- Group[] groups = RemoteSecurityService.getSecurityService().getGroups();
+ Group[] groups = RemoteSecurityService.getAuthentificationService().getGroups();
List<Group> result = new ArrayList<Group>();
result.addAll(Arrays.asList(groups));
return result;
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.java 2008-01-22 12:56:16 UTC (rev 411)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.java 2008-01-22 14:09:33 UTC (rev 412)
@@ -47,16 +47,16 @@
public Group[] getGroups() throws Exception {
Group[] groups;
if (isUserSuperAdmin()) {
- groups = RemoteSecurityService.getSecurityService().getGroups();
+ groups = RemoteSecurityService.getAuthentificationService().getGroups();
} else {
- groups = RemoteSecurityService.getSecurityService()
+ groups = RemoteSecurityService.getAuthentificationService()
.getGroupsOwnedBy(getUserLogged());
}
return groups;
}
public Object onActionFromDelete(Integer context) throws Exception {
- RemoteSecurityService.getSecurityService().deleteGroup(context);
+ RemoteSecurityService.getAuthentificationService().deleteGroup(context);
return null;
}
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Login.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Login.java 2008-01-22 12:56:16 UTC (rev 411)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Login.java 2008-01-22 14:09:33 UTC (rev 412)
@@ -21,9 +21,10 @@
public Object onSuccess() throws Exception {
Object result = null;
- token = RemoteSecurityService.getSecurityService().loginUser(user,
+ token = RemoteSecurityService.getAuthentificationService().loginUser(user,
password);
if (token != null) {
+ RemoteSecurityService.getAuthentificationService().closeSessionTimer(token);
result = elementList;
}
return result;
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.java 2008-01-22 12:56:16 UTC (rev 411)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.java 2008-01-22 14:09:33 UTC (rev 412)
@@ -32,9 +32,9 @@
if (groupId == -1) {
this.user = new User();
} else {
- this.user = RemoteSecurityService.getSecurityService().getUser(
+ this.user = RemoteSecurityService.getAuthentificationService().getUser(
groupId);
- Group[] groups = RemoteSecurityService.getSecurityService()
+ Group[] groups = RemoteSecurityService.getAuthentificationService()
.getGroupsOfUser(this.user);
groupsOfUser.addAll(Arrays.asList(groups));
}
@@ -43,10 +43,10 @@
public Object onSuccess() throws Exception {
if (user.getId() == null) {
- user = RemoteSecurityService.getSecurityService().saveUser(
+ user = RemoteSecurityService.getAuthentificationService().saveUser(
user.getLogin(), user.getMail());
} else {
- user = RemoteSecurityService.getSecurityService().updateUser(user);
+ user = RemoteSecurityService.getAuthentificationService().updateUser(user);
}
Integer[] groupsIds = new Integer[groupsOfUser.size()];
@@ -55,14 +55,14 @@
groupsIds[i] = group.getId();
i++;
}
- RemoteSecurityService.getSecurityService().setGroupsOfUser(user,
+ RemoteSecurityService.getAuthentificationService().setGroupsOfUser(user,
groupsIds);
return userList;
}
public List<Group> getGroups() throws Exception {
- Group[] groups = RemoteSecurityService.getSecurityService().getGroups();
+ Group[] groups = RemoteSecurityService.getAuthentificationService().getGroups();
List<Group> result = new ArrayList<Group>();
result.addAll(Arrays.asList(groups));
return result;
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserList.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserList.java 2008-01-22 12:56:16 UTC (rev 411)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserList.java 2008-01-22 14:09:33 UTC (rev 412)
@@ -50,12 +50,12 @@
public User[] getUsers() throws Exception {
User[] users;
- users = RemoteSecurityService.getSecurityService().getUsers();
+ users = RemoteSecurityService.getAuthentificationService().getUsers();
return users;
}
public Object onActionFromDelete(Integer context) throws Exception {
- RemoteSecurityService.getSecurityService().deleteUser(context);
+ RemoteSecurityService.getAuthentificationService().deleteUser(context);
return null;
}
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/security/ProtectedPage.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/security/ProtectedPage.java 2008-01-22 12:56:16 UTC (rev 411)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/security/ProtectedPage.java 2008-01-22 14:09:33 UTC (rev 412)
@@ -21,7 +21,7 @@
User loggedUser = null;
if (token != null) {
try {
- loggedUser = RemoteSecurityService.getSecurityService().getLoggedUser(
+ loggedUser = RemoteSecurityService.getAuthentificationService().getLoggedUser(
token);
} catch (Exception e) {
// TODO: handle exception
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/GroupValueEncoder.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/GroupValueEncoder.java 2008-01-22 12:56:16 UTC (rev 411)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/GroupValueEncoder.java 2008-01-22 14:09:33 UTC (rev 412)
@@ -13,7 +13,7 @@
public Group toValue(String arg0) {
Group group = null;
try {
- group = RemoteSecurityService.getSecurityService().getGroup(Integer.decode(arg0));
+ group = RemoteSecurityService.getAuthentificationService().getGroup(Integer.decode(arg0));
} catch (Exception e) {
// TODO: handle exception
}
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/RemoteSecurityService.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/RemoteSecurityService.java 2008-01-22 12:56:16 UTC (rev 411)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/RemoteSecurityService.java 2008-01-22 14:09:33 UTC (rev 412)
@@ -4,7 +4,8 @@
public class RemoteSecurityService extends RemoteService {
- public static AuthenticationService getSecurityService() throws Exception {
+ public static AuthenticationService getAuthentificationService()
+ throws Exception {
return (AuthenticationService) getService("AuthenticationService");
}
}
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/UserValueEncoder.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/UserValueEncoder.java 2008-01-22 12:56:16 UTC (rev 411)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/UserValueEncoder.java 2008-01-22 14:09:33 UTC (rev 412)
@@ -13,7 +13,7 @@
public User toValue(String arg0) {
User user = null;
try {
- user = RemoteSecurityService.getSecurityService().getUser(
+ user = RemoteSecurityService.getAuthentificationService().getUser(
Integer.decode(arg0));
} catch (Exception e) {
// TODO: handle exception