Author: sohil.shah(a)jboss.com
Date: 2010-06-05 11:12:46 -0400 (Sat, 05 Jun 2010)
New Revision: 1122
Added:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/PolicyServerComponent.java
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/decision/
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/event/
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/plugin/
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/provisioning/
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/tools/
authz/gatein/authz-plugin/trunk/service/src/test/java/org/jboss/gatein/authz/service/
Removed:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/PolicyServerComponent.java
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/decision/
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/event/
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/plugin/
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/provisioning/
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/tools/
authz/gatein/authz-plugin/trunk/service/src/test/java/org/jboss/gatein/authz/core/
Modified:
authz/gatein/authz-plugin/trunk/service/pom.xml
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/decision/PolicyDecisionPointComponent.java
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/event/LocalEventBusComponent.java
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/plugin/DroolsRuleManagerComponent.java
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/provisioning/RelationalDBPolicyStoreComponent.java
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/tools/HibernateServiceComponent.java
authz/gatein/authz-plugin/trunk/service/src/test/java/org/jboss/gatein/authz/service/ContainerBuilder.java
authz/gatein/authz-plugin/trunk/service/src/test/java/org/jboss/gatein/authz/service/MyComponent.java
authz/gatein/authz-plugin/trunk/service/src/test/java/org/jboss/gatein/authz/service/TestKernelStartup.java
Log:
refactoring
Modified: authz/gatein/authz-plugin/trunk/service/pom.xml
===================================================================
--- authz/gatein/authz-plugin/trunk/service/pom.xml 2010-06-05 15:00:09 UTC (rev 1121)
+++ authz/gatein/authz-plugin/trunk/service/pom.xml 2010-06-05 15:12:46 UTC (rev 1122)
@@ -8,7 +8,7 @@
<relativePath>../pom.xml</relativePath>
</parent>
- <groupId>org.jboss.gatein.authz.core</groupId>
+ <groupId>org.jboss.gatein.authz.service</groupId>
<artifactId>service</artifactId>
<name>service</name>
<packaging>jar</packaging>
Deleted:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/PolicyServerComponent.java
===================================================================
---
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/PolicyServerComponent.java 2010-06-05
15:00:09 UTC (rev 1121)
+++
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/PolicyServerComponent.java 2010-06-05
15:12:46 UTC (rev 1122)
@@ -1,83 +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.jboss.gatein.authz.core.server;
-
-import org.exoplatform.container.xml.InitParams;
-import org.picocontainer.Startable;
-
-import org.jboss.security.authz.policy.server.PolicyServer;
-
-import org.jboss.gatein.authz.core.server.decision.PolicyDecisionPointComponent;
-import org.jboss.gatein.authz.core.server.event.LocalEventBusComponent;
-import org.jboss.gatein.authz.core.server.plugin.DroolsRuleManagerComponent;
-import org.jboss.gatein.authz.core.server.provisioning.RelationalDBPolicyStoreComponent;
-import org.jboss.gatein.authz.core.server.tools.HibernateServiceComponent;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class PolicyServerComponent implements Startable
-{
- private final InitParams params;
- private PolicyServer policyServer;
-
- public PolicyServerComponent(InitParams params,PolicyDecisionPointComponent
pdpComponent,
- LocalEventBusComponent eventBusComponent,
- DroolsRuleManagerComponent ruleManagerComponent,
- RelationalDBPolicyStoreComponent storageComponent,
- HibernateServiceComponent hibernateServiceComponent)
- {
- this.params = params;
-
- this.policyServer = new PolicyServer();
-
- this.policyServer.setPolicyDecisionPoint(pdpComponent.getPDP());
- this.policyServer.setEventBus(eventBusComponent.getEventBus());
- this.policyServer.setRuleManager(ruleManagerComponent.getDroolsRuleManager());
- this.policyServer.setPolicyStore(storageComponent.getRelationalDBPolicyStore());
- this.policyServer.setHibernateService(hibernateServiceComponent.getHibernateService());
- }
-
- @Override
- public void start()
- {
- this.policyServer.start();
- }
-
- @Override
- public void stop()
- {
- this.policyServer.stop();
- }
-
- public String getName()
- {
- return this.params.getValueParam("name").getValue();
- }
- //--------------------------------------------------------------------------------------------------------------------------------------------------------
- public PolicyServer getPolicyServer()
- {
- return this.policyServer;
- }
-}
Copied:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/PolicyServerComponent.java
(from rev 1119,
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/PolicyServerComponent.java)
===================================================================
---
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/PolicyServerComponent.java
(rev 0)
+++
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/PolicyServerComponent.java 2010-06-05
15:12:46 UTC (rev 1122)
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * 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.jboss.gatein.authz.service;
+
+import org.exoplatform.container.xml.InitParams;
+import org.picocontainer.Startable;
+
+import org.jboss.security.authz.policy.server.PolicyServer;
+
+import org.jboss.gatein.authz.service.decision.PolicyDecisionPointComponent;
+import org.jboss.gatein.authz.service.event.LocalEventBusComponent;
+import org.jboss.gatein.authz.service.plugin.DroolsRuleManagerComponent;
+import org.jboss.gatein.authz.service.provisioning.RelationalDBPolicyStoreComponent;
+import org.jboss.gatein.authz.service.tools.HibernateServiceComponent;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class PolicyServerComponent implements Startable
+{
+ private final InitParams params;
+ private PolicyServer policyServer;
+
+ public PolicyServerComponent(InitParams params,PolicyDecisionPointComponent
pdpComponent,
+ LocalEventBusComponent eventBusComponent,
+ DroolsRuleManagerComponent ruleManagerComponent,
+ RelationalDBPolicyStoreComponent storageComponent,
+ HibernateServiceComponent hibernateServiceComponent)
+ {
+ this.params = params;
+
+ this.policyServer = new PolicyServer();
+
+ this.policyServer.setPolicyDecisionPoint(pdpComponent.getPDP());
+ this.policyServer.setEventBus(eventBusComponent.getEventBus());
+ this.policyServer.setRuleManager(ruleManagerComponent.getDroolsRuleManager());
+ this.policyServer.setPolicyStore(storageComponent.getRelationalDBPolicyStore());
+ this.policyServer.setHibernateService(hibernateServiceComponent.getHibernateService());
+ }
+
+ @Override
+ public void start()
+ {
+ this.policyServer.start();
+ }
+
+ @Override
+ public void stop()
+ {
+ this.policyServer.stop();
+ }
+
+ public String getName()
+ {
+ return this.params.getValueParam("name").getValue();
+ }
+ //--------------------------------------------------------------------------------------------------------------------------------------------------------
+ public PolicyServer getPolicyServer()
+ {
+ return this.policyServer;
+ }
+}
Copied:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/decision
(from rev 1119,
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/decision)
Modified:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/decision/PolicyDecisionPointComponent.java
===================================================================
---
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/decision/PolicyDecisionPointComponent.java 2010-06-05
14:58:25 UTC (rev 1119)
+++
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/decision/PolicyDecisionPointComponent.java 2010-06-05
15:12:46 UTC (rev 1122)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
******************************************************************************/
-package org.jboss.gatein.authz.core.server.decision;
+package org.jboss.gatein.authz.service.decision;
import org.exoplatform.container.xml.InitParams;
import org.picocontainer.Startable;
Copied:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/event
(from rev 1119,
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/event)
Modified:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/event/LocalEventBusComponent.java
===================================================================
---
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/event/LocalEventBusComponent.java 2010-06-05
14:58:25 UTC (rev 1119)
+++
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/event/LocalEventBusComponent.java 2010-06-05
15:12:46 UTC (rev 1122)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
******************************************************************************/
-package org.jboss.gatein.authz.core.server.event;
+package org.jboss.gatein.authz.service.event;
import org.exoplatform.container.xml.InitParams;
import org.picocontainer.Startable;
Copied:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/plugin
(from rev 1119,
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/plugin)
Modified:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/plugin/DroolsRuleManagerComponent.java
===================================================================
---
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/plugin/DroolsRuleManagerComponent.java 2010-06-05
14:58:25 UTC (rev 1119)
+++
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/plugin/DroolsRuleManagerComponent.java 2010-06-05
15:12:46 UTC (rev 1122)
@@ -20,13 +20,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
******************************************************************************/
-package org.jboss.gatein.authz.core.server.plugin;
+package org.jboss.gatein.authz.service.plugin;
import org.exoplatform.container.xml.InitParams;
import org.picocontainer.Startable;
import org.jboss.security.authz.policy.server.plugin.DroolsRuleManager;
-import org.jboss.gatein.authz.core.server.tools.HibernateServiceComponent;
+import org.jboss.gatein.authz.service.tools.HibernateServiceComponent;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
Copied:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/provisioning
(from rev 1119,
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/provisioning)
Modified:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/provisioning/RelationalDBPolicyStoreComponent.java
===================================================================
---
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/provisioning/RelationalDBPolicyStoreComponent.java 2010-06-05
14:58:25 UTC (rev 1119)
+++
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/provisioning/RelationalDBPolicyStoreComponent.java 2010-06-05
15:12:46 UTC (rev 1122)
@@ -20,13 +20,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
******************************************************************************/
-package org.jboss.gatein.authz.core.server.provisioning;
+package org.jboss.gatein.authz.service.provisioning;
import org.exoplatform.container.xml.InitParams;
import org.picocontainer.Startable;
import org.jboss.security.authz.policy.server.provisioning.RelationalDBPolicyStore;
-import org.jboss.gatein.authz.core.server.tools.HibernateServiceComponent;
+import org.jboss.gatein.authz.service.tools.HibernateServiceComponent;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
Copied:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/tools
(from rev 1119,
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/tools)
Modified:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/tools/HibernateServiceComponent.java
===================================================================
---
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/core/server/tools/HibernateServiceComponent.java 2010-06-05
14:58:25 UTC (rev 1119)
+++
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/tools/HibernateServiceComponent.java 2010-06-05
15:12:46 UTC (rev 1122)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
******************************************************************************/
-package org.jboss.gatein.authz.core.server.tools;
+package org.jboss.gatein.authz.service.tools;
import org.exoplatform.container.xml.InitParams;
import org.picocontainer.Startable;
Copied:
authz/gatein/authz-plugin/trunk/service/src/test/java/org/jboss/gatein/authz/service (from
rev 1119,
authz/gatein/authz-plugin/trunk/service/src/test/java/org/jboss/gatein/authz/core)
Modified:
authz/gatein/authz-plugin/trunk/service/src/test/java/org/jboss/gatein/authz/service/ContainerBuilder.java
===================================================================
---
authz/gatein/authz-plugin/trunk/service/src/test/java/org/jboss/gatein/authz/core/ContainerBuilder.java 2010-06-05
14:58:25 UTC (rev 1119)
+++
authz/gatein/authz-plugin/trunk/service/src/test/java/org/jboss/gatein/authz/service/ContainerBuilder.java 2010-06-05
15:12:46 UTC (rev 1122)
@@ -16,7 +16,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.gatein.authz.core;
+package org.jboss.gatein.authz.service;
import junit.framework.AssertionFailedError;
import org.exoplatform.commons.utils.PropertyManager;
Modified:
authz/gatein/authz-plugin/trunk/service/src/test/java/org/jboss/gatein/authz/service/MyComponent.java
===================================================================
---
authz/gatein/authz-plugin/trunk/service/src/test/java/org/jboss/gatein/authz/core/MyComponent.java 2010-06-05
14:58:25 UTC (rev 1119)
+++
authz/gatein/authz-plugin/trunk/service/src/test/java/org/jboss/gatein/authz/service/MyComponent.java 2010-06-05
15:12:46 UTC (rev 1122)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
******************************************************************************/
-package org.jboss.gatein.authz.core;
+package org.jboss.gatein.authz.service;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.container.xml.ValueParam;
Modified:
authz/gatein/authz-plugin/trunk/service/src/test/java/org/jboss/gatein/authz/service/TestKernelStartup.java
===================================================================
---
authz/gatein/authz-plugin/trunk/service/src/test/java/org/jboss/gatein/authz/core/TestKernelStartup.java 2010-06-05
14:58:25 UTC (rev 1119)
+++
authz/gatein/authz-plugin/trunk/service/src/test/java/org/jboss/gatein/authz/service/TestKernelStartup.java 2010-06-05
15:12:46 UTC (rev 1122)
@@ -20,22 +20,22 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
******************************************************************************/
-package org.jboss.gatein.authz.core;
+package org.jboss.gatein.authz.service;
import java.net.URL;
import org.exoplatform.container.PortalContainer;
-import org.jboss.gatein.authz.core.server.event.LocalEventBusComponent;
import org.jboss.security.authz.policy.server.event.LocalEventBus;
-import org.jboss.gatein.authz.core.server.tools.HibernateServiceComponent;
import org.jboss.security.authz.policy.server.tools.HibernateService;
-import org.jboss.gatein.authz.core.server.provisioning.RelationalDBPolicyStoreComponent;
import org.jboss.security.authz.policy.server.provisioning.RelationalDBPolicyStore;
-import org.jboss.gatein.authz.core.server.plugin.DroolsRuleManagerComponent;
import org.jboss.security.authz.policy.server.plugin.DroolsRuleManager;
-import org.jboss.gatein.authz.core.server.decision.PolicyDecisionPointComponent;
import org.jboss.security.authz.policy.server.decision.PolicyDecisionPoint;
-import org.jboss.gatein.authz.core.server.PolicyServerComponent;
+import org.jboss.gatein.authz.service.PolicyServerComponent;
+import org.jboss.gatein.authz.service.decision.PolicyDecisionPointComponent;
+import org.jboss.gatein.authz.service.event.LocalEventBusComponent;
+import org.jboss.gatein.authz.service.plugin.DroolsRuleManagerComponent;
+import org.jboss.gatein.authz.service.provisioning.RelationalDBPolicyStoreComponent;
+import org.jboss.gatein.authz.service.tools.HibernateServiceComponent;
import org.jboss.security.authz.policy.server.PolicyServer;
import junit.framework.TestCase;