Author: shane.bryzak(a)jboss.com
Date: 2010-03-25 23:53:01 -0400 (Thu, 25 Mar 2010)
New Revision: 12277
Modified:
modules/security/trunk/core/src/main/java/org/jboss/seam/security/management/IdentityManager.java
modules/security/trunk/core/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java
modules/security/trunk/examples/seamspace/src/main/java/org/jboss/seam/security/examples/seamspace/action/BlogAction.java
modules/security/trunk/examples/seamspace/src/main/java/org/jboss/seam/security/examples/seamspace/action/CommentAction.java
modules/security/trunk/examples/seamspace/src/main/java/org/jboss/seam/security/examples/seamspace/action/PictureSearch.java
Log:
fixed the rest of the deployment exceptions
Modified:
modules/security/trunk/core/src/main/java/org/jboss/seam/security/management/IdentityManager.java
===================================================================
---
modules/security/trunk/core/src/main/java/org/jboss/seam/security/management/IdentityManager.java 2010-03-26
03:39:35 UTC (rev 12276)
+++
modules/security/trunk/core/src/main/java/org/jboss/seam/security/management/IdentityManager.java 2010-03-26
03:53:01 UTC (rev 12277)
@@ -6,10 +6,9 @@
import java.util.Comparator;
import java.util.List;
-import javax.enterprise.context.RequestScoped;
+import javax.enterprise.inject.Model;
import javax.enterprise.inject.spi.BeanManager;
import javax.inject.Inject;
-import javax.inject.Named;
import org.jboss.seam.security.Identity;
import org.jboss.seam.security.util.Strings;
@@ -21,8 +20,7 @@
*
* @author Shane Bryzak
*/
-@Named
-@RequestScoped
+@Model
public class IdentityManager implements Serializable
{
private static final long serialVersionUID = 6864253169970552893L;
@@ -40,7 +38,7 @@
@Inject BeanManager manager;
@Inject Identity identity;
- @Inject private IdentityStore identityStore;
+ private IdentityStore identityStore;
private IdentityStore roleIdentityStore;
@Inject
@@ -53,7 +51,7 @@
if (identityStore == null || roleIdentityStore == null)
{
- log.warn("no identity store available - please configure an identityStore
if identity " +
+ log.warn("No identity store available - please configure an identityStore
if identity " +
"management is required.");
}
}
Modified:
modules/security/trunk/core/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java
===================================================================
---
modules/security/trunk/core/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java 2010-03-26
03:39:35 UTC (rev 12276)
+++
modules/security/trunk/core/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java 2010-03-26
03:53:01 UTC (rev 12277)
@@ -65,7 +65,7 @@
@Inject IdentifierPolicy identifierPolicy;
@Inject BeanManager manager;
@Inject IdentityManager identityManager;
- @Inject IdentityStore identityStore;
+ //@Inject IdentityStore identityStore;
@Inject Instance<EntityManager> entityManagerInstance;
@@ -530,7 +530,8 @@
{
boolean recipientIsRole = recipient instanceof Role;
- if (identityStore != null && identityStore instanceof JpaIdentityStore)
+ if (identityManager.getIdentityStore() != null &&
+ identityManager.getIdentityStore() instanceof JpaIdentityStore)
{
// TODO review this code
@@ -538,7 +539,7 @@
//roleProperty.getPropertyType().equals(config.getRoleEntityClass()))
)
{
- return ((JpaIdentityStore) identityStore).lookupRole(recipient.getName());
+ return ((JpaIdentityStore)
identityManager.getIdentityStore()).lookupRole(recipient.getName());
}
//else if (userProperty.getPropertyType().equals(config.getUserEntityClass()))
//{
Modified:
modules/security/trunk/examples/seamspace/src/main/java/org/jboss/seam/security/examples/seamspace/action/BlogAction.java
===================================================================
---
modules/security/trunk/examples/seamspace/src/main/java/org/jboss/seam/security/examples/seamspace/action/BlogAction.java 2010-03-26
03:39:35 UTC (rev 12276)
+++
modules/security/trunk/examples/seamspace/src/main/java/org/jboss/seam/security/examples/seamspace/action/BlogAction.java 2010-03-26
03:53:01 UTC (rev 12277)
@@ -27,7 +27,7 @@
@Inject EntityManager entityManager;
- @Inject MemberBlog selectedBlog;
+ /*@Inject*/ MemberBlog selectedBlog;
@Inject Member authenticatedMember;
Modified:
modules/security/trunk/examples/seamspace/src/main/java/org/jboss/seam/security/examples/seamspace/action/CommentAction.java
===================================================================
---
modules/security/trunk/examples/seamspace/src/main/java/org/jboss/seam/security/examples/seamspace/action/CommentAction.java 2010-03-26
03:39:35 UTC (rev 12276)
+++
modules/security/trunk/examples/seamspace/src/main/java/org/jboss/seam/security/examples/seamspace/action/CommentAction.java 2010-03-26
03:53:01 UTC (rev 12277)
@@ -22,7 +22,7 @@
@Inject Member authenticatedMember;
- @Inject MemberBlog selectedBlog;
+ /*@Inject */MemberBlog selectedBlog;
@Inject Conversation conversation;
Modified:
modules/security/trunk/examples/seamspace/src/main/java/org/jboss/seam/security/examples/seamspace/action/PictureSearch.java
===================================================================
---
modules/security/trunk/examples/seamspace/src/main/java/org/jboss/seam/security/examples/seamspace/action/PictureSearch.java 2010-03-26
03:39:35 UTC (rev 12276)
+++
modules/security/trunk/examples/seamspace/src/main/java/org/jboss/seam/security/examples/seamspace/action/PictureSearch.java 2010-03-26
03:53:01 UTC (rev 12277)
@@ -20,7 +20,7 @@
private String memberName;
- @PersistenceContext EntityManager entityManager;
+ /*@PersistenceContext */EntityManager entityManager;
@Inject Identity identity;
Show replies by date