Author: chris.laprun(a)jboss.com
Date: 2010-10-18 14:24:54 -0400 (Mon, 18 Oct 2010)
New Revision: 4717
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/RegistrationInfoTestCase.java
Log:
- GTNWSRP-104: add version of WSRP to consumer name.
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java 2010-10-18
16:10:12 UTC (rev 4716)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java 2010-10-18
18:24:54 UTC (rev 4717)
@@ -24,6 +24,7 @@
package org.gatein.wsrp.consumer;
import org.gatein.common.util.ParameterValidation;
+import org.gatein.common.util.Version;
import org.gatein.pc.api.PortletInvokerException;
import org.gatein.wsrp.WSRPConstants;
import org.gatein.wsrp.WSRPTypeFactory;
@@ -419,7 +420,9 @@
// if we were previously undetermined, become determined! :)
if (isUndetermined())
{
- setConsumerName(WSRPConstants.DEFAULT_CONSUMER_NAME);
+ Version version = parent.getEndpointConfigurationInfo().getWSRPVersion();
+ String versionInfo = version != null ? " WSRP v" +
version.getMajor() + " version" : " unknown WSRP version";
+ setConsumerName(WSRPConstants.DEFAULT_CONSUMER_NAME + versionInfo);
}
// get a service description if we don't already have one
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/RegistrationInfoTestCase.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/RegistrationInfoTestCase.java 2010-10-18
16:10:12 UTC (rev 4716)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/RegistrationInfoTestCase.java 2010-10-18
18:24:54 UTC (rev 4717)
@@ -50,7 +50,8 @@
protected void setUp() throws Exception
{
- info = new RegistrationInfo();
+ ProducerInfo pi = new ProducerInfo();
+ info = pi.getRegistrationInfo();
}
public void testInitialState()
Show replies by date