gatein SVN: r4695 - exo/portal/branches/3.1.x/packaging/pkg.
by do-not-reply@jboss.org
Author: dbaeli
Date: 2010-10-15 19:20:43 -0400 (Fri, 15 Oct 2010)
New Revision: 4695
Modified:
exo/portal/branches/3.1.x/packaging/pkg/pom.xml
Log:
EXOGTN-106 do not use exopackager 1.0.0-CR03-PLF-SNAPSHOT yet, it's not in maven ( EXOGTN-108 expected )
Modified: exo/portal/branches/3.1.x/packaging/pkg/pom.xml
===================================================================
--- exo/portal/branches/3.1.x/packaging/pkg/pom.xml 2010-10-15 23:13:19 UTC (rev 4694)
+++ exo/portal/branches/3.1.x/packaging/pkg/pom.xml 2010-10-15 23:20:43 UTC (rev 4695)
@@ -58,7 +58,7 @@
<groupId>org.gatein.tools</groupId>
<artifactId>packager</artifactId>
<type>zip</type>
- <version>1.0.0-CR03-PLF-SNAPSHOT</version>
+ <version>1.0.0-CR02</version>
</dependency>
<dependency>
14 years, 3 months
gatein SVN: r4694 - exo/portal/branches/3.1.x/packaging/pkg.
by do-not-reply@jboss.org
Author: dbaeli
Date: 2010-10-15 19:13:19 -0400 (Fri, 15 Oct 2010)
New Revision: 4694
Modified:
exo/portal/branches/3.1.x/packaging/pkg/pom.xml
Log:
EXOGTN-106 adding all missing dependencies in the pkg/pom.xml, but EXOGTN-108 still blocker for the build to work fine (kernel-2.2.0 binaries added by the packager)
Modified: exo/portal/branches/3.1.x/packaging/pkg/pom.xml
===================================================================
--- exo/portal/branches/3.1.x/packaging/pkg/pom.xml 2010-10-15 22:37:34 UTC (rev 4693)
+++ exo/portal/branches/3.1.x/packaging/pkg/pom.xml 2010-10-15 23:13:19 UTC (rev 4694)
@@ -31,13 +31,34 @@
<packaging>pom</packaging>
<name>GateIn Portal Packaging Assemblies</name>
+ <properties>
+ <gatein.working.dir>${basedir}/target</gatein.working.dir><!-- Default value for server installation dir -->
+
+ <commons-digester.version>1.8.1</commons-digester.version>
+ <commons-dbcp.version>1.2.1</commons-dbcp.version>
+ <asm.version>1.5.3</asm.version>
+ <jcr.version>1.0</jcr.version>
+ <stax.version>1.0</stax.version>
+ <html-parser.version>1.6</html-parser.version>
+ <org.jaxb2.version>0.1</org.jaxb2.version>
+ <commons-httpclient.version>3.1</commons-httpclient.version>
+ <org.gatein.pc.version>2.1.1-GA</org.gatein.pc.version>
+ <org.gatein.wsrp.version>1.1.1-GA</org.gatein.wsrp.version>
+ <com.sun.xml.bind.version>2.1.7</com.sun.xml.bind.version>
+ <javassist.version>3.4.GA</javassist.version>
+ <antlr.version>2.7.6rc1</antlr.version>
+ <cglib.version>2.2</cglib.version>
+
+ </properties>
+
+
<dependencies>
<dependency>
<groupId>org.gatein.tools</groupId>
<artifactId>packager</artifactId>
<type>zip</type>
- <version>1.0.0-CR02</version>
+ <version>1.0.0-CR03-PLF-SNAPSHOT</version>
</dependency>
<dependency>
@@ -82,27 +103,32 @@
<version>3.1.5-PLF-SNAPSHOT</version>
</dependency>
- <!-- Missing dependencies -->
- <dependency>
- <groupId>org.gatein.wci</groupId>
- <artifactId>wci-exo</artifactId>
- <version>${org.gatein.wci.version}</version>
- </dependency>
- <dependency>
- <groupId>org.gatein.wci</groupId>
- <artifactId>wci-tomcat</artifactId>
- <version>${org.gatein.wci.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-pool</groupId>
- <artifactId>commons-pool</artifactId>
- <version>${commons-pool.version}</version>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.jcr</groupId>
- <artifactId>exo.jcr.component.webdav</artifactId>
- <version>${org.exoplatform.jcr.version}</version>
- </dependency>
+ <!-- Missing packaging dependencies -->
+<dependency><groupId>org.gatein.wci</groupId><artifactId>wci-exo</artifactId><version>${org.gatein.wci.version}</version></dependency>
+<dependency><groupId>org.gatein.wci</groupId><artifactId>wci-tomcat</artifactId><version>${org.gatein.wci.version}</version></dependency>
+<dependency><groupId>commons-pool</groupId><artifactId>commons-pool</artifactId><version>${commons-pool.version}</version></dependency>
+<dependency><groupId>org.exoplatform.jcr</groupId><artifactId>exo.jcr.component.webdav</artifactId><version>${org.exoplatform.jcr.version}</version></dependency>
+<dependency><groupId>org.exoplatform.jcr</groupId><artifactId>exo.jcr.framework.web</artifactId> <version>${org.exoplatform.jcr.version}</version></dependency>
+<dependency><groupId>org.gatein.wsrp</groupId><artifactId>wsrp-producer</artifactId><version>${org.gatein.wsrp.version}</version><type>war</type></dependency><!-- 1.1.1-GA-->
+<dependency><groupId>org.exoplatform.jcr</groupId><artifactId>exo.jcr.component.ftp</artifactId><version>${org.exoplatform.jcr.version}</version><type>jar</type></dependency><!-- 1.12.6-GA-SNAPSHOT-->
+
+<dependency><groupId>commons-digester</groupId><artifactId>commons-digester</artifactId><version>${commons-digester.version}</version><type>jar</type></dependency><!-- 1.8.1-->
+<dependency><groupId>commons-dbcp</groupId><artifactId>commons-dbcp</artifactId><version>${commons-dbcp.version}</version><type>jar</type></dependency><!-- 1.2.1-->
+<dependency><groupId>asm</groupId><artifactId>asm</artifactId><version>${asm.version}</version><type>jar</type></dependency><!-- 1.5.3-->
+<dependency><groupId>jcr</groupId><artifactId>jcr</artifactId><version>${jcr.version}</version><type>jar</type></dependency><!-- 1.0-->
+<dependency><groupId>org.exoplatform.kernel</groupId><artifactId>exo.kernel.component.remote</artifactId><version>${org.exoplatform.kernel.version}</version><type>jar</type></dependency><!-- 2.2.6-GA-SNAPSHOT-->
+<dependency><groupId>stax</groupId><artifactId>stax-api</artifactId><version>${stax.version}</version><type>jar</type></dependency><!-- 1.0-->
+<dependency><groupId>html-parser</groupId><artifactId>html-parser</artifactId><version>${html-parser.version}</version><type>jar</type></dependency><!-- 1.6-->
+<dependency><groupId>com.sun.xml.bind</groupId><artifactId>jaxb-impl</artifactId><version>${com.sun.xml.bind.version}</version><type>jar</type></dependency><!-- 2.1.7-->
+<dependency><groupId>org.jvnet.jaxb2.maven2</groupId><artifactId>maven-jaxb2-plugin</artifactId><version>${org.jaxb2.version}</version><type>jar</type></dependency><!-- 0.1-->
+<dependency><groupId>org.gatein.wsrp</groupId><artifactId>wsrp-admin-gui</artifactId><version>${org.gatein.wsrp.version}</version><type>war</type></dependency><!-- 1.1.1-GA-->
+<dependency><groupId>commons-httpclient</groupId><artifactId>commons-httpclient</artifactId><version>${commons-httpclient.version}</version><type>jar</type></dependency><!-- 3.1-->
+<dependency><groupId>org.gatein.pc</groupId><artifactId>pc-controller</artifactId><version>${org.gatein.pc.version}</version><type>jar</type></dependency><!-- 2.1.1-GA-->
+
+<!-- Tomcat PKG -->
+<dependency><groupId>javassist</groupId><artifactId>javassist</artifactId><version>${javassist.version}</version><type>jar</type></dependency><!-- 3.4.GA-->
+<dependency><groupId>antlr</groupId><artifactId>antlr</artifactId><version>${antlr.version}</version><type>jar</type></dependency><!-- 2.7.6rc1-->
+<dependency><groupId>cglib</groupId><artifactId>cglib</artifactId><version>${cglib.version}</version><type>jar</type></dependency><!-- 2.2-->
</dependencies>
<build>
@@ -249,10 +275,6 @@
</plugins>
</build>
- <properties>
- <gatein.working.dir>${basedir}/target</gatein.working.dir><!-- Default value for server installation dir -->
- </properties>
-
<profiles>
<profile>
<id>pkg-tomcat</id>
14 years, 3 months
gatein SVN: r4693 - exo/maven/packager/branches.
by do-not-reply@jboss.org
Author: dbaeli
Date: 2010-10-15 18:37:34 -0400 (Fri, 15 Oct 2010)
New Revision: 4693
Added:
exo/maven/packager/branches/1.1.x/
Log:
EXOGTN-106 New version of exopackager for EXOGTN
Copied: exo/maven/packager/branches/1.1.x (from rev 4692, maven/packager/tags/1.0.0-CR02)
14 years, 3 months
gatein SVN: r4692 - exo/maven/packager.
by do-not-reply@jboss.org
Author: dbaeli
Date: 2010-10-15 18:36:05 -0400 (Fri, 15 Oct 2010)
New Revision: 4692
Added:
exo/maven/packager/branches/
Log:
EXOGTN-106 New version of exopackager for EXOGTN
14 years, 3 months
gatein SVN: r4691 - exo/maven/packager.
by do-not-reply@jboss.org
Author: dbaeli
Date: 2010-10-15 18:35:45 -0400 (Fri, 15 Oct 2010)
New Revision: 4691
Removed:
exo/maven/packager/trunk/
Log:
EXOGTN-106 New version of exopackager for EXOGTN
14 years, 3 months
gatein SVN: r4689 - in components/wsrp/trunk: common/src/main/java/org/gatein/wsrp/spec/v1 and 4 other directories.
by do-not-reply@jboss.org
Author: mwringe
Date: 2010-10-15 13:46:17 -0400 (Fri, 15 Oct 2010)
New Revision: 4689
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V1ToV2Converter.java
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V2ToV1Converter.java
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/WSRP1TypeFactory.java
components/wsrp/trunk/common/src/test/java/org/gatein/wsrp/spec/v1/V1ToV2ConverterTestCase.java
components/wsrp/trunk/common/src/test/java/org/gatein/wsrp/spec/v1/V2ToV1ConverterTestCase.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/MarkupBehavior.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/MarkupBehavior.java
Log:
GTNWSRP-101: update how we handle markup contexts so that at handled more correctly, we need to take into consideration the isUseCachedMarkup when determining if the required values are set. Update tests to check for this behaviour.
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java 2010-10-15 16:39:36 UTC (rev 4688)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java 2010-10-15 17:46:17 UTC (rev 4689)
@@ -583,39 +583,35 @@
* case this character set MAY be different than the response message.
* <p/>
*/
- public static MarkupContext createMarkupContext(String mediaType, String markupString)
+ public static MarkupContext createMarkupContext(String mediaType, String markupString, byte[] markupBinary, Boolean useCachedItem)
{
- //TODO: this should be allowed to be null
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(mediaType, "Media type", "MarkupContext");
- if (markupString == null)
- {
- throw new IllegalArgumentException("MarkupContext requires either a non-null markup string or binary markup.");
- }
+ boolean isUseCachedItem = (useCachedItem == null) ? false : useCachedItem.booleanValue();
+
MarkupContext markupContext = new MarkupContext();
markupContext.setMimeType(mediaType);
- markupContext.setItemString(markupString);
- return markupContext;
- }
-
- /**
- * @param mediaType The mime type of the returned markup. The mimeType field MUST be specified whenever markup is
- * returned, and if the markupBinary field is used to return the markup, the mime type MUST include
- * the character set for textual mime types using the syntax specified in RFC1522[14] (e.g.
- * "text/html; charset=UTF-8"). In this particular case this character set MAY be different than the
- * response message.
- * @return a new MarkupContext
- */
- public static MarkupContext createMarkupContext(String mediaType, byte[] markupBinary)
- {
- //TODO: this should be allowed to be null
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(mediaType, "MIME type", "MarkupContext");
- if (markupBinary == null || markupBinary.length == 0)
+
+ if (isUseCachedItem)
{
- throw new IllegalArgumentException("MarkupContext requires either a non-null markup string or binary markup.");
+ markupContext.setUseCachedItem(useCachedItem);
}
- MarkupContext markupContext = new MarkupContext();
- markupContext.setMimeType(mediaType);
- markupContext.setItemBinary(markupBinary);
+ else
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(mediaType, "Media type", "MarkupContext");
+
+ if (markupBinary != null)
+ {
+ markupContext.setItemBinary(markupBinary);
+ }
+ else if (markupString != null)
+ {
+ markupContext.setItemString(markupString);
+ }
+ else
+ {
+ throw new IllegalArgumentException("MarkupContext required either a true useCacheItem or a non-null markup string or binary markup");
+ }
+ }
+
return markupContext;
}
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V1ToV2Converter.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V1ToV2Converter.java 2010-10-15 16:39:36 UTC (rev 4688)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V1ToV2Converter.java 2010-10-15 17:46:17 UTC (rev 4689)
@@ -772,25 +772,13 @@
{
if (v1MarkupContext != null)
{
- MarkupContext result;
-
- byte[] binary = v1MarkupContext.getMarkupBinary();
- String string = v1MarkupContext.getMarkupString();
-
- if (string != null)
- {
- result = WSRPTypeFactory.createMarkupContext(v1MarkupContext.getMimeType(), string);
- }
- else
- {
- result = WSRPTypeFactory.createMarkupContext(v1MarkupContext.getMimeType(), binary);
- }
+ MarkupContext result = WSRPTypeFactory.createMarkupContext(v1MarkupContext.getMimeType(), v1MarkupContext.getMarkupString(), v1MarkupContext.getMarkupBinary(), v1MarkupContext.isUseCachedMarkup());
+
result.setCacheControl(toV2CacheControl(v1MarkupContext.getCacheControl()));
result.setLocale(v1MarkupContext.getLocale());
result.setMimeType(v1MarkupContext.getMimeType());
result.setPreferredTitle(v1MarkupContext.getPreferredTitle());
result.setRequiresRewriting(v1MarkupContext.isRequiresUrlRewriting());
- result.setUseCachedItem(v1MarkupContext.isUseCachedMarkup());
List<V1Extension> extensions = v1MarkupContext.getExtensions();
if (extensions != null)
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V2ToV1Converter.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V2ToV1Converter.java 2010-10-15 16:39:36 UTC (rev 4688)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V2ToV1Converter.java 2010-10-15 17:46:17 UTC (rev 4689)
@@ -515,23 +515,12 @@
public static V1MarkupContext toV1MarkupContext(MarkupContext markupContext)
{
if (markupContext != null)
- {
- byte[] binary = markupContext.getItemBinary();
- String string = markupContext.getItemString();
- V1MarkupContext v1MarkupContext;
- if (string != null)
- {
- v1MarkupContext = WSRP1TypeFactory.createMarkupContext(markupContext.getMimeType(), string);
- }
- else
- {
- v1MarkupContext = WSRP1TypeFactory.createMarkupContext(markupContext.getMimeType(), binary);
- }
+ {
+ V1MarkupContext v1MarkupContext = WSRP1TypeFactory.createMarkupContext(markupContext.getMimeType(), markupContext.getItemString(), markupContext.getItemBinary(), markupContext.isUseCachedItem());
v1MarkupContext.setCacheControl(toV1CacheControl(markupContext.getCacheControl()));
v1MarkupContext.setLocale(markupContext.getLocale());
v1MarkupContext.setPreferredTitle(markupContext.getPreferredTitle());
v1MarkupContext.setRequiresUrlRewriting(markupContext.isRequiresRewriting());
- v1MarkupContext.setUseCachedMarkup(markupContext.isUseCachedItem());
List<Extension> extensions = markupContext.getExtensions();
if (extensions != null)
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/WSRP1TypeFactory.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/WSRP1TypeFactory.java 2010-10-15 16:39:36 UTC (rev 4688)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/WSRP1TypeFactory.java 2010-10-15 17:46:17 UTC (rev 4689)
@@ -505,41 +505,34 @@
*
* @return
*/
- public static V1MarkupContext createMarkupContext(String mediaType, String markupString)
+ public static V1MarkupContext createMarkupContext(String mediaType, String markupString, byte[] markupBinary, Boolean useCacheItem)
{
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(mediaType, "Media type", "MarkupContext");
- if (markupString == null)
- {
- throw new IllegalArgumentException("MarkupContext requires either a non-null markup string or binary markup.");
- }
+ boolean isUseCacheItem = (useCacheItem == null) ? false : useCacheItem.booleanValue();
+
V1MarkupContext markupContext = new V1MarkupContext();
markupContext.setMimeType(mediaType);
- markupContext.setMarkupString(markupString);
- return markupContext;
- }
-
- /**
- * useCachedMarkup(xsd:boolean[false])?, mimeType(xsd:string)?, (markupString(xsd:string) |
- * markupBinary(xsd:base64Binary)), locale(xsd:string)?, requiresUrlRewriting(xsd:boolean[false])?,
- * cacheControl(CacheControl)?, preferredTitle(xsd:string)?, extensions(Extension)*
- *
- * @param mediaType The mime type of the returned markup. The mimeType field MUST be specified whenever markup is
- * returned, and if the markupBinary field is used to return the markup, the mime type MUST include
- * the character set for textual mime types using the syntax specified in RFC1522[14] (e.g.
- * "text/html; charset=UTF-8"). In this particular case this character set MAY be different than the
- * response message.
- * @return a new MarkupContext
- */
- public static V1MarkupContext createMarkupContext(String mediaType, byte[] markupBinary)
- {
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(mediaType, "MIME type", "MarkupContext");
- if (markupBinary == null || markupBinary.length == 0)
+
+ if (isUseCacheItem)
{
- throw new IllegalArgumentException("MarkupContext requires either a non-null markup string or binary markup.");
+ markupContext.setUseCachedMarkup(useCacheItem);
}
- V1MarkupContext markupContext = new V1MarkupContext();
- markupContext.setMimeType(mediaType);
- markupContext.setMarkupBinary(markupBinary);
+ else
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(mediaType, "MIME type", "MarkupContext");
+ if (markupBinary != null)
+ {
+ markupContext.setMarkupBinary(markupBinary);
+ }
+ else if (markupString != null)
+ {
+ markupContext.setMarkupString(markupString);
+ }
+ else
+ {
+ throw new IllegalArgumentException("MarkupContext required either a true useCacheItem or a non-null markup string or binary markup");
+ }
+ }
+
return markupContext;
}
Modified: components/wsrp/trunk/common/src/test/java/org/gatein/wsrp/spec/v1/V1ToV2ConverterTestCase.java
===================================================================
--- components/wsrp/trunk/common/src/test/java/org/gatein/wsrp/spec/v1/V1ToV2ConverterTestCase.java 2010-10-15 16:39:36 UTC (rev 4688)
+++ components/wsrp/trunk/common/src/test/java/org/gatein/wsrp/spec/v1/V1ToV2ConverterTestCase.java 2010-10-15 17:46:17 UTC (rev 4689)
@@ -24,9 +24,13 @@
package org.gatein.wsrp.spec.v1;
import junit.framework.TestCase;
+
+import org.gatein.wsrp.test.ExtendedAssert;
+import org.oasis.wsrp.v1.V1MarkupContext;
import org.oasis.wsrp.v1.V1OperationFailed;
import org.oasis.wsrp.v1.V1OperationFailedFault;
import org.oasis.wsrp.v2.InvalidSession;
+import org.oasis.wsrp.v2.MarkupContext;
import org.oasis.wsrp.v2.OperationFailed;
/**
@@ -89,4 +93,69 @@
// expected
}
}
+
+ public void testToV2MarkupContext()
+ {
+ //test with mimetype and markupstring
+ V1MarkupContext v1MarkupContext = new V1MarkupContext();
+ v1MarkupContext.setMarkupString("test_1");
+ v1MarkupContext.setMimeType("mimeType_1");
+ MarkupContext markupContext = V1ToV2Converter.toV2MarkupContext(v1MarkupContext);
+ assertEquals("test_1", markupContext.getItemString());
+ assertEquals("mimeType_1", markupContext.getMimeType());
+ assertNull(markupContext.getItemBinary());
+
+ //test without the mimetype
+ v1MarkupContext.setMimeType(null);
+ try
+ {
+ V1ToV2Converter.toV2MarkupContext(v1MarkupContext);
+ ExtendedAssert.fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //expected
+ }
+
+ //test with mimetype and markupbinary
+ v1MarkupContext = new V1MarkupContext();
+ v1MarkupContext.setMarkupBinary(new byte[]{1,2,3});
+ v1MarkupContext.setMimeType("mimeType_2");
+ markupContext = V1ToV2Converter.toV2MarkupContext(v1MarkupContext);
+ ExtendedAssert.assertEquals(new byte[]{1,2,3}, markupContext.getItemBinary());
+ assertEquals("mimeType_2", markupContext.getMimeType());
+ assertNull(markupContext.getItemString());
+
+ //test without the mimetype
+ v1MarkupContext.setMimeType(null);
+ try
+ {
+ V1ToV2Converter.toV2MarkupContext(v1MarkupContext);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //expected
+ }
+
+ //test with useCachedMarkup
+ v1MarkupContext = new V1MarkupContext();
+ v1MarkupContext.setUseCachedMarkup(Boolean.TRUE);
+ markupContext = V1ToV2Converter.toV2MarkupContext(v1MarkupContext);
+ assertNull(markupContext.getItemString());
+ assertNull(markupContext.getItemBinary());
+ assertTrue(markupContext.isUseCachedItem().booleanValue());
+
+ v1MarkupContext = new V1MarkupContext();
+ v1MarkupContext.setUseCachedMarkup(Boolean.FALSE);
+ try
+ {
+ V1ToV2Converter.toV2MarkupContext(v1MarkupContext);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //expected
+ }
+ }
}
Modified: components/wsrp/trunk/common/src/test/java/org/gatein/wsrp/spec/v1/V2ToV1ConverterTestCase.java
===================================================================
--- components/wsrp/trunk/common/src/test/java/org/gatein/wsrp/spec/v1/V2ToV1ConverterTestCase.java 2010-10-15 16:39:36 UTC (rev 4688)
+++ components/wsrp/trunk/common/src/test/java/org/gatein/wsrp/spec/v1/V2ToV1ConverterTestCase.java 2010-10-15 17:46:17 UTC (rev 4689)
@@ -31,15 +31,18 @@
import org.gatein.wsrp.WSRPTypeFactory;
import org.gatein.wsrp.spec.v2.ErrorCodes;
import org.gatein.wsrp.spec.v2.ErrorCodes.Codes;
+import org.gatein.wsrp.test.ExtendedAssert;
import org.oasis.wsrp.v1.V1DestroyFailed;
import org.oasis.wsrp.v1.V1InvalidSession;
import org.oasis.wsrp.v1.V1ItemDescription;
+import org.oasis.wsrp.v1.V1MarkupContext;
import org.oasis.wsrp.v1.V1NamedString;
import org.oasis.wsrp.v1.V1OperationFailed;
import org.oasis.wsrp.v1.V1SessionContext;
import org.oasis.wsrp.v2.FailedPortlets;
import org.oasis.wsrp.v2.ItemDescription;
import org.oasis.wsrp.v2.LocalizedString;
+import org.oasis.wsrp.v2.MarkupContext;
import org.oasis.wsrp.v2.NamedString;
import org.oasis.wsrp.v2.OperationFailed;
import org.oasis.wsrp.v2.SessionContext;
@@ -227,5 +230,71 @@
return destroyFailedList.iterator().next();
}
+
+ public void testToV1MarkupContext()
+ {
+ //test with mimetype and markupstring
+ MarkupContext markupContext = new MarkupContext();
+ markupContext.setMimeType("mimeType_1");
+ markupContext.setItemString("string_1");
+ V1MarkupContext v1MarkupContext = V2ToV1Converter.toV1MarkupContext(markupContext);
+ assertEquals("mimeType_1", v1MarkupContext.getMimeType());
+ assertEquals("string_1", v1MarkupContext.getMarkupString());
+ assertNull(v1MarkupContext.getMarkupBinary());
+
+ //test without the mimetype
+ markupContext.setMimeType(null);
+ try
+ {
+ V2ToV1Converter.toV1MarkupContext(markupContext);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //expected
+ }
+
+ //test with mimetype and markupbinary
+ markupContext = new MarkupContext();
+ markupContext.setMimeType("mimeType_2");
+ markupContext.setItemBinary(new byte[]{2,1,3});
+ v1MarkupContext = V2ToV1Converter.toV1MarkupContext(markupContext);
+ assertEquals("mimeType_2", v1MarkupContext.getMimeType());
+ ExtendedAssert.assertEquals(new byte[]{2,1,3}, v1MarkupContext.getMarkupBinary());
+ assertNull(v1MarkupContext.getMarkupString());
+
+ //test without the mimetype
+ markupContext.setMimeType(null);
+ try
+ {
+ V2ToV1Converter.toV1MarkupContext(markupContext);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //expected
+ }
+
+ //test with useCachedMarkup
+ markupContext = new MarkupContext();
+ markupContext.setUseCachedItem(Boolean.TRUE);
+ v1MarkupContext = V2ToV1Converter.toV1MarkupContext(markupContext);
+ assertNull(v1MarkupContext.getMarkupString());
+ assertNull(v1MarkupContext.getMarkupBinary());
+ assertTrue(v1MarkupContext.isUseCachedMarkup().booleanValue());
+
+ markupContext = new MarkupContext();
+ markupContext.setUseCachedItem(Boolean.FALSE);
+ try
+ {
+ V2ToV1Converter.toV1MarkupContext(markupContext);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //expected
+ }
+
+ }
}
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java 2010-10-15 16:39:36 UTC (rev 4688)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java 2010-10-15 17:46:17 UTC (rev 4689)
@@ -76,19 +76,19 @@
if (markup != null && binary != null)
{
return new ErrorResponse(new IllegalArgumentException("Markup response cannot contain both string and binary " +
- "markup. Per Section 6.1.10 of the WSRP specification, this is a Producer error."));
+ "markup. Per Section 6.1.10 of the WSRP 1.0 specification, this is a Producer error."));
}
if (markup == null && binary == null)
{
- if (mimeResponse.isUseCachedItem())
+ if (mimeResponse.isUseCachedItem() != null && mimeResponse.isUseCachedItem())
{
//todo: deal with cache GTNWSRP-40
}
else
{
return new ErrorResponse(new IllegalArgumentException("Markup response must contain at least string or binary" +
- " markup. Per Section 6.1.10 of the WSRP specification, this is a Producer error."));
+ " markup. Per Section 6.1.10 of the WSRP 1.0 specification, this is a Producer error."));
}
}
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/MarkupBehavior.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/MarkupBehavior.java 2010-10-15 16:39:36 UTC (rev 4688)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/MarkupBehavior.java 2010-10-15 17:46:17 UTC (rev 4689)
@@ -165,7 +165,7 @@
String markupString = getMarkupString(WSRPUtils.getJSR168PortletModeFromWSRPName(markupParams.getMode()),
WSRPUtils.getJSR168WindowStateFromWSRPName(markupParams.getWindowState()), markupParams.getNavigationalState(), gm);
- markupContext.value = WSRP1TypeFactory.createMarkupContext(MediaType.TEXT_HTML.getValue(), markupString);
+ markupContext.value = WSRP1TypeFactory.createMarkupContext(MediaType.TEXT_HTML.getValue(), markupString, null, null);
markupContext.value.setRequiresUrlRewriting(Boolean.TRUE);
V1MarkupResponse markupResponse = WSRP1TypeFactory.createMarkupResponse(markupContext.value);
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/MarkupBehavior.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/MarkupBehavior.java 2010-10-15 16:39:36 UTC (rev 4688)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/MarkupBehavior.java 2010-10-15 17:46:17 UTC (rev 4689)
@@ -177,7 +177,7 @@
navigationalContext != null ? navigationalContext.getOpaqueValue() : null,
gm);
- markupContext.value = WSRPTypeFactory.createMarkupContext(MediaType.TEXT_HTML.getValue(), markupString);
+ markupContext.value = WSRPTypeFactory.createMarkupContext(MediaType.TEXT_HTML.getValue(), markupString, null, null);
markupContext.value.setRequiresRewriting(Boolean.TRUE);
MarkupResponse markupResponse = WSRPTypeFactory.createMarkupResponse(markupContext.value);
14 years, 3 months
gatein SVN: r4688 - in components/wsrp/trunk: producer/src/test/java/org/gatein/wsrp/producer/config and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-15 12:39:36 -0400 (Fri, 15 Oct 2010)
New Revision: 4688
Added:
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/RegistrationPropertyDescriptionTestCase.java
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/RegistrationPropertyDescription.java
Log:
- GTNWSRP-102: Fixed copy constructor.
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/RegistrationPropertyDescription.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/RegistrationPropertyDescription.java 2010-10-15 15:24:26 UTC (rev 4687)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/RegistrationPropertyDescription.java 2010-10-15 16:39:36 UTC (rev 4688)
@@ -69,8 +69,8 @@
{
ParameterValidation.throwIllegalArgExceptionIfNull(other, "RegistrationPropertyDescription");
- setName(new QName(other.name.toString()));
- setType(new QName(other.type.toString()));
+ setName(QName.valueOf(other.name.toString()));
+ setType(QName.valueOf(other.type.toString()));
if (other.aliases != null)
{
Added: components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/RegistrationPropertyDescriptionTestCase.java
===================================================================
--- components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/RegistrationPropertyDescriptionTestCase.java (rev 0)
+++ components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/RegistrationPropertyDescriptionTestCase.java 2010-10-15 16:39:36 UTC (rev 4688)
@@ -0,0 +1,45 @@
+/*
+ * 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.gatein.wsrp.producer.config;
+
+import junit.framework.TestCase;
+import org.gatein.wsrp.WSRPConstants;
+import org.gatein.wsrp.registration.RegistrationPropertyDescription;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class RegistrationPropertyDescriptionTestCase extends TestCase
+{
+ public void testEquals()
+ {
+ RegistrationPropertyDescription foo1 = new RegistrationPropertyDescription("foo", WSRPConstants.XSD_STRING);
+ RegistrationPropertyDescription foo2 = new RegistrationPropertyDescription("foo", WSRPConstants.XSD_STRING);
+
+ assertEquals(foo1, foo2);
+
+ assertEquals(foo1, new RegistrationPropertyDescription(foo1));
+ }
+}
14 years, 3 months
gatein SVN: r4687 - portal/trunk.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-15 11:24:26 -0400 (Fri, 15 Oct 2010)
New Revision: 4687
Modified:
portal/trunk/pom.xml
Log:
- Updated to use WSRP 2.0.0-Beta02.
Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml 2010-10-15 14:22:44 UTC (rev 4686)
+++ portal/trunk/pom.xml 2010-10-15 15:24:26 UTC (rev 4687)
@@ -48,7 +48,7 @@
<org.gatein.wci.version>2.0.2-GA</org.gatein.wci.version>
<org.gatein.pc.version>2.2.0-Beta06</org.gatein.pc.version>
<org.picketlink.idm>1.1.6.GA</org.picketlink.idm>
- <org.gatein.wsrp.version>2.0.0-Beta02-SNAPSHOT</org.gatein.wsrp.version>
+ <org.gatein.wsrp.version>2.0.0-Beta02</org.gatein.wsrp.version>
<org.gatein.mop.version>1.0.3-GA</org.gatein.mop.version>
<org.slf4j.version>1.5.6</org.slf4j.version>
<rhino.version>1.6R5</rhino.version>
14 years, 3 months
gatein SVN: r4686 - in exo/portal/branches/3.1.x: packaging/pkg and 1 other directory.
by do-not-reply@jboss.org
Author: dbaeli
Date: 2010-10-15 10:22:44 -0400 (Fri, 15 Oct 2010)
New Revision: 4686
Modified:
exo/portal/branches/3.1.x/packaging/pkg/pom.xml
exo/portal/branches/3.1.x/pom.xml
Log:
EXOGTN-106 adding missing dependencies
Modified: exo/portal/branches/3.1.x/packaging/pkg/pom.xml
===================================================================
--- exo/portal/branches/3.1.x/packaging/pkg/pom.xml 2010-10-15 14:17:27 UTC (rev 4685)
+++ exo/portal/branches/3.1.x/packaging/pkg/pom.xml 2010-10-15 14:22:44 UTC (rev 4686)
@@ -80,7 +80,29 @@
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.server.jboss.patch-ear</artifactId>
<version>3.1.5-PLF-SNAPSHOT</version>
- </dependency>
+ </dependency>
+
+ <!-- Missing dependencies -->
+ <dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-exo</artifactId>
+ <version>${org.gatein.wci.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-tomcat</artifactId>
+ <version>${org.gatein.wci.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-pool</groupId>
+ <artifactId>commons-pool</artifactId>
+ <version>${commons-pool.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.jcr</groupId>
+ <artifactId>exo.jcr.component.webdav</artifactId>
+ <version>${org.exoplatform.jcr.version}</version>
+ </dependency>
</dependencies>
<build>
@@ -183,7 +205,7 @@
<argument>-Dexo.working.dir=${gatein.working.dir}</argument>
<!--argument>-Dexo.src.dir=NONE</argument-->
<argument>-Dexo.dep.dir=${exo.projects.directory.dependencies}</argument><!-- to get the server ref install -->
- <argument>-Dexo.m2.repos=file:${settings.localRepository},http://repository.exoplatform.org/public,https://repository.jboss.org</argument>
+ <argument>-Dexo.m2.repos=file:${settings.localRepository}</argument>
<argument>-Dclean.server=${exo.projects.app.jboss.version}</argument>
<argument>-Dexo.m2.home=${maven.home}</argument>
<argument>-Xms128m</argument>
@@ -388,7 +410,7 @@
<argument>-Dexo.working.dir=${gatein.working.dir}</argument>
<!--argument>-Dexo.src.dir=NONE</argument-->
<argument>-Dexo.dep.dir=${exo.projects.directory.dependencies}</argument><!-- to get the server ref install -->
- <argument>-Dexo.m2.repos=file:${settings.localRepository},http://maven2.exoplatform.org/rest/maven2,http://repository.jboss.org/maven2</argument>
+ <argument>-Dexo.m2.repos=file:${settings.localRepository}</argument>
<argument>-Dclean.server=${exo.projects.app.jboss.version}</argument>
<argument>-Dexo.m2.home=${maven.home}</argument>
<argument>-Xms128m</argument>
@@ -588,7 +610,7 @@
<argument>-Dexo.working.dir=${gatein.working.dir}</argument>
<!--argument>-Dexo.src.dir=NONE</argument-->
<argument>-Dexo.dep.dir=${exo.projects.directory.dependencies}</argument><!-- to get the server ref install -->
- <argument>-Dexo.m2.repos=file:${settings.localRepository},http://maven2.exoplatform.org/rest/maven2,http://repository.jboss.org/maven2</argument>
+ <argument>-Dexo.m2.repos=file:${settings.localRepository}</argument>
<argument>-Dclean.server=${exo.projects.app.jboss.version}</argument>
<argument>-Dexo.m2.home=${maven.home}</argument>
<argument>-Xms128m</argument>
Modified: exo/portal/branches/3.1.x/pom.xml
===================================================================
--- exo/portal/branches/3.1.x/pom.xml 2010-10-15 14:17:27 UTC (rev 4685)
+++ exo/portal/branches/3.1.x/pom.xml 2010-10-15 14:22:44 UTC (rev 4686)
@@ -51,6 +51,7 @@
<org.gatein.wsrp.version>1.1.1-GA</org.gatein.wsrp.version>
<org.gatein.mop.version>1.0.3-GA</org.gatein.mop.version>
<org.slf4j.version>1.5.6</org.slf4j.version>
+ <commons-pool.version>1.2</commons-pool.version>
<rhino.version>1.6R5</rhino.version>
<org.codehaus.groovy.version>1.6.5</org.codehaus.groovy.version>
<javax.servlet.version>2.5</javax.servlet.version>
14 years, 3 months