Author: chris.laprun(a)jboss.com
Date: 2010-01-28 08:10:29 -0500 (Thu, 28 Jan 2010)
New Revision: 1459
Modified:
components/wsrp/trunk/admin-gui/pom.xml
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/faces-config.xml
components/wsrp/trunk/pom.xml
Log:
- Started updating admin-gui module so that it'd work with GateIn:
+ Updated dependencies to be in line with the GateIn ones.
+ Added provided scope on admin-gui dependencies to avoid bundling the world.
+ Added PortletBridge dependencies.
+ Added temporary eXo kernel dependency until a cleaner way to inject services can be
found.
Modified: components/wsrp/trunk/admin-gui/pom.xml
===================================================================
--- components/wsrp/trunk/admin-gui/pom.xml 2010-01-28 10:43:54 UTC (rev 1458)
+++ components/wsrp/trunk/admin-gui/pom.xml 2010-01-28 13:10:29 UTC (rev 1459)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ 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.
@@ -21,7 +21,8 @@
~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-->
-<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
@@ -33,31 +34,59 @@
<name>GateIn WSRP Admin GUI</name>
<dependencies>
- <dependency>
- <groupId>org.gatein.wsrp</groupId>
- <artifactId>wsrp-common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.wsrp</groupId>
- <artifactId>wsrp-consumer</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.wsrp</groupId>
- <artifactId>wsrp-producer-lib</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.common</groupId>
- <artifactId>common-common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.pc</groupId>
- <artifactId>pc-api</artifactId>
- </dependency>
+ <dependency>
+ <groupId>org.gatein.wsrp</groupId>
+ <artifactId>wsrp-common</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.wsrp</groupId>
+ <artifactId>wsrp-consumer</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.wsrp</groupId>
+ <artifactId>wsrp-producer-lib</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.common</groupId>
+ <artifactId>common-common</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.portletbridge</groupId>
+ <artifactId>portletbridge-api</artifactId>
+ <version>2.0.0.CR1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portletbridge</groupId>
+ <artifactId>portletbridge-impl</artifactId>
+ <version>2.0.0.CR1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <version>1.1.15</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ <scope>provided</scope>
+ <version>2.2.0-Beta06</version>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
===================================================================
---
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2010-01-28
10:43:54 UTC (rev 1458)
+++
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2010-01-28
13:10:29 UTC (rev 1459)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * 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.
@@ -23,6 +23,7 @@
package org.gatein.wsrp.admin.ui;
+import org.exoplatform.container.ExoContainerContext;
import org.gatein.wsrp.WSRPConsumer;
import org.gatein.wsrp.consumer.EndpointConfigurationInfo;
import org.gatein.wsrp.consumer.ProducerInfo;
@@ -123,7 +124,7 @@
info.setId(id);
// properly update the registry after change of id
- registry.updateProducerInfo(info);
+ getRegistry().updateProducerInfo(info);
// we're not using modifyIfNeeded here to avoid double equality check,
so we need to set modified manually
modified = true;
@@ -133,7 +134,7 @@
else
{
// initialization scenario
- consumer = registry.getConsumer(id);
+ consumer = getRegistry().getConsumer(id);
if (consumer != null)
{
EndpointConfigurationInfo endpoint =
getProducerInfo().getEndpointConfigurationInfo();
@@ -174,7 +175,7 @@
}
catch (Exception e)
{
- registry.deactivateConsumerWith(getId());
+ getRegistry().deactivateConsumerWith(getId());
beanContext.createErrorMessageFrom("wsdl", e);
}
}
@@ -345,7 +346,7 @@
private void saveToRegistry(ProducerInfo prodInfo)
{
- registry.updateProducerInfo(prodInfo);
+ getRegistry().updateProducerInfo(prodInfo);
modified = false;
}
@@ -514,6 +515,15 @@
public boolean isAlreadyExisting(String objectName)
{
- return registry.getConsumer(objectName) != null;
+ return getRegistry().getConsumer(objectName) != null;
}
+
+ public ConsumerRegistry getRegistry()
+ {
+ if (registry == null)
+ {
+ registry =
(ConsumerRegistry)ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(ConsumerRegistry.class);
+ }
+ return registry;
+ }
}
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java
===================================================================
---
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java 2010-01-28
10:43:54 UTC (rev 1458)
+++
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java 2010-01-28
13:10:29 UTC (rev 1459)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * 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.
@@ -23,6 +23,7 @@
package org.gatein.wsrp.admin.ui;
+import org.exoplatform.container.ExoContainerContext;
import org.gatein.common.util.ParameterValidation;
import org.gatein.pc.api.PortletInvokerException;
import org.gatein.wsrp.WSRPConsumer;
@@ -62,6 +63,10 @@
public ConsumerRegistry getRegistry()
{
+ if (registry == null)
+ {
+ registry =
(ConsumerRegistry)ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(ConsumerRegistry.class);
+ }
return registry;
}
@@ -83,22 +88,22 @@
public WSRPConsumer getSelectedConsumer()
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(selectedId,
"consumer id", null);
- return registry.getConsumer(selectedId);
+ return getRegistry().getConsumer(selectedId);
}
public boolean isConsumersEmpty()
{
- return registry.getConfiguredConsumers().isEmpty();
+ return getRegistry().getConfiguredConsumers().isEmpty();
}
public List<WSRPConsumer> getConsumers()
{
- return registry.getConfiguredConsumers();
+ return getRegistry().getConfiguredConsumers();
}
public String reload()
{
- registry.reloadConsumers();
+ getRegistry().reloadConsumers();
return CONSUMERS;
}
@@ -117,17 +122,17 @@
RefreshResult result = internalRefresh(consumer);
if (result != null && !result.hasIssues())
{
- registry.activateConsumerWith(selectedId);
+ getRegistry().activateConsumerWith(selectedId);
}
}
else
{
- registry.activateConsumerWith(selectedId);
+ getRegistry().activateConsumerWith(selectedId);
}
}
else
{
- registry.deactivateConsumerWith(selectedId);
+ getRegistry().deactivateConsumerWith(selectedId);
}
}
catch (Exception e)
@@ -152,7 +157,7 @@
try
{
- registry.registerOrDeregisterConsumerWith(selectedId, register);
+ getRegistry().registerOrDeregisterConsumerWith(selectedId, register);
// show consumer configuration
setConsumerIdInSession(false);
return CONFIGURE_CONSUMER;
@@ -177,7 +182,7 @@
{
try
{
- registry.createConsumer(selectedId, null, null);
+ getRegistry().createConsumer(selectedId, null, null);
setConsumerIdInSession(false);
return CONFIGURE_CONSUMER;
}
@@ -197,7 +202,7 @@
{
try
{
- registry.destroyConsumer(selectedId);
+ getRegistry().destroyConsumer(selectedId);
return listConsumers();
}
catch (Exception e)
@@ -259,18 +264,18 @@
beanContext.createErrorMessage(statusMessage);
// refresh had issues, we should deactivate this consumer
- registry.deactivateConsumerWith(consumer.getProducerId());
+ getRegistry().deactivateConsumerWith(consumer.getProducerId());
}
else
{
// activate the consumer if it's supposed to be active
if (consumer.isActive())
{
- registry.activateConsumerWith(consumer.getProducerId());
+ getRegistry().activateConsumerWith(consumer.getProducerId());
}
else
{
- registry.deactivateConsumerWith(consumer.getProducerId());
+ getRegistry().deactivateConsumerWith(consumer.getProducerId());
}
beanContext.createInfoMessage(statusMessage);
@@ -374,6 +379,6 @@
public boolean isAlreadyExisting(String objectName)
{
- return registry.getConsumer(objectName) != null;
+ return getRegistry().getConsumer(objectName) != null;
}
}
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java
===================================================================
---
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java 2010-01-28
10:43:54 UTC (rev 1458)
+++
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java 2010-01-28
13:10:29 UTC (rev 1459)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * 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.
@@ -23,6 +23,7 @@
package org.gatein.wsrp.admin.ui;
+import org.exoplatform.container.ExoContainerContext;
import org.gatein.registration.RegistrationPolicy;
import org.gatein.registration.policies.DefaultRegistrationPolicy;
import org.gatein.wsrp.producer.config.ProducerConfiguration;
@@ -56,6 +57,10 @@
public ProducerConfigurationService getConfigurationService()
{
+ if (configurationService == null)
+ {
+ configurationService =
(ProducerConfigurationService)ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(ProducerConfigurationService.class);
+ }
return configurationService;
}
@@ -66,7 +71,7 @@
public ProducerConfiguration getConfiguration()
{
- return configurationService.getConfiguration();
+ return getConfigurationService().getConfiguration();
}
public boolean isRegistrationRequiredForFullDescription()
@@ -175,7 +180,7 @@
{
getRegRequirements().reloadPolicyFrom(policyClassName, validatorClassName);
}
- configurationService.saveConfiguration();
+ getConfigurationService().saveConfiguration();
beanContext.createInfoMessage("bean_producer_save_success");
}
catch (Exception e)
@@ -190,7 +195,7 @@
{
try
{
- configurationService.reloadConfiguration();
+ getConfigurationService().reloadConfiguration();
beanContext.createInfoMessage("bean_producer_cancel_success");
}
catch (Exception e)
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/faces-config.xml 2010-01-28
10:43:54 UTC (rev 1458)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/faces-config.xml 2010-01-28
13:10:29 UTC (rev 1459)
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ 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.
@@ -30,11 +30,9 @@
<!-- Facelet portlet view handler-->
<application>
- <view-handler>
- org.jboss.portletbridge.application.PortletViewHandler
- </view-handler>
-
<navigation-handler>org.gatein.wsrp.admin.ui.RedirectOnNoConsumerNavigationHandler</navigation-handler>
+
<view-handler>org.jboss.portletbridge.application.PortletViewHandler</view-handler>
<state-manager>org.jboss.portletbridge.application.PortletStateManager</state-manager>
+
<navigation-handler>org.gatein.wsrp.admin.ui.RedirectOnNoConsumerNavigationHandler</navigation-handler>
<locale-config>
<default-locale>en</default-locale>
<supported-locale>fr</supported-locale>
Modified: components/wsrp/trunk/pom.xml
===================================================================
--- components/wsrp/trunk/pom.xml 2010-01-28 10:43:54 UTC (rev 1458)
+++ components/wsrp/trunk/pom.xml 2010-01-28 13:10:29 UTC (rev 1459)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ 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.
@@ -21,7 +21,8 @@
~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-->
-<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -46,9 +47,9 @@
</scm>
<properties>
- <version.gatein.pc>2.1.0-Beta02</version.gatein.pc>
- <version.gatein.common>2.0.0-CR1</version.gatein.common>
- <version.gatein.wci>2.0.0-Beta02</version.gatein.wci>
+ <version.gatein.pc>2.1.0-CR02</version.gatein.pc>
+ <version.gatein.common>2.0.0-CR03</version.gatein.common>
+ <version.gatein.wci>2.0.0-CR02</version.gatein.wci>
<version.jsf>1.2_12</version.jsf>
<version.apache.commons-fileupload>1.2.1</version.apache.commons-fileupload>
@@ -64,7 +65,7 @@
<dependency>
<groupId>org.gatein</groupId>
<artifactId>gatein-dep</artifactId>
- <version>1.0.0-Beta02</version>
+ <version>1.0.0-Beta03</version>
<type>pom</type>
<scope>import</scope>
</dependency>