[seam-commits] Seam SVN: r13418 - in modules/security/trunk: impl/src/main/java/org/jboss/seam/security/management and 1 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Sat Jul 17 06:32:04 EDT 2010
Author: shane.bryzak at jboss.com
Date: 2010-07-17 06:32:04 -0400 (Sat, 17 Jul 2010)
New Revision: 13418
Added:
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/IdentityStoreConfiguration.java
Modified:
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/classes/seam-beans.xml
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/IdentityManagerImpl.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/JpaIdentityStoreConfiguration.java
Log:
oops, missed one class.. and made configuration a little simpler
Modified: modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/classes/seam-beans.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/classes/seam-beans.xml 2010-07-17 10:27:05 UTC (rev 13417)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/classes/seam-beans.xml 2010-07-17 10:32:04 UTC (rev 13418)
@@ -42,7 +42,6 @@
<plidm:JpaIdentityStoreConfiguration>
<s:overrides/>
- <plidm:id>jpa</plidm:id>
<plidm:identityClass>org.jboss.seam.security.examples.idmconsole.model.IdentityObject</plidm:identityClass>
<plidm:credentialClass>org.jboss.seam.security.examples.idmconsole.model.IdentityObjectCredential</plidm:credentialClass>
<plidm:relationshipClass>org.jboss.seam.security.examples.idmconsole.model.IdentityObjectRelationship</plidm:relationshipClass>
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/IdentityManagerImpl.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/IdentityManagerImpl.java 2010-07-17 10:27:05 UTC (rev 13417)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/IdentityManagerImpl.java 2010-07-17 10:32:04 UTC (rev 13418)
@@ -89,6 +89,7 @@
public boolean enableUser(String name)
{
identity.checkPermission(RESOURCE_IDENTITY, PERMISSION_UPDATE);
+
//return identityStore.enableUser(name);
return false;
}
Added: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/IdentityStoreConfiguration.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/IdentityStoreConfiguration.java (rev 0)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/IdentityStoreConfiguration.java 2010-07-17 10:32:04 UTC (rev 13418)
@@ -0,0 +1,48 @@
+package org.jboss.seam.security.management.picketlink;
+
+import org.picketlink.idm.impl.configuration.metadata.IdentityStoreConfigurationMetaDataImpl;
+
+/**
+ * Abstract bean for configuring identity stores
+ *
+ * @author Shane Bryzak
+ */
+public abstract class IdentityStoreConfiguration
+{
+ private String id;
+ private Class<?> identityStoreClass;
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ public Class<?> getIdentityStoreClass()
+ {
+ return identityStoreClass;
+ }
+
+ public void setIdentityStoreClass(Class<?> identityStoreClass)
+ {
+ this.identityStoreClass = identityStoreClass;
+ }
+
+ public void configure(IdentityStoreConfigurationMetaDataImpl store)
+ {
+ store.setId(id);
+
+ if (getIdentityStoreClass() != null)
+ {
+ store.setClassName(getIdentityStoreClass().getName());
+ }
+
+ doConfigure(store);
+ }
+
+ public abstract void doConfigure(IdentityStoreConfigurationMetaDataImpl store);
+}
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/JpaIdentityStoreConfiguration.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/JpaIdentityStoreConfiguration.java 2010-07-17 10:27:05 UTC (rev 13417)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/JpaIdentityStoreConfiguration.java 2010-07-17 10:32:04 UTC (rev 13418)
@@ -20,6 +20,12 @@
private Class<?> roleNameClass;
private Class<?> attributeClass;
+ @Override
+ public String getId()
+ {
+ return (super.getId() == null) ? "jpa" : super.getId();
+ }
+
/**
* If the identityStoreClass hasn't been set, then return JpaIdentityStore
* by default.
More information about the seam-commits
mailing list