Author: chris.laprun(a)jboss.com
Date: 2009-08-23 07:22:33 -0400 (Sun, 23 Aug 2009)
New Revision: 13783
Added:
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/registration/
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/registration/ValueChangeListener.java
jbossexo/modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/classes/
jbossexo/modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/classes/wshandlers.xml
Removed:
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/registration/
Modified:
jbossexo/modules/wsrp/trunk/common/pom.xml
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/UserContextConverter.java
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/WSRPUtils.java
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/handler/WSRPExtensionHandler.java
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/registration/RegistrationPropertyDescription.java
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/MarkupEndpoint.java
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/PortletManagementEndpoint.java
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/RegistrationEndpoint.java
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/ServiceDescriptionEndpoint.java
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerRegistrationRequirements.java
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
Log:
- Moved WSRPExtensionHandler to JAX-WS, lost ability to configure handler.
- Moved registration package from producer to common as it is also needed by GUI, removed
dependency on producer classes.
- Removed common dependency on JAX-RPC.
- Added @HandlerChain annotations to endpoints.
Modified: jbossexo/modules/wsrp/trunk/common/pom.xml
===================================================================
--- jbossexo/modules/wsrp/trunk/common/pom.xml 2009-08-22 05:08:00 UTC (rev 13782)
+++ jbossexo/modules/wsrp/trunk/common/pom.xml 2009-08-23 11:22:33 UTC (rev 13783)
@@ -60,6 +60,11 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.portal.registration</groupId>
+ <artifactId>registration-api</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${version.slf4j}</version>
@@ -71,12 +76,6 @@
<version>${version.jbossxb}</version>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>javax.xml</groupId>
- <artifactId>jaxrpc-api</artifactId>
- <version>${version.jaxrpc}</version>
- <scope>provided</scope>
- </dependency>
</dependencies>
<build>
Modified:
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/UserContextConverter.java
===================================================================
---
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/UserContextConverter.java 2009-08-22
05:08:00 UTC (rev 13782)
+++
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/UserContextConverter.java 2009-08-23
11:22:33 UTC (rev 13783)
@@ -62,15 +62,15 @@
return new WSRPMappedUserContext(userContext, desiredLocales, preferredLocale);
}
- /*public static org.oasis.wsrp.v1.UserContext createWSRPUserContextFrom(UserContext
userContext,
+ public static org.oasis.wsrp.v1.UserContext createWSRPUserContextFrom(UserContext
userContext,
String
userContextKey,
- String[]
userCategories)
+
List<String> userCategories)
{
org.oasis.wsrp.v1.UserContext wsrpUserContext =
WSRPTypeFactory.createUserContext(userContextKey);
wsrpUserContext.setProfile(createUserProfileFrom(userContext));
wsrpUserContext.getUserCategories().addAll(userCategories);
return wsrpUserContext;
- }*/
+ }
private static UserProfile createUserProfileFrom(UserContext userContext)
{
Modified:
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/WSRPUtils.java
===================================================================
---
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/WSRPUtils.java 2009-08-22
05:08:00 UTC (rev 13782)
+++
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/WSRPUtils.java 2009-08-23
11:22:33 UTC (rev 13783)
@@ -33,17 +33,20 @@
import org.jboss.portal.portlet.api.PortletURL;
import org.jboss.portal.portlet.api.RenderURL;
import org.jboss.portal.portlet.api.state.AccessMode;
+import org.jboss.portal.wsrp.registration.LocalizedString;
+import org.jboss.portal.wsrp.registration.RegistrationPropertyDescription;
import org.oasis.wsrp.v1.InteractionParams;
import org.oasis.wsrp.v1.MarkupParams;
import org.oasis.wsrp.v1.NamedString;
+import org.oasis.wsrp.v1.PropertyDescription;
import org.oasis.wsrp.v1.StateChange;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -238,16 +241,14 @@
return authType;
}
- public static String[] convertLocalesToRFC3066LanguageTagArray(List
localesOrderedByPreference)
+ public static List<String>
convertLocalesToRFC3066LanguageTags(List<Locale> localesOrderedByPreference)
{
ParameterValidation.throwIllegalArgExceptionIfNull(localesOrderedByPreference,
SET_OF_LOCALES);
- String[] desiredLocales = new String[localesOrderedByPreference.size()];
- int i = 0;
- for (Iterator iterator = localesOrderedByPreference.iterator(); iterator.hasNext();
i++)
+ List<String> desiredLocales = new
ArrayList<String>(localesOrderedByPreference.size());
+ for (Locale locale : localesOrderedByPreference)
{
- Locale locale = (Locale)iterator.next();
- desiredLocales[i] = toString(locale);
+ desiredLocales.add(toString(locale));
}
return desiredLocales;
}
@@ -265,6 +266,16 @@
return context;
}
+ public static PortletContext convertToPortalPortletContext(String portletHandle,
byte[] state)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(portletHandle,
"portlet handle", "PortletContext");
+
+ PortletContext context;
+ context = PortletContext.createPortletContext(portletHandle, state);
+
+ return context;
+ }
+
/**
* @param portletContext
* @return Since 2.6
@@ -380,4 +391,56 @@
}
return null;
}
+
+ /**
+ * @param propertyDescription
+ * @return
+ * @since 2.6
+ */
+ public static RegistrationPropertyDescription
convertToRegistrationPropertyDescription(PropertyDescription propertyDescription)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(propertyDescription,
"PropertyDescription");
+ RegistrationPropertyDescription desc = new
RegistrationPropertyDescription(propertyDescription.getName(),
+ propertyDescription.getType());
+ desc.setLabel(getLocalizedStringOrNull(propertyDescription.getLabel()));
+ desc.setHint(getLocalizedStringOrNull(propertyDescription.getHint()));
+
+ return desc;
+ }
+
+ private static LocalizedString
getLocalizedStringOrNull(org.oasis.wsrp.v1.LocalizedString wsrpLocalizedString)
+ {
+ if (wsrpLocalizedString == null)
+ {
+ return null;
+ }
+ else
+ {
+ return convertToLocalizedString(wsrpLocalizedString);
+ }
+ }
+
+ /**
+ * @param wsrpLocalizedString
+ * @return
+ * @since 2.6
+ */
+ public static LocalizedString
convertToLocalizedString(org.oasis.wsrp.v1.LocalizedString wsrpLocalizedString)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(wsrpLocalizedString, "WSRP
LocalizedString");
+ String lang = wsrpLocalizedString.getLang();
+ Locale locale;
+ if (lang == null)
+ {
+ locale = Locale.getDefault();
+ }
+ else
+ {
+ locale = getLocale(lang);
+ }
+
+ LocalizedString localizedString = new
LocalizedString(wsrpLocalizedString.getValue(), locale);
+ localizedString.setResourceName(wsrpLocalizedString.getResourceName());
+ return localizedString;
+ }
}
Modified:
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/handler/WSRPExtensionHandler.java
===================================================================
---
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/handler/WSRPExtensionHandler.java 2009-08-22
05:08:00 UTC (rev 13782)
+++
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/handler/WSRPExtensionHandler.java 2009-08-23
11:22:33 UTC (rev 13783)
@@ -28,58 +28,52 @@
import org.w3c.dom.NodeList;
import javax.xml.namespace.QName;
-import javax.xml.rpc.handler.GenericHandler;
-import javax.xml.rpc.handler.HandlerInfo;
-import javax.xml.rpc.handler.MessageContext;
-import javax.xml.rpc.handler.soap.SOAPMessageContext;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import java.util.Set;
/**
- * JAX-RPC Handler that strips the SOAP Message of any WSRP extensions.
+ * JAX-WS Handler that strips the SOAP Message of any WSRP extensions.
*
* @author <a href="mailto:Anil.Saldhana@jboss.org">Anil
Saldhana</a>
* @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
* @version $Revision: 12277 $
* @since 2.4 (Apr 26, 2006)
*/
-public class WSRPExtensionHandler extends GenericHandler
+public class WSRPExtensionHandler implements SOAPHandler<SOAPMessageContext>
{
private static Logger log = LoggerFactory.getLogger(WSRPExtensionHandler.class);
private boolean debug = false;
- private boolean removeExtensions = false;
+ private boolean removeExtensions = true;
private static final String EXTENSIONS = "extensions";
- public void init(HandlerInfo info)
+ public boolean handleMessage(SOAPMessageContext messageContext)
{
- // this parameter configured in 'webservices.xml' or
'application-client.xml'
- String debugStr = (String)info.getHandlerConfig().get("debug");
- debug = "true".equalsIgnoreCase(debugStr);
- String rem = (String)info.getHandlerConfig().get("removeExtensions");
- removeExtensions = "true".equalsIgnoreCase(rem);
+ removeExtensions(messageContext);
+ return true;
}
- public QName[] getHeaders()
+ public boolean handleFault(SOAPMessageContext messageContext)
{
- return null;
+ return true;
}
- public boolean handleResponse(MessageContext messageContext)
+ public void close(MessageContext messageContext)
{
- removeExtensions(messageContext);
- return super.handleResponse(messageContext);
+ // nothing to do
}
- public boolean handleRequest(MessageContext messageContext)
+ public Set<QName> getHeaders()
{
- removeExtensions(messageContext);
- return super.handleRequest(messageContext);
+ return null;
}
- private void removeExtensions(MessageContext msgContext)
+ private void removeExtensions(SOAPMessageContext msgContext)
{
- SOAPMessageContext soapMessageContext = (SOAPMessageContext)msgContext;
- SOAPMessage soapMessage = soapMessageContext.getMessage();
+ SOAPMessage soapMessage = msgContext.getMessage();
try
{
if (debug)
Copied:
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/registration (from
rev 13778,
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/registration)
Modified:
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/registration/RegistrationPropertyDescription.java
===================================================================
---
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/registration/RegistrationPropertyDescription.java 2009-08-19
08:41:08 UTC (rev 13778)
+++
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/registration/RegistrationPropertyDescription.java 2009-08-23
11:22:33 UTC (rev 13783)
@@ -25,7 +25,6 @@
import org.jboss.portal.common.util.ParameterValidation;
import org.jboss.portal.registration.PropertyDescription;
-import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequirements;
import javax.xml.namespace.QName;
import java.net.URI;
@@ -50,7 +49,7 @@
private String[] usages;
private QName[] aliases;
- private transient ProducerRegistrationRequirements parent;
+ private transient ValueChangeListener valueChangeListener;
public RegistrationPropertyDescription(QName name, QName type)
{
@@ -103,7 +102,7 @@
System.arraycopy(other.usages, 0, usages, 0, other.usages.length);
}
- parent = other.parent;
+// valueChangeListener = other.valueChangeListener;
}
@@ -171,10 +170,9 @@
{
QName oldName = this.name;
this.name = name;
- if (parent != null)
+ if (valueChangeListener != null)
{
- parent.notifyRegistrationPropertyChangeListeners();
- parent.propertyHasBeenRenamed(this, oldName);
+ valueChangeListener.valueHasChanged(this, oldName, name, true);
}
}
}
@@ -290,6 +288,7 @@
{
if (!Arrays.equals(this.usages, usages))
{
+ notifyParentOfChangeIfNeeded(this.usages, usages);
if (usages != null)
{
this.usages = new String[usages.length];
@@ -299,7 +298,6 @@
{
this.usages = null;
}
- notifyParentOfChangeIfNeeded();
}
}
@@ -312,6 +310,7 @@
{
if (!Arrays.equals(this.aliases, aliases))
{
+ notifyParentOfChangeIfNeeded(this.aliases, aliases);
if (aliases != null)
{
this.aliases = new QName[aliases.length];
@@ -321,20 +320,19 @@
{
this.aliases = null;
}
- notifyParentOfChangeIfNeeded();
}
}
- public void setParent(ProducerRegistrationRequirements requirements)
+ public void setValueChangeListener(ValueChangeListener listener)
{
- this.parent = requirements;
+ this.valueChangeListener = listener;
}
- private void notifyParentOfChangeIfNeeded()
+ private void notifyParentOfChangeIfNeeded(Object oldValue, Object newValue)
{
- if (parent != null)
+ if (valueChangeListener != null)
{
- parent.notifyRegistrationPropertyChangeListeners();
+ valueChangeListener.valueHasChanged(this, oldValue, newValue, false);
}
}
@@ -342,8 +340,8 @@
{
if (valueWillBeUpdated(oldValue, newValue))
{
+ notifyParentOfChangeIfNeeded(oldValue, newValue);
oldValue = newValue;
- notifyParentOfChangeIfNeeded();
}
return oldValue;
Added:
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/registration/ValueChangeListener.java
===================================================================
---
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/registration/ValueChangeListener.java
(rev 0)
+++
jbossexo/modules/wsrp/trunk/common/src/main/java/org/jboss/portal/wsrp/registration/ValueChangeListener.java 2009-08-23
11:22:33 UTC (rev 13783)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2009, 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.portal.wsrp.registration;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public interface ValueChangeListener
+{
+ void valueHasChanged(RegistrationPropertyDescription originating, Object oldValue,
Object newValue, boolean isName);
+}
Modified:
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/MarkupEndpoint.java
===================================================================
---
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/MarkupEndpoint.java 2009-08-22
05:08:00 UTC (rev 13782)
+++
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/MarkupEndpoint.java 2009-08-23
11:22:33 UTC (rev 13783)
@@ -56,6 +56,7 @@
import org.oasis.wsrp.v1.UserContext;
import org.oasis.wsrp.v1.WSRPV1MarkupPortType;
+import javax.jws.HandlerChain;
import javax.jws.WebParam;
import javax.xml.ws.Holder;
import java.util.List;
@@ -74,6 +75,7 @@
wsdlLocation = "/WEB-INF/wsdl/wsrp_services.wsdl",
endpointInterface = "org.oasis.wsrp.v1.WSRPV1MarkupPortType"
)
+@HandlerChain(file = "wshandlers.xml")
public class MarkupEndpoint extends WSRPBaseEndpoint implements WSRPV1MarkupPortType
{
public void performBlockingInteraction(
Modified:
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/PortletManagementEndpoint.java
===================================================================
---
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/PortletManagementEndpoint.java 2009-08-22
05:08:00 UTC (rev 13782)
+++
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/PortletManagementEndpoint.java 2009-08-23
11:22:33 UTC (rev 13783)
@@ -52,6 +52,7 @@
import org.oasis.wsrp.v1.UserContext;
import org.oasis.wsrp.v1.WSRPV1PortletManagementPortType;
+import javax.jws.HandlerChain;
import javax.jws.WebParam;
import javax.xml.ws.Holder;
import java.util.List;
@@ -69,6 +70,7 @@
wsdlLocation = "/WEB-INF/wsdl/wsrp_services.wsdl",
endpointInterface = "org.oasis.wsrp.v1.WSRPV1PortletManagementPortType"
)
+@HandlerChain(file = "wshandlers.xml")
public class PortletManagementEndpoint extends WSRPBaseEndpoint implements
WSRPV1PortletManagementPortType
{
public void getPortletPropertyDescription(
Modified:
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/RegistrationEndpoint.java
===================================================================
---
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/RegistrationEndpoint.java 2009-08-22
05:08:00 UTC (rev 13782)
+++
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/RegistrationEndpoint.java 2009-08-23
11:22:33 UTC (rev 13783)
@@ -34,6 +34,7 @@
import org.oasis.wsrp.v1.RegistrationState;
import org.oasis.wsrp.v1.WSRPV1RegistrationPortType;
+import javax.jws.HandlerChain;
import javax.jws.WebParam;
import javax.xml.ws.Holder;
import java.util.List;
@@ -51,6 +52,7 @@
wsdlLocation = "/WEB-INF/wsdl/wsrp_services.wsdl",
endpointInterface = "org.oasis.wsrp.v1.WSRPV1RegistrationPortType"
)
+@HandlerChain(file = "wshandlers.xml")
public class RegistrationEndpoint extends WSRPBaseEndpoint implements
WSRPV1RegistrationPortType
{
Modified:
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/ServiceDescriptionEndpoint.java
===================================================================
---
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/ServiceDescriptionEndpoint.java 2009-08-22
05:08:00 UTC (rev 13782)
+++
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/endpoints/ServiceDescriptionEndpoint.java 2009-08-23
11:22:33 UTC (rev 13783)
@@ -36,6 +36,7 @@
import org.oasis.wsrp.v1.ServiceDescription;
import org.oasis.wsrp.v1.WSRPV1ServiceDescriptionPortType;
+import javax.jws.HandlerChain;
import javax.jws.WebParam;
import javax.xml.ws.Holder;
import java.util.List;
@@ -53,6 +54,7 @@
wsdlLocation = "/WEB-INF/wsdl/wsrp_services.wsdl",
endpointInterface = "org.oasis.wsrp.v1.WSRPV1ServiceDescriptionPortType"
)
+@HandlerChain(file = "wshandlers.xml")
public class ServiceDescriptionEndpoint extends WSRPBaseEndpoint implements
WSRPV1ServiceDescriptionPortType
{
public void getServiceDescription(
Modified:
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerRegistrationRequirements.java
===================================================================
---
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerRegistrationRequirements.java 2009-08-22
05:08:00 UTC (rev 13782)
+++
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerRegistrationRequirements.java 2009-08-23
11:22:33 UTC (rev 13783)
@@ -27,6 +27,7 @@
import org.jboss.portal.registration.RegistrationPolicyChangeListener;
import org.jboss.portal.registration.RegistrationPropertyChangeListener;
import org.jboss.portal.wsrp.registration.RegistrationPropertyDescription;
+import org.jboss.portal.wsrp.registration.ValueChangeListener;
import javax.xml.namespace.QName;
import java.util.Map;
@@ -37,7 +38,7 @@
* @version $Revision:5865 $
* @since 2.6
*/
-public interface ProducerRegistrationRequirements
+public interface ProducerRegistrationRequirements extends ValueChangeListener
{
String DEFAULT_POLICY_CLASS_NAME =
"org.jboss.portal.registration.policies.DefaultRegistrationPolicy";
String DEFAULT_VALIDATOR_CLASS_NAME =
"org.jboss.portal.registration.policies.DefaultRegistrationPropertyValidator";
Modified:
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
===================================================================
---
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java 2009-08-22
05:08:00 UTC (rev 13782)
+++
jbossexo/modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java 2009-08-23
11:22:33 UTC (rev 13783)
@@ -113,7 +113,7 @@
ParameterValidation.throwIllegalArgExceptionIfNull(name, "Property
name");
registrationProperties.put(name, propertyDescription);
- propertyDescription.setParent(this);
+ propertyDescription.setValueChangeListener(this);
notifyRegistrationPropertyChangeListeners();
}
@@ -177,6 +177,19 @@
}
/*
+ * == ValueChangeListener implementation
+ */
+
+ public void valueHasChanged(RegistrationPropertyDescription originatingProperty,
Object oldValue, Object newValue, boolean isName)
+ {
+ notifyRegistrationPropertyChangeListeners();
+ if (isName && oldValue instanceof QName)
+ {
+ propertyHasBeenRenamed(originatingProperty, (QName)oldValue);
+ }
+ }
+
+ /*
* == RegistrationPropertyChangeListeners handling ==
*/
Added:
jbossexo/modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/classes/wshandlers.xml
===================================================================
--- jbossexo/modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/classes/wshandlers.xml
(rev 0)
+++
jbossexo/modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/classes/wshandlers.xml 2009-08-23
11:22:33 UTC (rev 13783)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<!--
+ ~ JBoss, a division of Red Hat
+ ~ Copyright 2009, 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.
+ -->
+<javaee:handler-chains
xmlns:javaee="http://java.sun.com/xml/ns/javaee"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/javaee_web_services_metadata_handler_2_...
+ <javaee:handler-chain>
+ <javaee:handler>
+ <javaee:handler-name>WSRP Extension Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.portal.wsrp.handler.WSRPExtensionHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+</javaee:handler-chains>