Improvet doc
authorMathieu Baudier <mbaudier@argeo.org>
Sun, 26 Jun 2011 22:03:48 +0000 (22:03 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Sun, 26 Jun 2011 22:03:48 +0000 (22:03 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@4613 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

security/runtime/org.argeo.security.core/src/main/java/org/argeo/security/jcr/JcrUserDetails.java
server/modules/org.argeo.server.catalina/META-INF/MANIFEST.MF

index f7d016cf40cbd1983400c83adbd301e344a3d81e..11e463d349a7a7f86cf30d953e0636ef342ea8db 100644 (file)
@@ -7,6 +7,7 @@ import org.springframework.security.GrantedAuthority;
 import org.springframework.security.GrantedAuthorityImpl;
 import org.springframework.security.userdetails.User;
 
+/** User details wrapping a home node. */
 public class JcrUserDetails extends User {
        private static final long serialVersionUID = -3594542993773402380L;
        private final String homePath;
@@ -20,10 +21,7 @@ public class JcrUserDetails extends User {
                this.homePath = homePath;
        }
 
-       public String getHomePath() {
-               return homePath;
-       }
-
+       /** Clone immutable with new roles */
        public JcrUserDetails cloneWithNewRoles(List<String> roles) {
                List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>();
                for (String role : roles) {
@@ -35,9 +33,15 @@ public class JcrUserDetails extends User {
                                authorities.toArray(new GrantedAuthority[authorities.size()]));
        }
 
+       /** Clone immutable with new password */
        public JcrUserDetails cloneWithNewPassword(String password) {
                return new JcrUserDetails(homePath, getUsername(), password,
                                isEnabled(), isAccountNonExpired(), isAccountNonExpired(),
                                isAccountNonLocked(), getAuthorities());
        }
+
+       public String getHomePath() {
+               return homePath;
+       }
+
 }
index bd4be302e941856bf854d0f672f626d42e2eb81c..4b05e6e7afb1f429f0ad5b46e070b1d917f1d516 100644 (file)
@@ -5,7 +5,7 @@ Bundle-Version: 0.3.3.SNAPSHOT
 Bundle-SymbolicName: org.argeo.server.catalina
 Import-Package: org.apache.commons.logging.impl;resolution:=optional,
  org.argeo.security.core;resolution:=optional,
- org.argeo.security.nature;resolution:=optional,
+ org.argeo.security.jcr;resolution:=optional,
  org.springframework.beans.factory.support;resolution:=optional,
  org.springframework.context.annotation;resolution:=optional,
  org.springframework.orm.jpa.support;resolution:=optional,