[jboss-svn-commits] JBL Code SVN: r38332 - in labs/jbossforums/branches/noejbforums130P27: authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal and 4 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri May 24 15:48:50 EDT 2013
Author: sviluppatorefico
Date: 2013-05-24 15:48:50 -0400 (Fri, 24 May 2013)
New Revision: 38332
Added:
labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/RolePortal.java
labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/UserPortal.java
labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/MembershipModulePL.java
labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/RolePL.java
labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserModulePL.java
labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserPL.java
labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/acl-permissions.xml
labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/RolePortal.java
labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/UserPortal.java
labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/MembershipModulePL.java
labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/RolePL.java
labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserModulePL.java
labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserPL.java
labs/jbossforums/branches/noejbforums130P27/readme.txt
Removed:
labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/RolePortal.java
labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/UserPortal.java
labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/MembershipModulePL.java
labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/RolePL.java
labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserModulePL.java
labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserPL.java
labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/acl-permissions.xml
labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/RolePortal.java
labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/UserPortal.java
labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/MembershipModulePL.java
labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/RolePL.java
labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserModulePL.java
labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserPL.java
Log:
Ended the picketlink integration
Deleted: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/RolePortal.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/RolePortal.java 2013-05-24 19:47:25 UTC (rev 38331)
+++ labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/RolePortal.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -1,31 +0,0 @@
-package org.jboss.forums.security.jbportal;
-
-import org.jboss.portal.identity.Role;
-
-public class RolePortal implements Role {
-
- @Override
- public String getDisplayName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public Object getId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public String getName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public void setDisplayName(String arg0) {
- // TODO Auto-generated method stub
-
- }
-
-}
Added: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/RolePortal.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/RolePortal.java (rev 0)
+++ labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/RolePortal.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -0,0 +1,41 @@
+package org.jboss.forums.security.jbportal;
+
+import org.jboss.portal.identity.Role;
+
+public class RolePortal implements Role {
+
+ private String displayName;
+ private Object id;
+ private String name;
+
+ public RolePortal(Role group) {
+ displayName = group.getDisplayName();
+ id = group.getId();
+ name = group.getName();
+ }
+
+ @Override
+ public String getDisplayName() {
+ // TODO Auto-generated method stub
+ return displayName;
+ }
+
+ @Override
+ public Object getId() {
+ // TODO Auto-generated method stub
+ return id;
+ }
+
+ @Override
+ public String getName() {
+ // TODO Auto-generated method stub
+ return name;
+ }
+
+ @Override
+ public void setDisplayName(String arg0) {
+ // TODO Auto-generated method stub
+ this.displayName = arg0;
+ }
+
+}
Property changes on: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/RolePortal.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/UserPortal.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/UserPortal.java 2013-05-24 19:47:25 UTC (rev 38331)
+++ labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/UserPortal.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -1,36 +0,0 @@
-package org.jboss.forums.security.jbportal;
-
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.User;
-
-public class UserPortal implements User {
-
- public UserPortal(User user) {
-
- }
-
- @Override
- public Object getId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public String getUserName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public void updatePassword(String arg0) throws IdentityException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public boolean validatePassword(String arg0) {
- // TODO Auto-generated method stub
- return false;
- }
-
-}
Added: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/UserPortal.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/UserPortal.java (rev 0)
+++ labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/UserPortal.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -0,0 +1,40 @@
+package org.jboss.forums.security.jbportal;
+
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.User;
+
+public class UserPortal implements User {
+
+ private Object id;
+ private String userName;
+
+ public UserPortal(User user) {
+ id = user.getId();
+ userName = user.getUserName();
+ }
+
+ @Override
+ public Object getId() {
+ // TODO Auto-generated method stub
+ return id;
+ }
+
+ @Override
+ public String getUserName() {
+ // TODO Auto-generated method stub
+ return userName;
+ }
+
+ @Override
+ public void updatePassword(String arg0) throws IdentityException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public boolean validatePassword(String arg0) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
Property changes on: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/jbportal/UserPortal.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/MembershipModulePL.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/MembershipModulePL.java 2013-05-24 19:47:25 UTC (rev 38331)
+++ labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/MembershipModulePL.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -1,93 +0,0 @@
-package org.jboss.forums.security.picketlink;
-
-import java.util.Set;
-
-import javax.naming.InitialContext;
-
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.MembershipModule;
-import org.jboss.portal.identity.Role;
-import org.jboss.portal.identity.User;
-import org.picketlink.idm.api.IdentitySession;
-import org.picketlink.idm.api.IdentitySessionFactory;
-import org.picketlink.idm.api.RelationshipManager;
-
-public class MembershipModulePL implements MembershipModule {
-
- private RelationshipManager relationshipManager;
-
- private static MembershipModule currentInstance;
-
- public MembershipModulePL() throws Exception {
- IdentitySessionFactory identitySessionFactory = (IdentitySessionFactory) new InitialContext()
- .lookup("java:/IdentitySessionFactory");
- IdentitySession identitySession = identitySessionFactory
- .createIdentitySession("idm_realm");
- relationshipManager = identitySession.getRelationshipManager();
- }
-
- static public MembershipModule getInstance() throws Exception {
- if (currentInstance == null)
- currentInstance = new MembershipModulePL();
-
- return currentInstance;
- }
-
- @Override
- public void assignRoles(User arg0, Set arg1) throws IdentityException,
- IllegalArgumentException {
- try {
- relationshipManager.associateUsersByKeys(arg0.getUserName(), arg1);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- }
-
- @Override
- public void assignUsers(Role arg0, Set arg1) throws IdentityException,
- IllegalArgumentException {
- try {
- relationshipManager.associateGroupsByKeys(arg0.getName(), arg1);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
-
- }
-
- @Override
- public Set findRoleMembers(String arg0, int arg1, int arg2, String arg3)
- throws IdentityException, IllegalArgumentException {
- Set roleMembers = null;
- try {
- relationshipManager.findRelatedGroups(arg0, "", null);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return roleMembers;
- }
-
- @Override
- public Set getRoles(User arg0) throws IdentityException,
- IllegalArgumentException {
- Set roles = null;
- try {
- relationshipManager.findAssociatedGroups(arg0.getUserName(), null);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return roles;
- }
-
- @Override
- public Set getUsers(Role arg0) throws IdentityException,
- IllegalArgumentException {
- Set users = null;
- try {
- relationshipManager.findAssociatedUsers(arg0.getName(), true, null);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return users;
- }
-
-}
Added: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/MembershipModulePL.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/MembershipModulePL.java (rev 0)
+++ labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/MembershipModulePL.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -0,0 +1,103 @@
+package org.jboss.forums.security.picketlink;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.naming.InitialContext;
+
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.MembershipModule;
+import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.User;
+import org.picketlink.idm.api.IdentitySession;
+import org.picketlink.idm.api.IdentitySessionFactory;
+import org.picketlink.idm.api.RelationshipManager;
+
+public class MembershipModulePL implements MembershipModule {
+
+ private RelationshipManager relationshipManager;
+
+ private static MembershipModule currentInstance;
+
+ public MembershipModulePL() throws Exception {
+ IdentitySessionFactory identitySessionFactory = (IdentitySessionFactory) new InitialContext().lookup("java:/IdentitySessionFactory");
+ IdentitySession identitySession = identitySessionFactory.createIdentitySession("idm_realm");
+ relationshipManager = identitySession.getRelationshipManager();
+ }
+
+ static public MembershipModule getInstance() throws Exception {
+ if (currentInstance == null)
+ currentInstance = new MembershipModulePL();
+
+ return currentInstance;
+ }
+
+ @Override
+ public void assignRoles(User arg0, Set arg1) throws IdentityException, IllegalArgumentException {
+ try {
+ relationshipManager.associateUsersByKeys(arg0.getUserName(), arg1);
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ @Override
+ public void assignUsers(Role arg0, Set arg1) throws IdentityException, IllegalArgumentException {
+ try {
+ relationshipManager.associateGroupsByKeys(arg0.getName(), arg1);
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+
+ }
+
+ @Override
+ public Set findRoleMembers(String arg0, int arg1, int arg2, String arg3) throws IdentityException, IllegalArgumentException {
+ Set roleMembers = null;
+ try {
+ Collection<org.picketlink.idm.api.Group> groups = relationshipManager.findRelatedGroups(arg0, "", null);
+ if (groups != null && groups.size() > 0) {
+ roleMembers = new HashSet<RolePL>();
+ for (org.picketlink.idm.api.Group group : groups)
+ roleMembers.add(new RolePL(group));
+ }
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return roleMembers;
+ }
+
+ @Override
+ public Set getRoles(User arg0) throws IdentityException, IllegalArgumentException {
+ Set roles = null;
+ try {
+ Collection<org.picketlink.idm.api.Group> groups = relationshipManager.findAssociatedGroups(arg0.getUserName(), null);
+ if (groups != null && groups.size() > 0) {
+ roles = new HashSet<RolePL>();
+ for (org.picketlink.idm.api.Group group : groups)
+ roles.add(new RolePL(group));
+ }
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return roles;
+ }
+
+ @Override
+ public Set getUsers(Role arg0) throws IdentityException, IllegalArgumentException {
+ Set users = null;
+ try {
+ Collection<org.picketlink.idm.api.User> plusers = relationshipManager.findAssociatedUsers(arg0.getName(), true, null);
+ if (plusers != null && plusers.size() > 0) {
+ users = new HashSet<UserPL>();
+ for (org.picketlink.idm.api.User user : plusers)
+ users.add(new UserPL(user));
+ }
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return users;
+ }
+
+}
Property changes on: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/MembershipModulePL.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/RolePL.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/RolePL.java 2013-05-24 19:47:25 UTC (rev 38331)
+++ labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/RolePL.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -1,31 +0,0 @@
-package org.jboss.forums.security.picketlink;
-
-import org.jboss.portal.identity.Role;
-
-public class RolePL implements Role {
-
- @Override
- public String getDisplayName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public Object getId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public String getName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public void setDisplayName(String arg0) {
- // TODO Auto-generated method stub
-
- }
-
-}
Added: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/RolePL.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/RolePL.java (rev 0)
+++ labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/RolePL.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -0,0 +1,41 @@
+package org.jboss.forums.security.picketlink;
+
+import org.jboss.portal.identity.Role;
+
+public class RolePL implements Role {
+
+ private String displayName;
+ private Object id;
+ private String name;
+
+ public RolePL(org.picketlink.idm.api.Group group) {
+ displayName = group.getName();
+ id = group.getKey();
+ name = group.getName();
+ }
+
+ @Override
+ public String getDisplayName() {
+ // TODO Auto-generated method stub
+ return displayName;
+ }
+
+ @Override
+ public Object getId() {
+ // TODO Auto-generated method stub
+ return id;
+ }
+
+ @Override
+ public String getName() {
+ // TODO Auto-generated method stub
+ return name;
+ }
+
+ @Override
+ public void setDisplayName(String arg0) {
+ // TODO Auto-generated method stub
+ this.displayName = arg0;
+ }
+
+}
Property changes on: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/RolePL.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserModulePL.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserModulePL.java 2013-05-24 19:47:25 UTC (rev 38331)
+++ labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserModulePL.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -1,137 +0,0 @@
-package org.jboss.forums.security.picketlink;
-
-import java.util.Set;
-
-import javax.naming.InitialContext;
-
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.NoSuchUserException;
-import org.jboss.portal.identity.User;
-import org.jboss.portal.identity.UserModule;
-import org.picketlink.idm.api.IdentitySearchCriteria;
-import org.picketlink.idm.api.IdentitySession;
-import org.picketlink.idm.api.IdentitySessionFactory;
-import org.picketlink.idm.api.PersistenceManager;
-
-public class UserModulePL implements UserModule {
-
- private PersistenceManager persistenceManager;
-
- private static UserModule currentInstance;
-
- private UserModulePL() throws Exception {
- IdentitySessionFactory identitySessionFactory = (IdentitySessionFactory) new InitialContext()
- .lookup("java:/IdentitySessionFactory");
- IdentitySession identitySession = identitySessionFactory
- .createIdentitySession("idm_realm");
- persistenceManager = identitySession.getPersistenceManager();
- }
-
- static public UserModule getInstance() throws Exception {
- if (currentInstance == null)
- currentInstance = new UserModulePL();
-
- return currentInstance;
- }
-
- @Override
- public User createUser(String arg0, String arg1) throws IdentityException,
- IllegalArgumentException {
- User user = null;
- try {
- user = new UserPL(persistenceManager.createUser(arg0));
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return user;
- }
-
- @Override
- public User findUserById(Object arg0) throws IdentityException,
- IllegalArgumentException, NoSuchUserException {
- User user = null;
- try {
- user = new UserPL(persistenceManager.findUser((String) arg0));
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return user;
- }
-
- @Override
- public User findUserById(String arg0) throws IdentityException,
- IllegalArgumentException, NoSuchUserException {
- User user = null;
- try {
- user = new UserPL(persistenceManager.findUser(arg0));
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return user;
- }
-
- @Override
- public User findUserByUserName(String arg0) throws IdentityException,
- IllegalArgumentException, NoSuchUserException {
- IdentitySearchCriteria identitySearchCriteria = null;
- User user = null;
- try {
- user = new UserPL((org.picketlink.idm.api.User) persistenceManager
- .findUser(identitySearchCriteria).toArray()[0]);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return user;
- }
-
- @Override
- public Set findUsers(int arg0, int arg1) throws IdentityException,
- IllegalArgumentException {
- IdentitySearchCriteria identitySearchCriteria = null;
- Set users = null;
- try {
- persistenceManager.findUser(identitySearchCriteria);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return users;
- }
-
- @Override
- public Set findUsersFilteredByUserName(String arg0, int arg1, int arg2)
- throws IdentityException, IllegalArgumentException {
- IdentitySearchCriteria identitySearchCriteria = null;
- Set users = null;
- try {
- persistenceManager.findUser(identitySearchCriteria);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return users;
- }
-
- @Override
- public int getUserCount() throws IdentityException,
- IllegalArgumentException {
- int count = 0;
- try {
- count = persistenceManager.getUserCount();
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return count;
- }
-
- @Override
- public void removeUser(Object arg0) throws IdentityException,
- IllegalArgumentException {
- try {
- persistenceManager.removeUser(
- persistenceManager.findUser((String) arg0), true);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
-
- }
-
-}
Added: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserModulePL.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserModulePL.java (rev 0)
+++ labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserModulePL.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -0,0 +1,150 @@
+package org.jboss.forums.security.picketlink;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.naming.InitialContext;
+
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.NoSuchUserException;
+import org.jboss.portal.identity.User;
+import org.jboss.portal.identity.UserModule;
+import org.picketlink.idm.api.IdentitySearchCriteria;
+import org.picketlink.idm.api.IdentitySession;
+import org.picketlink.idm.api.IdentitySessionFactory;
+import org.picketlink.idm.api.PersistenceManager;
+import org.picketlink.idm.api.UnsupportedCriterium;
+import org.picketlink.idm.impl.api.IdentitySearchCriteriaImpl;
+
+public class UserModulePL implements UserModule {
+
+ private PersistenceManager persistenceManager;
+
+ private static UserModule currentInstance;
+
+ private UserModulePL() throws Exception {
+ IdentitySessionFactory identitySessionFactory = (IdentitySessionFactory) new InitialContext()
+ .lookup("java:/IdentitySessionFactory");
+ IdentitySession identitySession = identitySessionFactory
+ .createIdentitySession("idm_realm");
+ persistenceManager = identitySession.getPersistenceManager();
+ }
+
+ static public UserModule getInstance() throws Exception {
+ if (currentInstance == null)
+ currentInstance = new UserModulePL();
+
+ return currentInstance;
+ }
+
+ @Override
+ public User createUser(String arg0, String arg1) throws IdentityException,
+ IllegalArgumentException {
+ User user = null;
+ try {
+ user = new UserPL(persistenceManager.createUser(arg0));
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return user;
+ }
+
+ @Override
+ public User findUserById(Object arg0) throws IdentityException,
+ IllegalArgumentException, NoSuchUserException {
+ User user = null;
+ try {
+ user = new UserPL(persistenceManager.findUser((String) arg0));
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return user;
+ }
+
+ @Override
+ public User findUserById(String arg0) throws IdentityException,
+ IllegalArgumentException, NoSuchUserException {
+ User user = null;
+ try {
+ user = new UserPL(persistenceManager.findUser(arg0));
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return user;
+ }
+
+ @Override
+ public User findUserByUserName(String arg0) throws IdentityException,
+ IllegalArgumentException, NoSuchUserException {
+ IdentitySearchCriteria identitySearchCriteria = new IdentitySearchCriteriaImpl();
+ User user = null;
+ try {
+ identitySearchCriteria.nameFilter(arg0);
+ user = new UserPL((org.picketlink.idm.api.User) persistenceManager.findUser(identitySearchCriteria).toArray()[0]);
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ } catch (UnsupportedCriterium e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return user;
+ }
+
+ @Override
+ public Set findUsers(int arg0, int arg1) throws IdentityException,
+ IllegalArgumentException {
+ IdentitySearchCriteria identitySearchCriteria = null;
+ Set users = null;
+ try {
+ Collection<org.picketlink.idm.api.User> plusers = persistenceManager.findUser(identitySearchCriteria);
+ if (plusers != null && plusers.size() > 0) {
+ users = new HashSet<org.picketlink.idm.api.User>(plusers);
+ }
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return users;
+ }
+
+ @Override
+ public Set findUsersFilteredByUserName(String arg0, int arg1, int arg2)
+ throws IdentityException, IllegalArgumentException {
+ IdentitySearchCriteria identitySearchCriteria = null;
+ Set users = null;
+ try {
+ Collection<org.picketlink.idm.api.User> plusers = persistenceManager.findUser(identitySearchCriteria);
+ if (plusers != null && plusers.size() > 0) {
+ users = new HashSet<org.picketlink.idm.api.User>(plusers);
+ }
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return users;
+ }
+
+ @Override
+ public int getUserCount() throws IdentityException,
+ IllegalArgumentException {
+ int count = 0;
+ try {
+ count = persistenceManager.getUserCount();
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return count;
+ }
+
+ @Override
+ public void removeUser(Object arg0) throws IdentityException,
+ IllegalArgumentException {
+ try {
+ persistenceManager.removeUser(
+ persistenceManager.findUser((String) arg0), true);
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+
+ }
+
+}
Property changes on: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserModulePL.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserPL.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserPL.java 2013-05-24 19:47:25 UTC (rev 38331)
+++ labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserPL.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -1,36 +0,0 @@
-package org.jboss.forums.security.picketlink;
-
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.User;
-
-public class UserPL implements User {
-
- public UserPL(org.picketlink.idm.api.User user) {
-
- }
-
- @Override
- public Object getId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public String getUserName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public void updatePassword(String arg0) throws IdentityException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public boolean validatePassword(String arg0) {
- // TODO Auto-generated method stub
- return false;
- }
-
-}
Added: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserPL.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserPL.java (rev 0)
+++ labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserPL.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -0,0 +1,40 @@
+package org.jboss.forums.security.picketlink;
+
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.User;
+
+public class UserPL implements User {
+
+ private String id;
+ private String userName;
+
+ public UserPL(org.picketlink.idm.api.User user) {
+ id = user.getId();
+ userName = user.getKey();
+ }
+
+ @Override
+ public Object getId() {
+ // TODO Auto-generated method stub
+ return id;
+ }
+
+ @Override
+ public String getUserName() {
+ // TODO Auto-generated method stub
+ return userName;
+ }
+
+ @Override
+ public void updatePassword(String arg0) throws IdentityException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public boolean validatePassword(String arg0) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
Property changes on: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/main/org/jboss/forums/security/picketlink/UserPL.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/acl-permissions.xml
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/acl-permissions.xml 2013-05-24 19:47:25 UTC (rev 38331)
+++ labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/acl-permissions.xml 2013-05-24 19:48:50 UTC (rev 38332)
@@ -1,124 +0,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!--
- Each role contains a set of permissions. Each permission/no-permission points to a function in the system that this role has/doesnot have access to.
- -->
-
-<acl>
- <!-- dynamic roles/permissions defined for the application at runtime (either through the GUI or directly modifying this xml file) -->
- <!--
- Sample permission =
- <permission functionId="editCategory"/> //plain without criteria
-
- <permission functionId="editCategory"> //complicated with criteria specification
- <criteria context="jsfAction">target.categoryName.indexOf('sandbox') != -1</criteria>
- <criteria context="fragment">param[0].categoryName.toLowerCase().indexOf('sandbox') != -1</criteria>
- </permission>
- -->
-
- <!--
- built-in system defined roles
- -->
- <!-- non-logged in users -->
- <role name="Anonymous" id="anonymous">
- <!-- Forums Admin Tool permissions -->
-
-
- <!-- Message Board permissions -->
- <!-- giving anonymous users permission to view only the Unit Testing Category of Forums -->
- <!--permission action="readCategory">
- <criteria for="readCategory://ui">param[0].title.toLowerCase().startsWith('unit testing')</criteria>
- </permission-->
- <permission action="readForum"/>
-
-
- <!-- Moderator Tool permissions -->
- </role>
-
- <!-- just a regular registered user -->
- <role name="User" id="user">
- <!-- Forums Admin Tool permissions -->
-
- <!-- Message Board permissions -->
- <permission action="readForum"/>
- <permission action="post"/>
- <!-- permission to edit only my own posts -->
- <permission action="editPost">
- <criteria for="editPost://ui">param[0].poster.user.userName.equals(identity.identity.userName)</criteria>
- <criteria for="editPost://action">target.post.poster.user.userName.equals(identity.identity.userName)</criteria>
- </permission>
-
-
- <!-- Moderator Tool permissions -->
- </role>
-
- <!-- users with Admin privileges -->
- <role name="Admin" id="admin">
- <!-- Forums Admin Tool permissions -->
-
-
- <!-- Message Board permissions -->
-
-
-
- <!-- Moderator Tool permissions -->
-
- <!-- wild card permission -->
- <permission action="all"/>
- </role>
-
- <!--
- deployment specific roles......just examples of how fine grained permissions can be assigned
- this is an example of how the rules would possibly setup for JBoss.org Forums...
- These policy rules vary for each consumer of forums depending on their own requirements of
- access control security
- -->
-
- <!-- permissions specific to the Drools Team -->
- <role name="Drools Team" id="droolsTeam">
- <!-- Forums Admin Tool permissions -->
- <permission action="viewCategory">
- <criteria for="viewCategory://ui">param[0].title.toLowerCase().startsWith('jboss rules')</criteria>
- </permission>
- <permission action="deleteCategory">
- <criteria for="deleteCategory://action">target.categoryName.toLowerCase().startsWith('jboss rules')</criteria>
- <!-- also criteria for the implied edit category permission -->
- <criteria for="editCategory://action">target.categoryName.toLowerCase().startsWith('jboss rules')</criteria>
- </permission>
- <permission action="viewForum">
- <criteria for="viewForum://ui">param[0].name.toLowerCase().startsWith('jboss rules')</criteria>
- </permission>
- <permission action="deleteForum">
- <criteria for="deleteForum://action">target.forumName.toLowerCase().startsWith('jboss rules')</criteria>
- <!-- also criteria for the implied edit category permission -->
- <criteria for="editForum://action">target.forumName.toLowerCase().startsWith('jboss rules')</criteria>
- </permission>
-
- <!-- Message Board permissions -->
- <permission action="readCategory">
- <criteria for="readCategory://ui">param[0].title.toLowerCase().startsWith('jboss rules')</criteria>
- </permission>
- <permission action="readForum"/>
-
-
- <!-- Moderator Tool permissions -->
- </role>
-
- <!-- permissions specific to the JBPM Team -->
- <role name="JBPM Team" id="jbpmTeam">
- <!-- Forums Admin Tool permissions -->
-
- <!-- Message Board permissions -->
-
- <!-- Moderator Tool permissions -->
- </role>
-
- <!-- permissions specific to the Seam Team -->
- <role name="Seam Team" id="seamTeam">
- <!-- Forums Admin Tool permissions -->
-
- <!-- Message Board permissions -->
-
- <!-- Moderator Tool permissions -->
- </role>
-</acl>
\ No newline at end of file
Added: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/acl-permissions.xml
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/acl-permissions.xml (rev 0)
+++ labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/acl-permissions.xml 2013-05-24 19:48:50 UTC (rev 38332)
@@ -0,0 +1,156 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!--
+ Each role contains a set of permissions. Each permission/no-permission points to a function in the system that this role has/doesnot have access to.
+ -->
+
+<acl>
+ <!-- dynamic roles/permissions defined for the application at runtime (either through the GUI or directly modifying this xml file) -->
+ <!--
+ Sample permission =
+ <permission functionId="editCategory"/> //plain without criteria
+
+ <permission functionId="editCategory"> //complicated with criteria specification
+ <criteria context="jsfAction">target.categoryName.indexOf('sandbox') != -1</criteria>
+ <criteria context="fragment">param[0].categoryName.toLowerCase().indexOf('sandbox') != -1</criteria>
+ </permission>
+ -->
+
+ <!--
+ built-in system defined roles
+ -->
+ <!-- non-logged in users -->
+ <role name="Anonymous" id="anonymous">
+ <!-- Forums Admin Tool permissions -->
+
+
+ <!-- Message Board permissions -->
+ <!-- giving anonymous users permission to view only the Unit Testing Category of Forums -->
+ <!--permission action="readCategory">
+ <criteria for="readCategory://ui">param[0].title.toLowerCase().startsWith('unit testing')</criteria>
+ </permission-->
+ <permission action="readForum"/>
+
+
+ <!-- Moderator Tool permissions -->
+ </role>
+
+ <!-- just a regular registered user -->
+ <role name="User" id="user">
+ <!-- Forums Admin Tool permissions -->
+
+ <!-- Message Board permissions -->
+ <permission action="readForum"/>
+ <permission action="post"/>
+ <!-- permission to edit only my own posts -->
+ <permission action="editPost">
+ <criteria for="editPost://ui">param[0].poster.user.userName.equals(identity.identity.userName)</criteria>
+ <criteria for="editPost://action">target.post.poster.user.userName.equals(identity.identity.userName)</criteria>
+ </permission>
+
+
+ <!-- Moderator Tool permissions -->
+ </role>
+
+ <!-- just a regular registered user -->
+ <role name="Users" id="users">
+ <!-- Forums Admin Tool permissions -->
+
+ <!-- Message Board permissions -->
+ <permission action="readForum"/>
+ <permission action="post"/>
+ <!-- permission to edit only my own posts -->
+ <permission action="editPost">
+ <criteria for="editPost://ui">param[0].poster.user.userName.equals(identity.identity.userName)</criteria>
+ <criteria for="editPost://action">target.post.poster.user.userName.equals(identity.identity.userName)</criteria>
+ </permission>
+
+
+ <!-- Moderator Tool permissions -->
+ </role>
+
+ <!-- users with Admin privileges -->
+ <role name="Admin" id="admin">
+ <!-- Forums Admin Tool permissions -->
+
+
+ <!-- Message Board permissions -->
+
+
+
+ <!-- Moderator Tool permissions -->
+
+ <!-- wild card permission -->
+ <permission action="all"/>
+ </role>
+
+ <!-- users with Admin privileges -->
+ <role name="Administrators" id="administrators">
+ <!-- Forums Admin Tool permissions -->
+
+
+ <!-- Message Board permissions -->
+
+
+
+ <!-- Moderator Tool permissions -->
+
+ <!-- wild card permission -->
+ <permission action="all"/>
+ </role>
+
+ <!--
+ deployment specific roles......just examples of how fine grained permissions can be assigned
+ this is an example of how the rules would possibly setup for JBoss.org Forums...
+ These policy rules vary for each consumer of forums depending on their own requirements of
+ access control security
+ -->
+
+ <!-- permissions specific to the Drools Team -->
+ <role name="Drools Team" id="droolsTeam">
+ <!-- Forums Admin Tool permissions -->
+ <permission action="viewCategory">
+ <criteria for="viewCategory://ui">param[0].title.toLowerCase().startsWith('jboss rules')</criteria>
+ </permission>
+ <permission action="deleteCategory">
+ <criteria for="deleteCategory://action">target.categoryName.toLowerCase().startsWith('jboss rules')</criteria>
+ <!-- also criteria for the implied edit category permission -->
+ <criteria for="editCategory://action">target.categoryName.toLowerCase().startsWith('jboss rules')</criteria>
+ </permission>
+ <permission action="viewForum">
+ <criteria for="viewForum://ui">param[0].name.toLowerCase().startsWith('jboss rules')</criteria>
+ </permission>
+ <permission action="deleteForum">
+ <criteria for="deleteForum://action">target.forumName.toLowerCase().startsWith('jboss rules')</criteria>
+ <!-- also criteria for the implied edit category permission -->
+ <criteria for="editForum://action">target.forumName.toLowerCase().startsWith('jboss rules')</criteria>
+ </permission>
+
+ <!-- Message Board permissions -->
+ <permission action="readCategory">
+ <criteria for="readCategory://ui">param[0].title.toLowerCase().startsWith('jboss rules')</criteria>
+ </permission>
+ <permission action="readForum"/>
+
+
+ <!-- Moderator Tool permissions -->
+ </role>
+
+ <!-- permissions specific to the JBPM Team -->
+ <role name="JBPM Team" id="jbpmTeam">
+ <!-- Forums Admin Tool permissions -->
+
+ <!-- Message Board permissions -->
+
+ <!-- Moderator Tool permissions -->
+ </role>
+
+ <!-- permissions specific to the Seam Team -->
+ <role name="Seam Team" id="seamTeam">
+ <!-- Forums Admin Tool permissions -->
+
+ <!-- Message Board permissions -->
+
+ <!-- Moderator Tool permissions -->
+ </role>
+</acl>
\ No newline at end of file
Property changes on: labs/jbossforums/branches/noejbforums130P27/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/acl-permissions.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/RolePortal.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/RolePortal.java 2013-05-24 19:47:25 UTC (rev 38331)
+++ labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/RolePortal.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -1,31 +0,0 @@
-package org.jboss.portlet.forums.auth.jbportal;
-
-import org.jboss.portal.identity.Role;
-
-public class RolePortal implements Role {
-
- @Override
- public String getDisplayName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public Object getId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public String getName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public void setDisplayName(String arg0) {
- // TODO Auto-generated method stub
-
- }
-
-}
Added: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/RolePortal.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/RolePortal.java (rev 0)
+++ labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/RolePortal.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -0,0 +1,41 @@
+package org.jboss.portlet.forums.auth.jbportal;
+
+import org.jboss.portal.identity.Role;
+
+public class RolePortal implements Role {
+
+ private String displayName;
+ private Object id;
+ private String name;
+
+ public RolePortal(Role group) {
+ displayName = group.getDisplayName();
+ id = group.getId();
+ name = group.getName();
+ }
+
+ @Override
+ public String getDisplayName() {
+ // TODO Auto-generated method stub
+ return displayName;
+ }
+
+ @Override
+ public Object getId() {
+ // TODO Auto-generated method stub
+ return id;
+ }
+
+ @Override
+ public String getName() {
+ // TODO Auto-generated method stub
+ return name;
+ }
+
+ @Override
+ public void setDisplayName(String arg0) {
+ // TODO Auto-generated method stub
+ this.displayName = arg0;
+ }
+
+}
Property changes on: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/RolePortal.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/UserPortal.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/UserPortal.java 2013-05-24 19:47:25 UTC (rev 38331)
+++ labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/UserPortal.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -1,36 +0,0 @@
-package org.jboss.portlet.forums.auth.jbportal;
-
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.User;
-
-public class UserPortal implements User {
-
- public UserPortal(User user) {
-
- }
-
- @Override
- public Object getId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public String getUserName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public void updatePassword(String arg0) throws IdentityException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public boolean validatePassword(String arg0) {
- // TODO Auto-generated method stub
- return false;
- }
-
-}
Added: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/UserPortal.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/UserPortal.java (rev 0)
+++ labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/UserPortal.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -0,0 +1,40 @@
+package org.jboss.portlet.forums.auth.jbportal;
+
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.User;
+
+public class UserPortal implements User {
+
+ private Object id;
+ private String userName;
+
+ public UserPortal(User user) {
+ id = user.getId();
+ userName = user.getUserName();
+ }
+
+ @Override
+ public Object getId() {
+ // TODO Auto-generated method stub
+ return id;
+ }
+
+ @Override
+ public String getUserName() {
+ // TODO Auto-generated method stub
+ return userName;
+ }
+
+ @Override
+ public void updatePassword(String arg0) throws IdentityException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public boolean validatePassword(String arg0) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
Property changes on: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/jbportal/UserPortal.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/MembershipModulePL.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/MembershipModulePL.java 2013-05-24 19:47:25 UTC (rev 38331)
+++ labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/MembershipModulePL.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -1,93 +0,0 @@
-package org.jboss.portlet.forums.auth.picketlink;
-
-import java.util.Set;
-
-import javax.naming.InitialContext;
-
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.MembershipModule;
-import org.jboss.portal.identity.Role;
-import org.jboss.portal.identity.User;
-import org.picketlink.idm.api.IdentitySession;
-import org.picketlink.idm.api.IdentitySessionFactory;
-import org.picketlink.idm.api.RelationshipManager;
-
-public class MembershipModulePL implements MembershipModule {
-
- private RelationshipManager relationshipManager;
-
- private static MembershipModule currentInstance;
-
- public MembershipModulePL() throws Exception {
- IdentitySessionFactory identitySessionFactory = (IdentitySessionFactory) new InitialContext()
- .lookup("java:/IdentitySessionFactory");
- IdentitySession identitySession = identitySessionFactory
- .createIdentitySession("idm_realm");
- relationshipManager = identitySession.getRelationshipManager();
- }
-
- static public MembershipModule getInstance() throws Exception {
- if (currentInstance == null)
- currentInstance = new MembershipModulePL();
-
- return currentInstance;
- }
-
- @Override
- public void assignRoles(User arg0, Set arg1) throws IdentityException,
- IllegalArgumentException {
- try {
- relationshipManager.associateUsersByKeys(arg0.getUserName(), arg1);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- }
-
- @Override
- public void assignUsers(Role arg0, Set arg1) throws IdentityException,
- IllegalArgumentException {
- try {
- relationshipManager.associateGroupsByKeys(arg0.getName(), arg1);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
-
- }
-
- @Override
- public Set findRoleMembers(String arg0, int arg1, int arg2, String arg3)
- throws IdentityException, IllegalArgumentException {
- Set roleMembers = null;
- try {
- relationshipManager.findRelatedGroups(arg0, "", null);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return roleMembers;
- }
-
- @Override
- public Set getRoles(User arg0) throws IdentityException,
- IllegalArgumentException {
- Set roles = null;
- try {
- relationshipManager.findAssociatedGroups(arg0.getUserName(), null);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return roles;
- }
-
- @Override
- public Set getUsers(Role arg0) throws IdentityException,
- IllegalArgumentException {
- Set users = null;
- try {
- relationshipManager.findAssociatedUsers(arg0.getName(), true, null);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return users;
- }
-
-}
Added: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/MembershipModulePL.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/MembershipModulePL.java (rev 0)
+++ labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/MembershipModulePL.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -0,0 +1,107 @@
+package org.jboss.portlet.forums.auth.picketlink;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.naming.InitialContext;
+
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.MembershipModule;
+import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.User;
+import org.picketlink.idm.api.IdentitySession;
+import org.picketlink.idm.api.IdentitySessionFactory;
+import org.picketlink.idm.api.RelationshipManager;
+
+public class MembershipModulePL implements MembershipModule {
+
+ private RelationshipManager relationshipManager;
+
+ private static MembershipModule currentInstance;
+
+ public MembershipModulePL() throws Exception {
+ IdentitySessionFactory identitySessionFactory = (IdentitySessionFactory) new InitialContext()
+ .lookup("java:/IdentitySessionFactory");
+ IdentitySession identitySession = identitySessionFactory
+ .createIdentitySession("idm_realm");
+ relationshipManager = identitySession.getRelationshipManager();
+ }
+
+ static public MembershipModule getInstance() throws Exception {
+ if (currentInstance == null)
+ currentInstance = new MembershipModulePL();
+
+ return currentInstance;
+ }
+
+ @Override
+ public void assignRoles(User arg0, Set arg1) throws IdentityException,
+ IllegalArgumentException {
+ try {
+ relationshipManager.associateUsersByKeys(arg0.getUserName(), arg1);
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ @Override
+ public void assignUsers(Role arg0, Set arg1) throws IdentityException,
+ IllegalArgumentException {
+ try {
+ relationshipManager.associateGroupsByKeys(arg0.getName(), arg1);
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+
+ }
+
+ @Override
+ public Set findRoleMembers(String arg0, int arg1, int arg2, String arg3) throws IdentityException, IllegalArgumentException {
+ Set roleMembers = null;
+ try {
+ Collection<org.picketlink.idm.api.Group> groups = relationshipManager.findRelatedGroups(arg0, "", null);
+ if (groups != null && groups.size() > 0) {
+ roleMembers = new HashSet<RolePL>();
+ for (org.picketlink.idm.api.Group group : groups)
+ roleMembers.add(new RolePL(group));
+ }
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return roleMembers;
+ }
+
+ @Override
+ public Set getRoles(User arg0) throws IdentityException, IllegalArgumentException {
+ Set roles = null;
+ try {
+ Collection<org.picketlink.idm.api.Group> groups = relationshipManager.findAssociatedGroups(arg0.getUserName(), null);
+ if (groups != null && groups.size() > 0) {
+ roles = new HashSet<RolePL>();
+ for (org.picketlink.idm.api.Group group : groups)
+ roles.add(new RolePL(group));
+ }
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return roles;
+ }
+
+ @Override
+ public Set getUsers(Role arg0) throws IdentityException, IllegalArgumentException {
+ Set users = null;
+ try {
+ Collection<org.picketlink.idm.api.User> plusers = relationshipManager.findAssociatedUsers(arg0.getName(), true, null);
+ if (plusers != null && plusers.size() > 0) {
+ users = new HashSet<UserPL>();
+ for (org.picketlink.idm.api.User user : plusers)
+ users.add(new UserPL(user));
+ }
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return users;
+ }
+
+}
Property changes on: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/MembershipModulePL.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/RolePL.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/RolePL.java 2013-05-24 19:47:25 UTC (rev 38331)
+++ labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/RolePL.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -1,31 +0,0 @@
-package org.jboss.portlet.forums.auth.picketlink;
-
-import org.jboss.portal.identity.Role;
-
-public class RolePL implements Role {
-
- @Override
- public String getDisplayName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public Object getId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public String getName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public void setDisplayName(String arg0) {
- // TODO Auto-generated method stub
-
- }
-
-}
Added: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/RolePL.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/RolePL.java (rev 0)
+++ labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/RolePL.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -0,0 +1,41 @@
+package org.jboss.portlet.forums.auth.picketlink;
+
+import org.jboss.portal.identity.Role;
+
+public class RolePL implements Role {
+
+ private String displayName;
+ private Object id;
+ private String name;
+
+ public RolePL(org.picketlink.idm.api.Group group) {
+ displayName = group.getName();
+ id = group.getKey();
+ name = group.getName();
+ }
+
+ @Override
+ public String getDisplayName() {
+ // TODO Auto-generated method stub
+ return displayName;
+ }
+
+ @Override
+ public Object getId() {
+ // TODO Auto-generated method stub
+ return id;
+ }
+
+ @Override
+ public String getName() {
+ // TODO Auto-generated method stub
+ return name;
+ }
+
+ @Override
+ public void setDisplayName(String arg0) {
+ // TODO Auto-generated method stub
+ this.displayName = arg0;
+ }
+
+}
Property changes on: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/RolePL.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserModulePL.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserModulePL.java 2013-05-24 19:47:25 UTC (rev 38331)
+++ labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserModulePL.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -1,137 +0,0 @@
-package org.jboss.portlet.forums.auth.picketlink;
-
-import java.util.Set;
-
-import javax.naming.InitialContext;
-
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.NoSuchUserException;
-import org.jboss.portal.identity.User;
-import org.jboss.portal.identity.UserModule;
-import org.picketlink.idm.api.IdentitySearchCriteria;
-import org.picketlink.idm.api.IdentitySession;
-import org.picketlink.idm.api.IdentitySessionFactory;
-import org.picketlink.idm.api.PersistenceManager;
-
-public class UserModulePL implements UserModule {
-
- private PersistenceManager persistenceManager;
-
- private static UserModule currentInstance;
-
- private UserModulePL() throws Exception {
- IdentitySessionFactory identitySessionFactory = (IdentitySessionFactory) new InitialContext()
- .lookup("java:/IdentitySessionFactory");
- IdentitySession identitySession = identitySessionFactory
- .createIdentitySession("idm_realm");
- persistenceManager = identitySession.getPersistenceManager();
- }
-
- static public UserModule getInstance() throws Exception {
- if (currentInstance == null)
- currentInstance = new UserModulePL();
-
- return currentInstance;
- }
-
- @Override
- public User createUser(String arg0, String arg1) throws IdentityException,
- IllegalArgumentException {
- User user = null;
- try {
- user = new UserPL(persistenceManager.createUser(arg0));
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return user;
- }
-
- @Override
- public User findUserById(Object arg0) throws IdentityException,
- IllegalArgumentException, NoSuchUserException {
- User user = null;
- try {
- user = new UserPL(persistenceManager.findUser((String) arg0));
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return user;
- }
-
- @Override
- public User findUserById(String arg0) throws IdentityException,
- IllegalArgumentException, NoSuchUserException {
- User user = null;
- try {
- user = new UserPL(persistenceManager.findUser(arg0));
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return user;
- }
-
- @Override
- public User findUserByUserName(String arg0) throws IdentityException,
- IllegalArgumentException, NoSuchUserException {
- IdentitySearchCriteria identitySearchCriteria = null;
- User user = null;
- try {
- user = new UserPL((org.picketlink.idm.api.User) persistenceManager
- .findUser(identitySearchCriteria).toArray()[0]);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return user;
- }
-
- @Override
- public Set findUsers(int arg0, int arg1) throws IdentityException,
- IllegalArgumentException {
- IdentitySearchCriteria identitySearchCriteria = null;
- Set users = null;
- try {
- persistenceManager.findUser(identitySearchCriteria);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return users;
- }
-
- @Override
- public Set findUsersFilteredByUserName(String arg0, int arg1, int arg2)
- throws IdentityException, IllegalArgumentException {
- IdentitySearchCriteria identitySearchCriteria = null;
- Set users = null;
- try {
- persistenceManager.findUser(identitySearchCriteria);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return users;
- }
-
- @Override
- public int getUserCount() throws IdentityException,
- IllegalArgumentException {
- int count = 0;
- try {
- count = persistenceManager.getUserCount();
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
- return count;
- }
-
- @Override
- public void removeUser(Object arg0) throws IdentityException,
- IllegalArgumentException {
- try {
- persistenceManager.removeUser(
- persistenceManager.findUser((String) arg0), true);
- } catch (org.picketlink.idm.common.exception.IdentityException ie) {
- ie.printStackTrace();
- }
-
- }
-
-}
Added: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserModulePL.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserModulePL.java (rev 0)
+++ labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserModulePL.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -0,0 +1,141 @@
+package org.jboss.portlet.forums.auth.picketlink;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.naming.InitialContext;
+
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.NoSuchUserException;
+import org.jboss.portal.identity.User;
+import org.jboss.portal.identity.UserModule;
+import org.picketlink.idm.api.IdentitySearchCriteria;
+import org.picketlink.idm.api.IdentitySession;
+import org.picketlink.idm.api.IdentitySessionFactory;
+import org.picketlink.idm.api.PersistenceManager;
+import org.picketlink.idm.api.UnsupportedCriterium;
+import org.picketlink.idm.impl.api.IdentitySearchCriteriaImpl;
+
+public class UserModulePL implements UserModule {
+
+ private PersistenceManager persistenceManager;
+
+ private static UserModule currentInstance;
+
+ private UserModulePL() throws Exception {
+ IdentitySessionFactory identitySessionFactory = (IdentitySessionFactory) new InitialContext().lookup("java:/IdentitySessionFactory");
+ IdentitySession identitySession = identitySessionFactory.createIdentitySession("idm_realm");
+ persistenceManager = identitySession.getPersistenceManager();
+ }
+
+ static public UserModule getInstance() throws Exception {
+ if (currentInstance == null)
+ currentInstance = new UserModulePL();
+
+ return currentInstance;
+ }
+
+ @Override
+ public User createUser(String arg0, String arg1) throws IdentityException, IllegalArgumentException {
+ User user = null;
+ try {
+ user = new UserPL(persistenceManager.createUser(arg0));
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return user;
+ }
+
+ @Override
+ public User findUserById(Object arg0) throws IdentityException, IllegalArgumentException, NoSuchUserException {
+ User user = null;
+ try {
+ user = new UserPL(persistenceManager.findUser((String) arg0));
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return user;
+ }
+
+ @Override
+ public User findUserById(String arg0) throws IdentityException, IllegalArgumentException, NoSuchUserException {
+ User user = null;
+ try {
+ user = new UserPL(persistenceManager.findUser(arg0));
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return user;
+ }
+
+ @Override
+ public User findUserByUserName(String arg0) throws IdentityException, IllegalArgumentException, NoSuchUserException {
+ IdentitySearchCriteria identitySearchCriteria = new IdentitySearchCriteriaImpl();
+ User user = null;
+ try {
+ identitySearchCriteria.nameFilter(arg0);
+ user = new UserPL((org.picketlink.idm.api.User) persistenceManager.findUser(identitySearchCriteria).toArray()[0]);
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ } catch (UnsupportedCriterium e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return user;
+ }
+
+ @Override
+ public Set findUsers(int arg0, int arg1) throws IdentityException,
+ IllegalArgumentException {
+ IdentitySearchCriteria identitySearchCriteria = null;
+ Set users = null;
+ try {
+ Collection<org.picketlink.idm.api.User> plusers = persistenceManager.findUser(identitySearchCriteria);
+ if (plusers != null && plusers.size() > 0) {
+ users = new HashSet<org.picketlink.idm.api.User>(plusers);
+ }
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return users;
+ }
+
+ @Override
+ public Set findUsersFilteredByUserName(String arg0, int arg1, int arg2)
+ throws IdentityException, IllegalArgumentException {
+ IdentitySearchCriteria identitySearchCriteria = null;
+ Set users = null;
+ try {
+ Collection<org.picketlink.idm.api.User> plusers = persistenceManager.findUser(identitySearchCriteria);
+ if (plusers != null && plusers.size() > 0) {
+ users = new HashSet<org.picketlink.idm.api.User>(plusers);
+ }
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return users;
+ }
+
+ @Override
+ public int getUserCount() throws IdentityException, IllegalArgumentException {
+ int count = 0;
+ try {
+ count = persistenceManager.getUserCount();
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+ return count;
+ }
+
+ @Override
+ public void removeUser(Object arg0) throws IdentityException, IllegalArgumentException {
+ try {
+ persistenceManager.removeUser(persistenceManager.findUser((String) arg0), true);
+ } catch (org.picketlink.idm.common.exception.IdentityException ie) {
+ ie.printStackTrace();
+ }
+
+ }
+
+}
Property changes on: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserModulePL.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserPL.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserPL.java 2013-05-24 19:47:25 UTC (rev 38331)
+++ labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserPL.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -1,36 +0,0 @@
-package org.jboss.portlet.forums.auth.picketlink;
-
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.User;
-
-public class UserPL implements User {
-
- public UserPL(org.picketlink.idm.api.User user) {
-
- }
-
- @Override
- public Object getId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public String getUserName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public void updatePassword(String arg0) throws IdentityException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public boolean validatePassword(String arg0) {
- // TODO Auto-generated method stub
- return false;
- }
-
-}
Added: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserPL.java
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserPL.java (rev 0)
+++ labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserPL.java 2013-05-24 19:48:50 UTC (rev 38332)
@@ -0,0 +1,40 @@
+package org.jboss.portlet.forums.auth.picketlink;
+
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.User;
+
+public class UserPL implements User {
+
+ private String id;
+ private String userName;
+
+ public UserPL(org.picketlink.idm.api.User user) {
+ id = user.getId();
+ userName = user.getKey();
+ }
+
+ @Override
+ public Object getId() {
+ // TODO Auto-generated method stub
+ return id;
+ }
+
+ @Override
+ public String getUserName() {
+ // TODO Auto-generated method stub
+ return userName;
+ }
+
+ @Override
+ public void updatePassword(String arg0) throws IdentityException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public boolean validatePassword(String arg0) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
Property changes on: labs/jbossforums/branches/noejbforums130P27/forums/src/main/org/jboss/portlet/forums/auth/picketlink/UserPL.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: labs/jbossforums/branches/noejbforums130P27/readme.txt
===================================================================
--- labs/jbossforums/branches/noejbforums130P27/readme.txt (rev 0)
+++ labs/jbossforums/branches/noejbforums130P27/readme.txt 2013-05-24 19:48:50 UTC (rev 38332)
@@ -0,0 +1,7 @@
+If you don't use jboss portal, Forums need picketlink as identity manager. To install it follow the steps:
+
+1- download picketlink from svn from http://anonsvn.jboss.org/repos/picketlink/idm/tags/1.1.5.CR01/
+2 - go in example/auth
+3 - modify the realm name in all codes. It must become from realm://JBossIdentity to idm_realm (JBoss Forums read it)
+4 - launch mvn install
+5 - copy the file target/idm-example-auth.sar in the webapps directory of tomcat
\ No newline at end of file
Property changes on: labs/jbossforums/branches/noejbforums130P27/readme.txt
___________________________________________________________________
Added: svn:mime-type
+ text/plain
More information about the jboss-svn-commits
mailing list