gatein SVN: r5189 - in components/wsrp/trunk/admin-gui/src: main/webapp/WEB-INF/classes and 3 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-11-19 17:29:29 -0500 (Fri, 19 Nov 2010)
New Revision: 5189
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/BeanContext.java
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/JSFBeanContext.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/classes/Resource.properties
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/styles/style.css
components/wsrp/trunk/admin-gui/src/test/java/org/gatein/wsrp/other/ConsumerBeanTestCase.java
Log:
- GTNWSRP-168: Display WSDL address for producer (currently hardcodes context path and servlet path, though).
Modified: components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/BeanContext.java
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/BeanContext.java 2010-11-19 21:55:42 UTC (rev 5188)
+++ components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/BeanContext.java 2010-11-19 22:29:29 UTC (rev 5189)
@@ -81,6 +81,8 @@
protected abstract Locale getLocale();
+ public abstract String getServerAddress();
+
public void createErrorMessage(String localizedMessageId, Object... params)
{
createLocalizedMessage(STATUS, localizedMessageId, getErrorSeverity(), params);
Modified: components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/JSFBeanContext.java
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/JSFBeanContext.java 2010-11-19 21:55:42 UTC (rev 5188)
+++ components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/JSFBeanContext.java 2010-11-19 22:29:29 UTC (rev 5189)
@@ -23,12 +23,15 @@
package org.gatein.wsrp.admin.ui;
+import org.gatein.common.net.URLTools;
import org.gatein.common.util.ParameterValidation;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
+import javax.portlet.PortletRequest;
+import javax.servlet.http.HttpServletRequest;
import java.util.Locale;
import java.util.Map;
@@ -137,6 +140,28 @@
return getRequestLocale();
}
+ public String getServerAddress()
+ {
+ Object request = FacesContext.getCurrentInstance().getExternalContext().getRequest();
+ String serverAddress;
+ if (request instanceof PortletRequest)
+ {
+ // basically copy URLTools.getServerAddressFrom implementation
+ PortletRequest portletRequest = (PortletRequest)request;
+ String scheme = portletRequest.getScheme();
+ String host = portletRequest.getServerName();
+ int port = portletRequest.getServerPort();
+
+ return scheme + URLTools.SCH_END + host + URLTools.PORT_END + port;
+ }
+ else
+ {
+ serverAddress = URLTools.getServerAddressFrom((HttpServletRequest)request);
+ }
+
+ return serverAddress;
+ }
+
public static Locale getRequestLocale()
{
return FacesContext.getCurrentInstance().getExternalContext().getRequestLocale();
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-11-19 21:55:42 UTC (rev 5188)
+++ components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java 2010-11-19 22:29:29 UTC (rev 5189)
@@ -246,6 +246,16 @@
return registrationConfiguration;
}
+ public String getV1WSDL()
+ {
+ return beanContext.getServerAddress() + "/wsrp-producer/v1/MarkupService?wsdl";
+ }
+
+ public String getV2WSDL()
+ {
+ return beanContext.getServerAddress() + "/wsrp-producer/v2/MarkupService?wsdl";
+ }
+
private static class RegistrationConfiguration
{
private List<RegistrationPropertyDescription> registrationProperties;
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties 2010-11-19 21:55:42 UTC (rev 5188)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties 2010-11-19 22:29:29 UTC (rev 5189)
@@ -168,6 +168,8 @@
producer_config_add_reg_prop = Add property
producer_config_save = Save
producer_config_cancel = Cancel
+producer_config_wsdl_v1 = Producer WSDL address for WSRP v1:
+producer_config_wsdl_v2 = Producer WSDL address for WSRP v2:
## Localized messages in JSF beans
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties 2010-11-19 21:55:42 UTC (rev 5188)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties 2010-11-19 22:29:29 UTC (rev 5189)
@@ -180,4 +180,6 @@
edit_consumer_export_title=Portlets en export
edit_consumer_import=Importer portlets
edit_consumer_import_title=Portlets en import
-bean_consumermanager_refresh_failure_wsdl=Le rafra\u00eechissement a \u00e9chou\u00e9 (probablement \u00e0 cause d'URL WSDL non valide)
\ No newline at end of file
+bean_consumermanager_refresh_failure_wsdl=Le rafra\u00eechissement a \u00e9chou\u00e9 (probablement \u00e0 cause d'URL WSDL non valide)
+producer_config_wsdl_v1=Adresse WSDL pour le Producteur WSRP v1:
+producer_config_wsdl_v2=Adresse WSDL pour le Producteur WSRP v2:
\ No newline at end of file
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml 2010-11-19 21:55:42 UTC (rev 5188)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml 2010-11-19 22:29:29 UTC (rev 5189)
@@ -21,6 +21,8 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
+
+
<ui:decorate template="producerTemplate.xhtml" xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
@@ -31,6 +33,16 @@
<ui:param name="title" value="#{i18n.producer_config_title}"/>
<ui:define name="content">
+
+ <p id="producer-wsdl">
+ #{i1
+ 8n
+ .producer_config_wsdl_v1} <h:outputLink value="#{producer.v1WSDL}">#{producer.v1WSDL}</h:outputLink>
+ <br/>
+ #{i18n.producer_config_wsdl_v2} <h:outputLink value="#{producer.v2WSDL}">#{ .v
+ 2WSDL}</h:outputLink>
+ </p>
+
<h:form id="producer-form">
<h:panelGrid columns="2" width="100%">
<h:selectBooleanCheckbox id="cons-reg-req-check"
@@ -99,21 +111,28 @@
rowClasses="EvenRow,OddRow"
styleClass="UIGrid ConsumerGrid" width="100%">
<h:column>
- <f:facet name="header">#{i18n.producer_config_reg_prop_name}</f:facet>
+ <f:facet name="header">#{i18n.pro
+ e}</f:facet>
<h:inputText id="name" value="#{property.nameAsString}" size="21"/>
</h:column>
<h:column>
- <f:facet name="header">#{i18n.producer_config_reg_prop_type}</f:facet>
+ <f:facet name="header">#{i1
+ _p
+ rop_type}</f:facet>
<h:selectOneListbox id="producer-list" disabled="true">
<f:selectItems value="#{producer.supportedPropertyTypes}"/>
</h:selectOneListbox>
</h:column>
<h:column>
- <f:facet name="header">#{i18n.producer_config_reg_prop_label}</f:facet>
+ <f:facet name="header">#{i18
+ p_
+ label}</f:facet>
<h:inputText id="label" value="#{property.label}" size="21"/>
</h:column>
<h:column>
- <f:facet name="header">#{i18n.producer_config_reg_prop_hint}</f:facet>
+ <f:facet name="header">#{i1
+ op
+ _hint}</f:facet>
<h:inputText id="hint" value="#{property.hint}" size="21"/>
</h:column>
<h:column>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/styles/style.css
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/styles/style.css 2010-11-19 21:55:42 UTC (rev 5188)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/styles/style.css 2010-11-19 22:29:29 UTC (rev 5189)
@@ -412,3 +412,13 @@
width: 7%;
}
+.wsrp-consumers-ui #producer-wsdl {
+ border: 1px solid #fc6;
+ font-weight: bold;
+ color: #fff;
+ font-size: 11px;
+ background-color: #ffa200;
+ -moz-border-radius: 6px;
+ -webkit-border-radius: 6px;
+ padding: .5em;
+}
\ No newline at end of file
Modified: components/wsrp/trunk/admin-gui/src/test/java/org/gatein/wsrp/other/ConsumerBeanTestCase.java
===================================================================
--- components/wsrp/trunk/admin-gui/src/test/java/org/gatein/wsrp/other/ConsumerBeanTestCase.java 2010-11-19 21:55:42 UTC (rev 5188)
+++ components/wsrp/trunk/admin-gui/src/test/java/org/gatein/wsrp/other/ConsumerBeanTestCase.java 2010-11-19 22:29:29 UTC (rev 5189)
@@ -151,6 +151,11 @@
return Locale.getDefault();
}
+ public String getServerAddress()
+ {
+ throw new NotYetImplemented();
+ }
+
public Map<String, Object> getSessionMap()
{
throw new NotYetImplemented();
14 years, 1 month
gatein SVN: r5188 - components/wsrp/trunk/common/src/main/java/org/gatein/wsrp.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-11-19 16:55:42 -0500 (Fri, 19 Nov 2010)
New Revision: 5188
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/ResourceServingUtil.java
Log:
- GTNWSRP-146: Still need to replace the slashes (especially if they begin the portlet context) because otherwise the URL will be malformed to be interpreted by the servlet engine.
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/ResourceServingUtil.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/ResourceServingUtil.java 2010-11-19 18:59:55 UTC (rev 5187)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/ResourceServingUtil.java 2010-11-19 21:55:42 UTC (rev 5188)
@@ -57,6 +57,7 @@
private static final String WINDOW_STATE = "windowState";
private static final String RESOURCE_STATE = "resourceState";
private static final String NAV_STATE = "navState";
+ private static final String SLASH_REPLACEMENT = "__";
private static final String QMARK = "?";
public static GetResource decode(HttpServletRequest req)
@@ -158,12 +159,20 @@
private static String encode(org.gatein.pc.api.PortletContext portletContext)
{
String id = portletContext.getId();
-
+ if (id.startsWith(URLTools.SLASH))
+ {
+ id = id.replace(URLTools.SLASH, SLASH_REPLACEMENT);
+ }
return URLTools.encodeXWWWFormURL(id);
}
private static PortletContext decode(String encodedPortletContext)
{
+ if (encodedPortletContext.startsWith(SLASH_REPLACEMENT))
+ {
+ encodedPortletContext = encodedPortletContext.replace(SLASH_REPLACEMENT, URLTools.SLASH);
+ }
+
return WSRPTypeFactory.createPortletContext(URLTools.decodeXWWWFormURL(encodedPortletContext));
}
14 years, 1 month
gatein SVN: r5187 - components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-11-19 13:59:55 -0500 (Fri, 19 Nov 2010)
New Revision: 5187
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/InMemoryConsumerRegistry.java
Log:
- Fixed tests.
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/InMemoryConsumerRegistry.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/InMemoryConsumerRegistry.java 2010-11-19 18:57:09 UTC (rev 5186)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/InMemoryConsumerRegistry.java 2010-11-19 18:59:55 UTC (rev 5187)
@@ -23,6 +23,7 @@
package org.gatein.wsrp.consumer.registry;
+import org.gatein.pc.federation.impl.FederatingPortletInvokerService;
import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.migration.InMemoryMigrationService;
@@ -37,6 +38,7 @@
{
public InMemoryConsumerRegistry()
{
+ setFederatingPortletInvoker(new FederatingPortletInvokerService());
setMigrationService(new InMemoryMigrationService());
}
14 years, 2 months
gatein SVN: r5186 - in portal/trunk: component/wsrp/src/main/java/org/gatein/portal/wsrp and 1 other directories.
by do-not-reply@jboss.org
Author: mwringe
Date: 2010-11-19 13:57:09 -0500 (Fri, 19 Nov 2010)
New Revision: 5186
Modified:
portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java
portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/PortletExtraSerializer.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletManagement.java
Log:
GTNWSRP-162: move the FederatingPortletInvoker from the start of the PortletInvokerInterceptor to right before the producer gets called. This allows for things like ConsumerCaching to be available to the various portlet invokers included in the FederatingPortletInvoker.
Modified: portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java
===================================================================
--- portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java 2010-11-19 18:32:10 UTC (rev 5185)
+++ portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java 2010-11-19 18:57:09 UTC (rev 5186)
@@ -86,6 +86,10 @@
//Container Stack
ContainerPortletDispatcher portletContainerDispatcher = new ContainerPortletDispatcher();
+
+ // Federating portlet invoker
+ FederatingPortletInvoker federatingPortletInvoker = new FederatingPortletInvokerService();
+
EventPayloadInterceptor eventPayloadInterceptor = new EventPayloadInterceptor();
eventPayloadInterceptor.setNext(portletContainerDispatcher);
RequestAttributeConversationInterceptor requestAttributeConversationInterceptor =
@@ -129,26 +133,24 @@
// The producer portlet invoker
ProducerPortletInvoker producerPortletInvoker = new ProducerPortletInvoker();
producerPortletInvoker.setNext(containerPortletInvoker);
+ federatingPortletInvoker.registerInvoker(PortletInvoker.LOCAL_PORTLET_INVOKER_ID, producerPortletInvoker);
+
producerPortletInvoker.setPersistenceManager(producerPersistenceManager);
producerPortletInvoker.setStateManagementPolicy(producerStateManagementPolicy);
producerPortletInvoker.setStateConverter(producerStateConverter);
// The consumer portlet invoker
PortletCustomizationInterceptor portletCustomizationInterceptor = new PortletCustomizationInterceptor();
- portletCustomizationInterceptor.setNext(producerPortletInvoker);
+ portletCustomizationInterceptor.setNext(federatingPortletInvoker);
ConsumerCacheInterceptor consumerCacheInterceptor = new ConsumerCacheInterceptor();
consumerCacheInterceptor.setNext(portletCustomizationInterceptor);
PortletInvokerInterceptor consumerPortletInvoker = new PortletInvokerInterceptor();
consumerPortletInvoker.setNext(consumerCacheInterceptor);
- // Federating portlet invoker
- FederatingPortletInvoker federatingPortletInvoker = new FederatingPortletInvokerService();
+ // register federating portlet and consumerPortletInvoker invoker with container
+ container.registerComponentInstance(PortletInvoker.class, consumerPortletInvoker);
+ container.registerComponentInstance(FederatingPortletInvoker.class, federatingPortletInvoker);
- // register local portlet invoker with federating portlet invoker
- federatingPortletInvoker.registerInvoker(PortletInvoker.LOCAL_PORTLET_INVOKER_ID, consumerPortletInvoker);
- // register federating portlet invoker with container
- container.registerComponentInstance(PortletInvoker.class, federatingPortletInvoker);
-
portletApplicationRegistry.start();
}
Modified: portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java
===================================================================
--- portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java 2010-11-19 18:32:10 UTC (rev 5185)
+++ portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java 2010-11-19 18:57:09 UTC (rev 5186)
@@ -267,7 +267,7 @@
{
// retrieve federating portlet invoker from container
FederatingPortletInvoker federatingPortletInvoker =
- (FederatingPortletInvoker)container.getComponentInstanceOfType(PortletInvoker.class);
+ (FederatingPortletInvoker)container.getComponentInstanceOfType(FederatingPortletInvoker.class);
// add our Session event listener to the ListenerService for use in org.exoplatform.web.GenericHttpListener
ListenerService listenerService = (ListenerService)container.getComponentInstanceOfType(ListenerService.class);
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/PortletExtraSerializer.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/PortletExtraSerializer.java 2010-11-19 18:32:10 UTC (rev 5185)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/PortletExtraSerializer.java 2010-11-19 18:57:09 UTC (rev 5186)
@@ -44,7 +44,7 @@
public UIPortletManagement.PortletExtra read(PortletContext output) throws Exception
{
ExoContainer manager = ExoContainerContext.getCurrentContainer();
- FederatingPortletInvoker portletInvoker = (FederatingPortletInvoker)manager.getComponentInstance(PortletInvoker.class);
+ FederatingPortletInvoker portletInvoker = (FederatingPortletInvoker)manager.getComponentInstance(FederatingPortletInvoker.class);
Portlet portlet = portletInvoker.getPortlet(output);
return new UIPortletManagement.PortletExtra(portlet);
}
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java 2010-11-19 18:32:10 UTC (rev 5185)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java 2010-11-19 18:57:09 UTC (rev 5186)
@@ -186,7 +186,7 @@
ExoContainer manager = ExoContainerContext.getCurrentContainer();
FederatingPortletInvoker portletInvoker =
- (FederatingPortletInvoker)manager.getComponentInstance(PortletInvoker.class);
+ (FederatingPortletInvoker)manager.getComponentInstance(FederatingPortletInvoker.class);
Set<Portlet> portlets = remote ? portletInvoker.getRemotePortlets() : portletInvoker.getLocalPortlets();
List<Application> applications = new ArrayList<Application>(portlets.size());
for (Portlet portlet : portlets)
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletManagement.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletManagement.java 2010-11-19 18:32:10 UTC (rev 5185)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletManagement.java 2010-11-19 18:57:09 UTC (rev 5186)
@@ -100,7 +100,7 @@
ExoContainer manager = ExoContainerContext.getCurrentContainer();
FederatingPortletInvoker portletInvoker =
- (FederatingPortletInvoker)manager.getComponentInstance(PortletInvoker.class);
+ (FederatingPortletInvoker)manager.getComponentInstance(FederatingPortletInvoker.class);
boolean remote = REMOTE.equals(type);
Set<Portlet> portlets;
14 years, 2 months
gatein SVN: r5185 - components/wsrp/trunk/common/src/main/java/org/gatein/wsrp.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-11-19 13:32:10 -0500 (Fri, 19 Nov 2010)
New Revision: 5185
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/ResourceServingUtil.java
Log:
- Removed now unused constant.
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/ResourceServingUtil.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/ResourceServingUtil.java 2010-11-19 17:45:49 UTC (rev 5184)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/ResourceServingUtil.java 2010-11-19 18:32:10 UTC (rev 5185)
@@ -57,7 +57,6 @@
private static final String WINDOW_STATE = "windowState";
private static final String RESOURCE_STATE = "resourceState";
private static final String NAV_STATE = "navState";
- private static final String SLASH_REPLACEMENT = "__";
private static final String QMARK = "?";
public static GetResource decode(HttpServletRequest req)
14 years, 2 months
gatein SVN: r5184 - in portal/trunk: component/web/security/src/main/java/org/exoplatform/web/security/proxy and 3 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-11-19 12:45:49 -0500 (Fri, 19 Nov 2010)
New Revision: 5184
Added:
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/proxy/
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/proxy/ProxyFilterService.java
portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ProxyServletFilter.java
Modified:
portal/trunk/gadgets/server/src/main/webapp/WEB-INF/web.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml
Log:
GTNPORTAL-1647 : Domain based gadget proxy filtering
Added: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/proxy/ProxyFilterService.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/proxy/ProxyFilterService.java (rev 0)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/proxy/ProxyFilterService.java 2010-11-19 17:45:49 UTC (rev 5184)
@@ -0,0 +1,194 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.web.security.proxy;
+
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.container.xml.ValuesParam;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+
+import javax.servlet.http.HttpServletRequest;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.regex.Pattern;
+
+/**
+ * The proxy filter service is used for filtering http access when it is performed by GateIn.
+ * The following rules applies to the filtering:
+ *
+ * <ul>
+ * <li>Same host URI grants access</li>
+ * <li>A black list match of the host denies access</li>
+ * <li>A white list match of the host grants access</li>
+ * <li>Access is denied</li>
+ * </ul>
+ *
+ * The service is configured by
+ * <ul>
+ * <li>a <code>white-list</code> parameter that specifies a list of white list rules</li>
+ * <li>a <code>black-list</code> parameter that specifies a list of black list rules</li>
+ * </ul>
+ *
+ * Rules are trimmed and the wildcard character can be used to match any number of character.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class ProxyFilterService
+{
+
+ /** . */
+ private static final Logger log = LoggerFactory.getLogger(ProxyFilterService.class);
+
+ /** . */
+ private final List<Pattern> whiteList;
+
+ /** . */
+ private final List<Pattern> blackList;
+
+ public ProxyFilterService(InitParams params)
+ {
+ this.whiteList = createList(params.getValuesParam("white-list"));
+ this.blackList = createList(params.getValuesParam("black-list"));
+
+ // A bit of logging
+ log.debug("Proxy filter service white list " + whiteList);
+ log.debug("Proxy filter service black list " + blackList);
+ }
+
+ private List<Pattern> createList(ValuesParam values)
+ {
+ if (values != null)
+ {
+ ArrayList<Pattern> patterns = new ArrayList<Pattern>();
+ for (Object value : values.getValues())
+ {
+ String s = ((String)value).trim();
+ StringBuilder sb = new StringBuilder("^");
+ for (int i = 0;i < s.length();i++)
+ {
+ char c = s.charAt(i);
+ switch (c)
+ {
+ case '*':
+ sb.append(".*");
+ break;
+ case '[':
+ case '\\':
+ case '^':
+ case '$':
+ case '.':
+ case '|':
+ case '?':
+ case '+':
+ case '(':
+ case ')':
+ sb.append("\\");
+ sb.append(c);
+ break;
+ default:
+ sb.append(c);
+ break;
+ }
+ }
+ sb.append("$");
+ Pattern pattern = Pattern.compile(sb.toString());
+ patterns.add(pattern);
+ }
+ return Collections.unmodifiableList(patterns);
+ }
+ else
+ {
+ return Collections.emptyList();
+ }
+ }
+
+ /**
+ * Returns true if access to a remote URI should be granted.
+ *
+ * @param request the servlet request doing the request
+ * @param container the portal container associated with the request
+ * @param remoteURI the remote URI to check
+ * @return the access to the remote URI
+ */
+ public boolean accept(
+ HttpServletRequest request,
+ PortalContainer container,
+ URI remoteURI)
+ {
+ boolean trace = log.isTraceEnabled();
+
+ //
+ String remoteHost = remoteURI.getHost();
+
+ // Filter based on same server name
+ String remoteServerName = request.getServerName();
+ if (remoteHost.equals(remoteServerName))
+ {
+ if (trace)
+ {
+ log.trace("Same host matching for URI " + remoteURI);
+ }
+ return true;
+ }
+
+ // Otherwise go through black list first
+ for (int i = 0;i < blackList.size();i++)
+ {
+ Pattern pattern = blackList.get(i);
+ boolean rejected = pattern.matcher(remoteHost).matches();
+ if (trace)
+ {
+ log.trace("Black list " + pattern + (rejected ? " matched URI " : " did not match URI") + remoteURI);
+ }
+ if (rejected)
+ {
+ return false;
+ }
+ }
+
+ // Finally go through white list first
+ for (int i = 0;i < whiteList.size();i++)
+ {
+ Pattern pattern = whiteList.get(i);
+ boolean accepted = pattern.matcher(remoteHost).matches();
+ if (trace)
+ {
+ log.trace("White list " + pattern + (accepted ? " matched URI " : " did not match URI") + remoteURI);
+ }
+ if (accepted)
+ {
+ return true;
+ }
+ }
+
+ //
+ if (trace)
+ {
+ log.trace("Rejected implicitely uri " + remoteURI);
+ }
+
+ //
+ return false;
+ }
+}
Added: portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ProxyServletFilter.java
===================================================================
--- portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ProxyServletFilter.java (rev 0)
+++ portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ProxyServletFilter.java 2010-11-19 17:45:49 UTC (rev 5184)
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.portal.gadget.core;
+
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.web.security.proxy.ProxyFilterService;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.net.URI;
+
+/**
+ * The proxy servlet filter is a servlet filter placed in front of Shindig proxy servlet.
+ * It filters a request and allows only the request satisfying the following:
+ * <ul>
+ * <li>the request has an URL parameter</li>
+ * <li>the request can locate a container associated with the request</li>
+ * <li>the request can locate the {@link ProxyFilterService} within the container</li>
+ * <li>the method {@link ProxyFilterService#accept(HttpServletRequest, PortalContainer, URI)} invocation returns true</li>
+ * </ul>
+ *
+ * This service is located in front and does not use Shindig integration point (such as org.apache.shindig.gadgets.GadgetBlacklist}
+ * as the execution is performed by a thread that is not associated with the portal request precluding any access to
+ * information enabling contextual filtering.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class ProxyServletFilter implements Filter
+{
+
+ /** . */
+ private ServletContext ctx;
+
+ public void init(FilterConfig cfg) throws ServletException
+ {
+ this.ctx = cfg.getServletContext();
+ }
+
+ public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException
+ {
+ HttpServletRequest hreq = (HttpServletRequest)req;
+ HttpServletResponse hresp = (HttpServletResponse)resp;
+
+ // Get URL
+ String url = hreq.getParameter("url");
+ if (url == null)
+ {
+ hresp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "No URL");
+ }
+ else
+ {
+ // Get container
+ PortalContainer container = PortalContainer.getInstance(ctx);
+ if (container == null)
+ {
+ hresp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Could not access container for servlet context " + ctx.getContextPath());
+ }
+ else
+ {
+ ProxyFilterService service = (ProxyFilterService)container.getComponentInstanceOfType(ProxyFilterService.class);
+ if (service == null)
+ {
+ hresp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Could not access proxy filter service " + ctx.getContextPath());
+ }
+ else
+ {
+ URI uri = URI.create(url);
+ if (!service.accept(hreq, container, uri))
+ {
+ hresp.sendError(HttpServletResponse.SC_FORBIDDEN, "Gadget " + url + " is blacklisted");
+ }
+ else
+ {
+ chain.doFilter(req, resp);
+ }
+ }
+ }
+ }
+ }
+
+ public void destroy()
+ {
+ }
+}
Modified: portal/trunk/gadgets/server/src/main/webapp/WEB-INF/web.xml
===================================================================
--- portal/trunk/gadgets/server/src/main/webapp/WEB-INF/web.xml 2010-11-19 17:29:02 UTC (rev 5183)
+++ portal/trunk/gadgets/server/src/main/webapp/WEB-INF/web.xml 2010-11-19 17:45:49 UTC (rev 5184)
@@ -26,6 +26,9 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="Shindig"
version="2.5">
+
+ <display-name>eXoGadgetServer</display-name>
+
<!-- configuration -->
<!-- If you have your own Guice module(s), put them here as a colon-separated list. -->
<context-param>
@@ -44,6 +47,11 @@
<filter-name>authFilter</filter-name>
<filter-class>org.apache.shindig.auth.AuthenticationServletFilter</filter-class>
</filter>
+
+ <filter>
+ <filter-name>ProxyServletFilter</filter-name>
+ <filter-class>org.exoplatform.portal.gadget.core.ProxyServletFilter</filter-class>
+ </filter>
<filter-mapping>
<filter-name>authFilter</filter-name>
@@ -65,6 +73,11 @@
<url-pattern>/gadgets/api/rpc/*</url-pattern>
</filter-mapping>
+ <filter-mapping>
+ <filter-name>ProxyServletFilter</filter-name>
+ <servlet-name>proxy</servlet-name>
+ </filter-mapping>
+
<listener>
<listener-class>org.apache.shindig.common.servlet.GuiceServletContextListener</listener-class>
</listener>
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml 2010-11-19 17:29:02 UTC (rev 5183)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml 2010-11-19 17:45:49 UTC (rev 5184)
@@ -163,6 +163,23 @@
<type>org.exoplatform.groovyscript.text.TemplateService</type>
</component>
+ <component>
+ <key>org.exoplatform.web.security.proxy.ProxyFilterService</key>
+ <type>org.exoplatform.web.security.proxy.ProxyFilterService</type>
+ <init-params>
+ <values-param>
+ <!-- The white list -->
+ <name>white-list</name>
+ <!-- We accept anything not black listed -->
+ <value>*</value>
+ </values-param>
+ <values-param>
+ <name>black-list</name>
+ <value>*.evil.org</value>
+ </values-param>
+ </init-params>
+ </component>
+
<external-component-plugins>
<target-component>org.exoplatform.services.cache.ExoCacheFactory</target-component>
<component-plugin>
14 years, 2 months
gatein SVN: r5183 - components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-11-19 12:29:02 -0500 (Fri, 19 Nov 2010)
New Revision: 5183
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java
Log:
- GTNWSRP-166: The FederatingPortletInvoker wasn't properly updated when a producer's id was changed. Not sure how we never realized that before, kudos to Michal for exposing the issue! :)
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java 2010-11-19 14:26:10 UTC (rev 5182)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java 2010-11-19 17:29:02 UTC (rev 5183)
@@ -252,7 +252,15 @@
if (oldId != null)
{
remove(getConsumer(oldId));
- createConsumerFrom(producerInfo);
+ WSRPConsumer consumer = createConsumerFrom(producerInfo);
+
+ // update the federating portlet invoker:
+ FederatedPortletInvoker invoker = federatingPortletInvoker.getFederatedInvoker(oldId);
+ if (invoker != null)
+ {
+ federatingPortletInvoker.unregisterInvoker(oldId);
+ federatingPortletInvoker.registerInvoker(producerInfo.getId(), consumer);
+ }
}
}
14 years, 2 months
gatein SVN: r5182 - portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-11-19 09:26:10 -0500 (Fri, 19 Nov 2010)
New Revision: 5182
Modified:
portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java
Log:
- GTNPORTAL-1663: Use the complete portlet context instead of just the portlet name to avoid collisions when creating content.
Modified: portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java
===================================================================
--- portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java 2010-11-19 14:10:00 UTC (rev 5181)
+++ portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java 2010-11-19 14:26:10 UTC (rev 5182)
@@ -428,7 +428,7 @@
{
PortletInfo info = portlet.getInfo();
String portletApplicationName = info.getApplicationName();
- String portletName = info.getName();
+ String portletName = portlet.getContext().getId();
// Need to sanitize portlet and application names in case they contain characters that would
// cause an improper Application name
14 years, 2 months
gatein SVN: r5181 - components/wsrp/trunk/common/src/main/java/org/gatein/wsrp.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-11-19 09:10:00 -0500 (Fri, 19 Nov 2010)
New Revision: 5181
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/ResourceServingUtil.java
Log:
- GTNWSRP-167: Encode portlet context and instance key, since they can have a space in them, causing an issue when building the URL.
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/ResourceServingUtil.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/ResourceServingUtil.java 2010-11-19 13:44:36 UTC (rev 5180)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/ResourceServingUtil.java 2010-11-19 14:10:00 UTC (rev 5181)
@@ -77,7 +77,7 @@
registrationContext = WSRPTypeFactory.createRegistrationContext(registrationHandle);
}
- String instanceKey = req.getParameter(INSTANCE_KEY);
+ String instanceKey = URLTools.decodeXWWWFormURL(req.getParameter(INSTANCE_KEY));
String ns = req.getParameter(NS);
RuntimeContext runtimeContext = WSRPTypeFactory.createRuntimeContext(WSRPConstants.NONE_USER_AUTHENTICATION, instanceKey, ns);
@@ -106,9 +106,14 @@
try
{
StringBuilder sb = new StringBuilder(createAbsoluteURLFrom(resourceId, serverAddress, portletContext));
- appendParameter(sb, MODE, mode.toString());
- appendParameter(sb, WINDOW_STATE, windowState.toString());
- appendParameter(sb, INSTANCE_KEY, context.getValueFor(WSRPPortletURL.URLContext.INSTANCE_KEY));
+ appendParameter(sb, MODE, mode);
+ appendParameter(sb, WINDOW_STATE, windowState);
+
+ // instance key can contain a space if it's based on the portlet context so we need to also encode it
+ String instanceKey = (String)context.getValueFor(WSRPPortletURL.URLContext.INSTANCE_KEY);
+ instanceKey = URLTools.encodeXWWWFormURL(instanceKey);
+ appendParameter(sb, INSTANCE_KEY, instanceKey);
+
appendParameter(sb, NS, context.getValueFor(WSRPPortletURL.URLContext.NAMESPACE));
appendParameter(sb, REG_HANDLE, context.getValueFor(WSRPPortletURL.URLContext.REGISTRATION_HANDLE));
if (resourceState != null)
@@ -154,21 +159,13 @@
private static String encode(org.gatein.pc.api.PortletContext portletContext)
{
String id = portletContext.getId();
- if (id.startsWith(URLTools.SLASH))
- {
- id = id.replace(URLTools.SLASH, SLASH_REPLACEMENT);
- }
- return id;
+
+ return URLTools.encodeXWWWFormURL(id);
}
private static PortletContext decode(String encodedPortletContext)
{
- if (encodedPortletContext.startsWith(SLASH_REPLACEMENT))
- {
- encodedPortletContext = encodedPortletContext.replace(SLASH_REPLACEMENT, URLTools.SLASH);
- }
-
- return WSRPTypeFactory.createPortletContext(encodedPortletContext);
+ return WSRPTypeFactory.createPortletContext(URLTools.decodeXWWWFormURL(encodedPortletContext));
}
private static void appendParameter(StringBuilder builder, String name, Object value)
14 years, 2 months
gatein SVN: r5180 - in portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer: mapping and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-11-19 08:44:36 -0500 (Fri, 19 Nov 2010)
New Revision: 5180
Modified:
portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/JCRConsumerRegistry.java
portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/mapping/ProducerInfosMapping.java
Log:
- GTNWSRP-166: Renaming a consumer now properly changes the JCR path so that it can be properly deleted. Thanks to Julien for the Map trick! :)
- Added exceptions if something doesn't go well in save and delete methods.
Modified: portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/JCRConsumerRegistry.java
===================================================================
--- portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/JCRConsumerRegistry.java 2010-11-19 13:36:41 UTC (rev 5179)
+++ portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/JCRConsumerRegistry.java 2010-11-19 13:44:36 UTC (rev 5180)
@@ -34,6 +34,7 @@
import org.gatein.portal.wsrp.state.consumer.mapping.RegistrationPropertyMapping;
import org.gatein.portal.wsrp.state.mapping.RegistrationPropertyDescriptionMapping;
import org.gatein.wsrp.WSRPConsumer;
+import org.gatein.wsrp.consumer.ConsumerException;
import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.registry.AbstractConsumerRegistry;
import org.gatein.wsrp.consumer.registry.xml.XMLConsumerRegistry;
@@ -42,6 +43,7 @@
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
@@ -83,15 +85,18 @@
}
catch (Exception e)
{
- e.printStackTrace(); // todo: fix me
persister.closeSession(false);
+ throw new ConsumerException(messageOnError, e);
}
}
@Override
protected void delete(ProducerInfo info)
{
- persister.delete(info, this);
+ if (!persister.delete(info, this))
+ {
+ throw new ConsumerException("Couldn't delete ProducerInfo " + info);
+ }
}
@Override
@@ -106,9 +111,12 @@
String oldId;
String newId;
+ boolean idUnchanged;
+
+ ChromatticSession session = persister.getSession();
+
synchronized (this)
{
- ChromatticSession session = persister.getSession();
ProducerInfoMapping pim = session.findById(ProducerInfoMapping.class, key);
if (pim == null)
{
@@ -118,11 +126,20 @@
newId = producerInfo.getId();
pim.initFrom(producerInfo);
+ idUnchanged = oldId.equals(newId);
+
+ if (!idUnchanged)
+ {
+ ProducerInfosMapping pims = getProducerInfosMapping(session);
+ Map<String,ProducerInfoMapping> nameToProducerInfoMap = pims.getNameToProducerInfoMap();
+ nameToProducerInfoMap.put(pim.getId(), pim);
+ }
+
persister.closeSession(true);
}
// if the consumer's id has changed, return the old one so that state can be updated
- return (oldId.equals(newId)) ? null : oldId;
+ return idUnchanged ? null : oldId;
}
@Override
Modified: portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/mapping/ProducerInfosMapping.java
===================================================================
--- portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/mapping/ProducerInfosMapping.java 2010-11-19 13:36:41 UTC (rev 5179)
+++ portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/mapping/ProducerInfosMapping.java 2010-11-19 13:44:36 UTC (rev 5180)
@@ -28,6 +28,7 @@
import org.chromattic.api.annotations.OneToMany;
import java.util.List;
+import java.util.Map;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
@@ -41,6 +42,9 @@
@OneToMany
public abstract List<ProducerInfoMapping> getProducerInfos();
+ @OneToMany
+ public abstract Map<String, ProducerInfoMapping> getNameToProducerInfoMap();
+
@Create
public abstract ProducerInfoMapping createProducerInfo(String producerId);
}
14 years, 2 months