[gatein-commits] gatein SVN: r2057 - in portal/trunk: component/identity/src/main/java/org/exoplatform/services/organization/idm and 3 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Mar 9 09:21:43 EST 2010
Author: bdaw
Date: 2010-03-09 09:21:42 -0500 (Tue, 09 Mar 2010)
New Revision: 2057
Added:
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMCacheService.java
Removed:
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IdentityCacheService.java
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IdentityCacheServiceImpl.java
Modified:
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMServiceImpl.java
portal/trunk/component/identity/src/test/java/conf/portal/idm-configuration.xml
portal/trunk/component/test/organization/src/main/resources/conf/exo.portal.component.test.organization-configuration.xml
portal/trunk/pom.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml
Log:
- expose PicketLinkIDMCacheService via REST and JMX
Deleted: portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IdentityCacheService.java
===================================================================
--- portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IdentityCacheService.java 2010-03-09 13:24:09 UTC (rev 2056)
+++ portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IdentityCacheService.java 2010-03-09 14:21:42 UTC (rev 2057)
@@ -1,42 +0,0 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2010, Red Hat Middleware, LLC, and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-
-package org.exoplatform.services.organization.idm;
-
-import org.picketlink.idm.cache.APICacheProvider;
-
-
-/*
- * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
- */
-public interface IdentityCacheService
-{
-
- public void register(APICacheProvider cacheProvider);
-
- public void invalidate(String namespace);
-
- public void invalidateAll();
-
-
-
-}
Deleted: portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IdentityCacheServiceImpl.java
===================================================================
--- portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IdentityCacheServiceImpl.java 2010-03-09 13:24:09 UTC (rev 2056)
+++ portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IdentityCacheServiceImpl.java 2010-03-09 14:21:42 UTC (rev 2057)
@@ -1,68 +0,0 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2010, Red Hat Middleware, LLC, and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-
-package org.exoplatform.services.organization.idm;
-
-import org.picketlink.idm.cache.APICacheProvider;
-
-import java.util.LinkedList;
-import java.util.List;
-
-
-/*
- * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
- */
-public class IdentityCacheServiceImpl implements IdentityCacheService
-{
-
- private final List<APICacheProvider> cacheProviders = new LinkedList<APICacheProvider>();
-
- public IdentityCacheServiceImpl()
- {
- }
-
- public void register(APICacheProvider cacheProvider)
- {
-
- if (cacheProvider != null)
- {
- cacheProviders.add(cacheProvider);
- }
-
- }
-
- public void invalidate(String namespace)
- {
- for (APICacheProvider cacheProvider : cacheProviders)
- {
- cacheProvider.invalidate(namespace);
- }
- }
-
- public void invalidateAll()
- {
- for (APICacheProvider cacheProvider : cacheProviders)
- {
- cacheProvider.invalidateAll();
- }
- }
-}
Copied: portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMCacheService.java (from rev 2049, portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IdentityCacheService.java)
===================================================================
--- portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMCacheService.java (rev 0)
+++ portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMCacheService.java 2010-03-09 14:21:42 UTC (rev 2057)
@@ -0,0 +1,90 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2010, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.exoplatform.services.organization.idm;
+
+import org.exoplatform.management.annotations.Impact;
+import org.exoplatform.management.annotations.ImpactType;
+import org.exoplatform.management.annotations.Managed;
+import org.exoplatform.management.annotations.ManagedDescription;
+import org.exoplatform.management.annotations.ManagedName;
+import org.exoplatform.management.jmx.annotations.NameTemplate;
+import org.exoplatform.management.jmx.annotations.Property;
+import org.exoplatform.management.management.annotations.RESTEndpoint;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.picketlink.idm.cache.APICacheProvider;
+
+
+/*
+ * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
+ */
+ at Managed
+ at ManagedDescription("PicketLink IDM Cache Service")
+ at NameTemplate({
+ @Property(key = "name", value = "plidmcache"),
+ @Property(key = "service", value = "PicketLinkIDMCacheService")
+})
+ at RESTEndpoint(path = "plidmcache")
+public class PicketLinkIDMCacheService
+{
+
+ private final List<APICacheProvider> cacheProviders = new LinkedList<APICacheProvider>();
+
+ public PicketLinkIDMCacheService()
+ {
+ }
+
+ public void register(APICacheProvider cacheProvider)
+ {
+
+ if (cacheProvider != null)
+ {
+ cacheProviders.add(cacheProvider);
+ }
+
+ }
+
+ @Managed
+ @ManagedDescription("Ivalidate cache namespace")
+ @Impact(ImpactType.WRITE)
+ public void invalidate(@ManagedDescription("Cache namespace") @ManagedName("namespace")String namespace)
+ {
+ for (APICacheProvider cacheProvider : cacheProviders)
+ {
+ cacheProvider.invalidate(namespace);
+ }
+ }
+
+ @Managed
+ @ManagedDescription("Ivalidate all caches")
+ @Impact(ImpactType.WRITE)
+ public void invalidateAll()
+ {
+ for (APICacheProvider cacheProvider : cacheProviders)
+ {
+ cacheProvider.invalidateAll();
+ }
+ }
+}
Modified: portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMServiceImpl.java
===================================================================
--- portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMServiceImpl.java 2010-03-09 13:24:09 UTC (rev 2056)
+++ portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMServiceImpl.java 2010-03-09 14:21:42 UTC (rev 2057)
@@ -29,7 +29,6 @@
import org.picketlink.idm.api.IdentitySession;
import org.picketlink.idm.api.IdentitySessionFactory;
import org.picketlink.idm.api.cfg.IdentityConfiguration;
-import org.picketlink.idm.cache.APICacheProvider;
import org.picketlink.idm.common.exception.IdentityConfigurationException;
import org.picketlink.idm.impl.cache.JBossCacheAPICacheProviderImpl;
import org.picketlink.idm.impl.configuration.IdentityConfigurationImpl;
@@ -82,7 +81,7 @@
InitParams initParams,
HibernateService hibernateService,
ConfigurationManager confManager,
- IdentityCacheService identityCache,
+ PicketLinkIDMCacheService picketLinkIDMCache,
InitialContextInitializer dependency) throws Exception
{
ValueParam config = initParams.getValueParam(PARAM_CONFIG_OPTION);
@@ -124,7 +123,7 @@
InputStream configStream = confManager.getInputStream(cacheConfig.getValue());
JBossCacheAPICacheProviderImpl cacheProvider = new JBossCacheAPICacheProviderImpl();
cacheProvider.initialize(configStream);
- identityCache.register(cacheProvider);
+ picketLinkIDMCache.register(cacheProvider);
identityConfiguration.getIdentityConfigurationRegistry().register(cacheProvider, "apiCacheProvider");
}
}
Modified: portal/trunk/component/identity/src/test/java/conf/portal/idm-configuration.xml
===================================================================
--- portal/trunk/component/identity/src/test/java/conf/portal/idm-configuration.xml 2010-03-09 13:24:09 UTC (rev 2056)
+++ portal/trunk/component/identity/src/test/java/conf/portal/idm-configuration.xml 2010-03-09 14:21:42 UTC (rev 2057)
@@ -25,8 +25,8 @@
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
<component>
- <key>org.exoplatform.services.organization.idm.IdentityCacheService</key>
- <type>org.exoplatform.services.organization.idm.IdentityCacheServiceImpl</type>
+ <key>org.exoplatform.services.organization.idm.PicketLinkIDMCacheService</key>
+ <type>org.exoplatform.services.organization.idm.PicketLinkIDMCacheService</type>
</component>
<component>
Modified: portal/trunk/component/test/organization/src/main/resources/conf/exo.portal.component.test.organization-configuration.xml
===================================================================
--- portal/trunk/component/test/organization/src/main/resources/conf/exo.portal.component.test.organization-configuration.xml 2010-03-09 13:24:09 UTC (rev 2056)
+++ portal/trunk/component/test/organization/src/main/resources/conf/exo.portal.component.test.organization-configuration.xml 2010-03-09 14:21:42 UTC (rev 2057)
@@ -26,8 +26,8 @@
<component>
- <key>org.exoplatform.services.organization.idm.IdentityCacheService</key>
- <type>org.exoplatform.services.organization.idm.IdentityCacheServiceImpl</type>
+ <key>org.exoplatform.services.organization.idm.PicketLinkIDMCacheService</key>
+ <type>org.exoplatform.services.organization.idm.PicketLinkIDMCacheService</type>
</component>
<component>
Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml 2010-03-09 13:24:09 UTC (rev 2056)
+++ portal/trunk/pom.xml 2010-03-09 14:21:42 UTC (rev 2057)
@@ -46,7 +46,7 @@
<org.gatein.common.version>2.0.0-CR03</org.gatein.common.version>
<org.gatein.wci.version>2.0.0-CR02</org.gatein.wci.version>
<org.gatein.pc.version>2.1.0-CR05</org.gatein.pc.version>
- <org.picketlink.idm>1.1.0.Beta9</org.picketlink.idm>
+ <org.picketlink.idm>1.1.0.Beta10</org.picketlink.idm>
<org.gatein.wsrp.version>1.0.0-Beta09</org.gatein.wsrp.version>
<org.gatein.mop.version>1.0.0-CR03</org.gatein.mop.version>
<org.slf4j.version>1.5.6</org.slf4j.version>
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml 2010-03-09 13:24:09 UTC (rev 2056)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml 2010-03-09 14:21:42 UTC (rev 2057)
@@ -26,8 +26,8 @@
<component>
- <key>org.exoplatform.services.organization.idm.IdentityCacheService</key>
- <type>org.exoplatform.services.organization.idm.IdentityCacheServiceImpl</type>
+ <key>org.exoplatform.services.organization.idm.PicketLinkIDMCacheService</key>
+ <type>org.exoplatform.services.organization.idm.PicketLinkIDMCacheService</type>
</component>
<component>
More information about the gatein-commits
mailing list