You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(233) |
Sep
(199) |
Oct
(206) |
Nov
(185) |
Dec
(270) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(232) |
Feb
(426) |
Mar
(623) |
Apr
(592) |
May
(506) |
Jun
(389) |
Jul
(160) |
Aug
(3) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(5) |
| 2007 |
Jan
(1) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
(4) |
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(5) |
Oct
(9) |
Nov
(6) |
Dec
(6) |
| 2008 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
(3) |
May
(3) |
Jun
(5) |
Jul
(10) |
Aug
(2) |
Sep
(12) |
Oct
(10) |
Nov
(54) |
Dec
(49) |
| 2009 |
Jan
(19) |
Feb
(13) |
Mar
(20) |
Apr
(24) |
May
(44) |
Jun
(29) |
Jul
(32) |
Aug
(10) |
Sep
(7) |
Oct
(10) |
Nov
(4) |
Dec
(17) |
| 2010 |
Jan
(14) |
Feb
(5) |
Mar
(23) |
Apr
(50) |
May
(31) |
Jun
(9) |
Jul
(5) |
Aug
(4) |
Sep
(7) |
Oct
(5) |
Nov
(2) |
Dec
(3) |
| 2011 |
Jan
(12) |
Feb
(5) |
Mar
(5) |
Apr
(3) |
May
(4) |
Jun
(3) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2012 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2015 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <jbo...@li...> - 2006-06-29 08:36:43
|
Author: dar...@jb...
Date: 2006-06-29 04:36:26 -0400 (Thu, 29 Jun 2006)
New Revision: 512
Added:
trunk/src/test/java/org/jboss/test/ws/jbws1010/
trunk/src/test/java/org/jboss/test/ws/jbws1010/InheritenceChildInterface.java
trunk/src/test/java/org/jboss/test/ws/jbws1010/InheritenceParentInterface.java
trunk/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java
trunk/src/test/java/org/jboss/test/ws/jbws1010/TestEndpointImpl.java
trunk/src/test/java/org/jboss/test/ws/tools/sei/InheritenceChildInterface.java
trunk/src/test/java/org/jboss/test/ws/tools/sei/InheritenceParentInterface.java
trunk/src/test/resources/jbws1010/
trunk/src/test/resources/jbws1010/META-INF/
trunk/src/test/resources/jbws1010/META-INF/application-client.xml
trunk/src/test/resources/jbws1010/META-INF/jboss-client.xml
trunk/src/test/resources/jbws1010/WEB-INF/
trunk/src/test/resources/jbws1010/WEB-INF/jaxrpc-mapping.xml
trunk/src/test/resources/jbws1010/WEB-INF/web.xml
trunk/src/test/resources/jbws1010/WEB-INF/webservices.xml
trunk/src/test/resources/jbws1010/WEB-INF/wsdl/
trunk/src/test/resources/jbws1010/WEB-INF/wsdl/TestService.wsdl
trunk/src/test/resources/jbws1010/wstools-config.xml
trunk/src/test/resources/wsdlfixture/InheritenceChildInterfaceService_RPC.wsdl
Removed:
trunk/src/test/java/org/jboss/test/ws/jbws1010/InheritenceChildInterface.java
trunk/src/test/java/org/jboss/test/ws/jbws1010/InheritenceParentInterface.java
trunk/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java
trunk/src/test/java/org/jboss/test/ws/jbws1010/TestEndpointImpl.java
trunk/src/test/resources/jbws1010/META-INF/
trunk/src/test/resources/jbws1010/META-INF/application-client.xml
trunk/src/test/resources/jbws1010/META-INF/jboss-client.xml
trunk/src/test/resources/jbws1010/WEB-INF/
trunk/src/test/resources/jbws1010/WEB-INF/jaxrpc-mapping.xml
trunk/src/test/resources/jbws1010/WEB-INF/web.xml
trunk/src/test/resources/jbws1010/WEB-INF/webservices.xml
trunk/src/test/resources/jbws1010/WEB-INF/wsdl/
trunk/src/test/resources/jbws1010/WEB-INF/wsdl/TestService.wsdl
trunk/src/test/resources/jbws1010/wstools-config.xml
Modified:
trunk/src/test/ant/build-jars.xml
trunk/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java
Log:
Merged JBWS-1010 from branch/jbossws-1.0 to trunk
Modified: trunk/src/test/ant/build-jars.xml
===================================================================
--- trunk/src/test/ant/build-jars.xml 2006-06-29 07:53:21 UTC (rev 511)
+++ trunk/src/test/ant/build-jars.xml 2006-06-29 08:36:26 UTC (rev 512)
@@ -288,7 +288,35 @@
<include name="jboss-client.xml"/>
</metainf>
</jar>
-
+
+ <!-- jbossws-jbws1010 -->
+ <war warfile="${build.test.dir}/libs/jbossws-jbws1010.war" webxml="${build.test.dir}/resources/jbws1010/WEB-INF/web.xml">
+ <classes dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jbws1010/InheritenceChildInterface.class"/>
+ <include name="org/jboss/test/ws/jbws1010/InheritenceParentInterface.class"/>
+ <include name="org/jboss/test/ws/jbws1010/TestEndpointImpl.class"/>
+ </classes>
+ <webinf dir="${build.test.dir}/resources/jbws1010/WEB-INF">
+ <include name="webservices.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </webinf>
+ </war>
+ <jar destfile="${build.test.dir}/libs/jbossws-jbws1010-client.jar">
+ <fileset dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jbws1010/InheritenceChildInterface.class"/>
+ <include name="org/jboss/test/ws/jbws1010/InheritenceParentInterface.class"/>
+ </fileset>
+ <metainf dir="${build.test.dir}/resources/jbws1010/META-INF">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ </metainf>
+ <metainf dir="${build.test.dir}/resources/jbws1010/WEB-INF">
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </metainf>
+ </jar>
+
<!-- jbossws-jbws231 -->
<war warfile="${build.test.dir}/libs/jbossws-jbws231.war" webxml="${build.test.dir}/resources/jbws231/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
Copied: trunk/src/test/java/org/jboss/test/ws/jbws1010 (from rev 511, branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010)
Deleted: trunk/src/test/java/org/jboss/test/ws/jbws1010/InheritenceChildInterface.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/InheritenceChildInterface.java 2006-06-29 07:53:21 UTC (rev 511)
+++ trunk/src/test/java/org/jboss/test/ws/jbws1010/InheritenceChildInterface.java 2006-06-29 08:36:26 UTC (rev 512)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., 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.test.ws.jbws1010;
-
-import java.rmi.RemoteException;
-
-/**
- *
- * @author dar...@jb...
- * @since 27-June-2006
- */
-public interface InheritenceChildInterface extends InheritenceParentInterface
-{
-
- public String getB() throws RemoteException;
-
-}
Copied: trunk/src/test/java/org/jboss/test/ws/jbws1010/InheritenceChildInterface.java (from rev 511, branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/InheritenceChildInterface.java)
Deleted: trunk/src/test/java/org/jboss/test/ws/jbws1010/InheritenceParentInterface.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/InheritenceParentInterface.java 2006-06-29 07:53:21 UTC (rev 511)
+++ trunk/src/test/java/org/jboss/test/ws/jbws1010/InheritenceParentInterface.java 2006-06-29 08:36:26 UTC (rev 512)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., 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.test.ws.jbws1010;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-/**
- *
- * @author dar...@jb...
- * @since 27 June 2006
- */
-public interface InheritenceParentInterface extends Remote
-{
-
- public String getA() throws RemoteException;
-
-}
Copied: trunk/src/test/java/org/jboss/test/ws/jbws1010/InheritenceParentInterface.java (from rev 511, branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/InheritenceParentInterface.java)
Deleted: trunk/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java 2006-06-29 07:53:21 UTC (rev 511)
+++ trunk/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java 2006-06-29 08:36:26 UTC (rev 512)
@@ -1,65 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., 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.test.ws.jbws1010;
-
-import javax.naming.InitialContext;
-import javax.xml.rpc.Service;
-
-import junit.framework.Test;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.test.ws.jbws231.JBWS231TestCase;
-
-public class JBWS1010TestCase extends JBossWSTest
-{
-
- private static InheritenceChildInterface port;
-
- public static Test suite() throws Exception
- {
- return JBossWSTestSetup.newTestSetup(JBWS1010TestCase.class, "jbossws-jbws1010.war, jbossws-jbws1010-client.jar");
- }
-
- public void setUp() throws Exception
- {
- super.setUp();
- if (port == null)
- {
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
- port = (InheritenceChildInterface)service.getPort(InheritenceChildInterface.class);
- }
- }
-
- public void testGetA() throws Exception
- {
- String response = port.getA();
- assertEquals("A", response);
- }
-
- public void testGetB() throws Exception
- {
- String response = port.getB();
- assertEquals("B", response);
- }
-}
Copied: trunk/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java (from rev 511, branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java)
Deleted: trunk/src/test/java/org/jboss/test/ws/jbws1010/TestEndpointImpl.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/TestEndpointImpl.java 2006-06-29 07:53:21 UTC (rev 511)
+++ trunk/src/test/java/org/jboss/test/ws/jbws1010/TestEndpointImpl.java 2006-06-29 08:36:26 UTC (rev 512)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., 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.test.ws.jbws1010;
-
-import java.rmi.RemoteException;
-
-/**
- *
- * @author dar...@jb...
- * @since 27-June-2006
- */
-public class TestEndpointImpl implements InheritenceChildInterface
-{
-
- public String getA() throws RemoteException
- {
- return "A";
- }
-
- public String getB() throws RemoteException
- {
- return "B";
- }
-}
Copied: trunk/src/test/java/org/jboss/test/ws/jbws1010/TestEndpointImpl.java (from rev 511, branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/TestEndpointImpl.java)
Modified: trunk/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java 2006-06-29 07:53:21 UTC (rev 511)
+++ trunk/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java 2006-06-29 08:36:26 UTC (rev 512)
@@ -28,6 +28,7 @@
import org.jboss.test.ws.jaxb.complex.ComplexTypes;
import org.jboss.test.ws.tools.sei.ArrayInterface;
import org.jboss.test.ws.tools.sei.CustomInterface;
+import org.jboss.test.ws.tools.sei.InheritenceChildInterface;
import org.jboss.test.ws.tools.sei.PrimitiveTypes;
import org.jboss.test.ws.tools.sei.ServiceException;
import org.jboss.test.ws.tools.sei.StandardJavaTypes;
@@ -95,6 +96,14 @@
String fixturefile = "resources/wsdlfixture/arrays/ArrayInterfaceService_RPC_11.wsdl";
doWSDLTest(seiClass, fixturefile);
}
+
+ /** Test a SEI that inherits a method from a super-interface. */
+ public void testInterfaceInheritence() throws Exception
+ {
+ Class seiClass = InheritenceChildInterface.class;
+ String fixturefile = "resources/wsdlfixture/InheritenceChildInterfaceService_RPC.wsdl";
+ doWSDLTest(seiClass, fixturefile);
+ }
private void doWSDLTest(Class seiClass, String fixturefile) throws Exception
{
Copied: trunk/src/test/java/org/jboss/test/ws/tools/sei/InheritenceChildInterface.java (from rev 511, branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/sei/InheritenceChildInterface.java)
Copied: trunk/src/test/java/org/jboss/test/ws/tools/sei/InheritenceParentInterface.java (from rev 511, branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/sei/InheritenceParentInterface.java)
Copied: trunk/src/test/resources/jbws1010 (from rev 511, branches/jbossws-1.0/src/test/resources/jbws1010)
Copied: trunk/src/test/resources/jbws1010/META-INF (from rev 511, branches/jbossws-1.0/src/test/resources/jbws1010/META-INF)
Deleted: trunk/src/test/resources/jbws1010/META-INF/application-client.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jbws1010/META-INF/application-client.xml 2006-06-29 07:53:21 UTC (rev 511)
+++ trunk/src/test/resources/jbws1010/META-INF/application-client.xml 2006-06-29 08:36:26 UTC (rev 512)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
- version="1.4">
-
- <display-name>HelloService</display-name>
-
- <service-ref>
- <service-ref-name>service/TestService</service-ref-name>
- <service-interface>javax.xml.rpc.Service</service-interface>
- <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component-ref>
- <service-endpoint-interface>org.jboss.test.ws.jbws1010.InheritenceChildInterface</service-endpoint-interface>
- </port-component-ref>
- </service-ref>
-
-</application-client>
-
Copied: trunk/src/test/resources/jbws1010/META-INF/application-client.xml (from rev 511, branches/jbossws-1.0/src/test/resources/jbws1010/META-INF/application-client.xml)
Deleted: trunk/src/test/resources/jbws1010/META-INF/jboss-client.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jbws1010/META-INF/jboss-client.xml 2006-06-29 07:53:21 UTC (rev 511)
+++ trunk/src/test/resources/jbws1010/META-INF/jboss-client.xml 2006-06-29 08:36:26 UTC (rev 512)
@@ -1,15 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!DOCTYPE jboss-client PUBLIC
- "-//JBoss//DTD Application Client 4.0//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
-
-<jboss-client>
- <jndi-name>jbossws-client</jndi-name>
-
- <service-ref>
- <service-ref-name>service/TestService</service-ref-name>
- <wsdl-override>http://@jbosstest.host.name@:8080/jbossws-jbws1010?wsdl</wsdl-override>
- </service-ref>
-
-</jboss-client>
Copied: trunk/src/test/resources/jbws1010/META-INF/jboss-client.xml (from rev 511, branches/jbossws-1.0/src/test/resources/jbws1010/META-INF/jboss-client.xml)
Copied: trunk/src/test/resources/jbws1010/WEB-INF (from rev 511, branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF)
Deleted: trunk/src/test/resources/jbws1010/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/jaxrpc-mapping.xml 2006-06-29 07:53:21 UTC (rev 511)
+++ trunk/src/test/resources/jbws1010/WEB-INF/jaxrpc-mapping.xml 2006-06-29 08:36:26 UTC (rev 512)
@@ -1,37 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
- <package-mapping>
- <package-type>org.jboss.test.ws.jbws1010</package-type>
- <namespaceURI>http://org.jboss.test.ws/jbws1010/types</namespaceURI>
- </package-mapping>
- <service-interface-mapping>
- <service-interface>org.jboss.test.ws.jbws1010.TestService</service-interface>
- <wsdl-service-name xmlns:serviceNS='http://org.jboss.test.ws/jbws1010'>serviceNS:TestService</wsdl-service-name>
- <port-mapping>
- <port-name>InheritenceChildInterfacePort</port-name>
- <java-port-name>InheritenceChildInterfacePort</java-port-name>
- </port-mapping>
- </service-interface-mapping>
- <service-endpoint-interface-mapping>
- <service-endpoint-interface>org.jboss.test.ws.jbws1010.InheritenceChildInterface</service-endpoint-interface>
- <wsdl-port-type xmlns:portTypeNS='http://org.jboss.test.ws/jbws1010'>portTypeNS:InheritenceChildInterface</wsdl-port-type>
- <wsdl-binding xmlns:bindingNS='http://org.jboss.test.ws/jbws1010'>bindingNS:InheritenceChildInterfaceBinding</wsdl-binding>
- <service-endpoint-method-mapping>
- <java-method-name>getB</java-method-name>
- <wsdl-operation>getB</wsdl-operation>
- <wsdl-return-value-mapping>
- <method-return-value>java.lang.String</method-return-value>
- <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1010'>wsdlMsgNS:InheritenceChildInterface_getBResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
- <service-endpoint-method-mapping>
- <java-method-name>getA</java-method-name>
- <wsdl-operation>getA</wsdl-operation>
- <wsdl-return-value-mapping>
- <method-return-value>java.lang.String</method-return-value>
- <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1010'>wsdlMsgNS:InheritenceChildInterface_getAResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
- </service-endpoint-interface-mapping>
-</java-wsdl-mapping>
\ No newline at end of file
Copied: trunk/src/test/resources/jbws1010/WEB-INF/jaxrpc-mapping.xml (from rev 511, branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/jaxrpc-mapping.xml)
Deleted: trunk/src/test/resources/jbws1010/WEB-INF/web.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/web.xml 2006-06-29 07:53:21 UTC (rev 511)
+++ trunk/src/test/resources/jbws1010/WEB-INF/web.xml 2006-06-29 08:36:26 UTC (rev 512)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
-
- <servlet>
- <servlet-name>TestEndpoint</servlet-name>
- <servlet-class>org.jboss.test.ws.jbws1010.TestEndpointImpl</servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>TestEndpoint</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-</web-app>
-
Copied: trunk/src/test/resources/jbws1010/WEB-INF/web.xml (from rev 511, branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/web.xml)
Deleted: trunk/src/test/resources/jbws1010/WEB-INF/webservices.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/webservices.xml 2006-06-29 07:53:21 UTC (rev 511)
+++ trunk/src/test/resources/jbws1010/WEB-INF/webservices.xml 2006-06-29 08:36:26 UTC (rev 512)
@@ -1,15 +0,0 @@
-<webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:impl='http://org.jboss.test.ws/jbws1010' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
- <webservice-description>
- <webservice-description-name>TestService</webservice-description-name>
- <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component>
- <port-component-name>InheritenceChildInterfacePort</port-component-name>
- <wsdl-port>impl:InheritenceChildInterfacePort</wsdl-port>
- <service-endpoint-interface>org.jboss.test.ws.jbws1010.InheritenceChildInterface</service-endpoint-interface>
- <service-impl-bean>
- <servlet-link>TestEndpoint</servlet-link>
- </service-impl-bean>
- </port-component>
- </webservice-description>
-</webservices>
\ No newline at end of file
Copied: trunk/src/test/resources/jbws1010/WEB-INF/webservices.xml (from rev 511, branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/webservices.xml)
Copied: trunk/src/test/resources/jbws1010/WEB-INF/wsdl (from rev 511, branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/wsdl)
Deleted: trunk/src/test/resources/jbws1010/WEB-INF/wsdl/TestService.wsdl
===================================================================
--- branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/wsdl/TestService.wsdl 2006-06-29 07:53:21 UTC (rev 511)
+++ trunk/src/test/resources/jbws1010/WEB-INF/wsdl/TestService.wsdl 2006-06-29 08:36:26 UTC (rev 512)
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions name='TestService' targetNamespace='http://org.jboss.test.ws/jbws1010' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.test.ws/jbws1010' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
- <types/>
- <message name='InheritenceChildInterface_getA'/>
- <message name='InheritenceChildInterface_getAResponse'>
- <part name='result' type='xsd:string'/>
- </message>
- <message name='InheritenceChildInterface_getB'/>
- <message name='InheritenceChildInterface_getBResponse'>
- <part name='result' type='xsd:string'/>
- </message>
- <portType name='InheritenceChildInterface'>
- <operation name='getA'>
- <input message='tns:InheritenceChildInterface_getA'/>
- <output message='tns:InheritenceChildInterface_getAResponse'/>
- </operation>
- <operation name='getB'>
- <input message='tns:InheritenceChildInterface_getB'/>
- <output message='tns:InheritenceChildInterface_getBResponse'/>
- </operation>
- </portType>
- <binding name='InheritenceChildInterfaceBinding' type='tns:InheritenceChildInterface'>
- <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
- <operation name='getA'>
- <soap:operation soapAction=''/>
- <input>
- <soap:body namespace='http://org.jboss.test.ws/jbws1010' use='literal'/>
- </input>
- <output>
- <soap:body namespace='http://org.jboss.test.ws/jbws1010' use='literal'/>
- </output>
- </operation>
- <operation name='getB'>
- <soap:operation soapAction=''/>
- <input>
- <soap:body namespace='http://org.jboss.test.ws/jbws1010' use='literal'/>
- </input>
- <output>
- <soap:body namespace='http://org.jboss.test.ws/jbws1010' use='literal'/>
- </output>
- </operation>
- </binding>
- <service name='TestService'>
- <port binding='tns:InheritenceChildInterfaceBinding' name='InheritenceChildInterfacePort'>
- <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
- </port>
- </service>
-</definitions>
\ No newline at end of file
Copied: trunk/src/test/resources/jbws1010/WEB-INF/wsdl/TestService.wsdl (from rev 511, branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/wsdl/TestService.wsdl)
Deleted: trunk/src/test/resources/jbws1010/wstools-config.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jbws1010/wstools-config.xml 2006-06-29 07:53:21 UTC (rev 511)
+++ trunk/src/test/resources/jbws1010/wstools-config.xml 2006-06-29 08:36:26 UTC (rev 512)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- wstools -cp ../../../../output/tests/classes -dest ./WEB-INF -config wstools-config.xml
--->
-
-<configuration xmlns="http://www.jboss.org/jbossws-tools" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
- <java-wsdl>
- <service name="TestService" endpoint="org.jboss.test.ws.jbws1010.InheritenceChildInterface" style="rpc">
- </service>
- <namespaces target-namespace="http://org.jboss.test.ws/jbws1010" type-namespace="http://org.jboss.test.ws/jbws1010/types"/>
- <mapping file="jaxrpc-mapping.xml"/>
- <webservices servlet-link="TestEndpoint"/>
- </java-wsdl>
-</configuration>
Copied: trunk/src/test/resources/jbws1010/wstools-config.xml (from rev 511, branches/jbossws-1.0/src/test/resources/jbws1010/wstools-config.xml)
Copied: trunk/src/test/resources/wsdlfixture/InheritenceChildInterfaceService_RPC.wsdl (from rev 511, branches/jbossws-1.0/src/test/resources/wsdlfixture/InheritenceChildInterfaceService_RPC.wsdl)
|
|
From: <jbo...@li...> - 2006-06-29 08:32:06
|
Author: wrzep
Date: 2006-06-29 04:32:01 -0400 (Thu, 29 Jun 2006)
New Revision: 4865
Modified:
labs/jbosslabs/trunk/portal-extensions/svn-hooks/blog-check.sh
labs/jbosslabs/trunk/portal-extensions/svn-hooks/xml-check.sh
Log:
Trying to fix svn hook problem.
Pawel
Modified: labs/jbosslabs/trunk/portal-extensions/svn-hooks/blog-check.sh
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/svn-hooks/blog-check.sh 2006-06-29 02:10:44 UTC (rev 4864)
+++ labs/jbosslabs/trunk/portal-extensions/svn-hooks/blog-check.sh 2006-06-29 08:32:01 UTC (rev 4865)
@@ -20,7 +20,7 @@
if [ "$type" != "D" -a -n "`echo $token | grep ".*/members/.*/blog/.*\.\(htm\|html\)"`" ]
then
$SVNLOOK proplist $OPTS $REPOS $token | grep "^[[:space:]]*title$" || {
- echo "The 'title' property for a blog entry is not set. Please set the 'title' property. Example: 'svn propedit title ./mySpiffyBlogPost.html'. Aborting commit." >&2
+ echo "The title property for a blog entry is not set. Aborting commit." >&2
exit 1
}
fi
Modified: labs/jbosslabs/trunk/portal-extensions/svn-hooks/xml-check.sh
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/svn-hooks/xml-check.sh 2006-06-29 02:10:44 UTC (rev 4864)
+++ labs/jbosslabs/trunk/portal-extensions/svn-hooks/xml-check.sh 2006-06-29 08:32:01 UTC (rev 4865)
@@ -20,7 +20,7 @@
if [ "$type" != "D" -a -n "`echo $token | grep .*[.]xml$`" ]
then
$SVNLOOK cat $OPTS $REPOS $token | xmllint - >/dev/null || {
- echo "Error parsing XML. Please make sure your xml is valid by using a tool such as 'xmllint'. Invalid XML breaks things. Aborting commit." >&2
+ echo "Error parsing XML; aborting commit." >&2
exit 1
}
fi
|
Author: dar...@jb...
Date: 2006-06-29 03:53:21 -0400 (Thu, 29 Jun 2006)
New Revision: 511
Added:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/InheritenceChildInterface.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/InheritenceParentInterface.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/TestEndpointImpl.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/sei/InheritenceChildInterface.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/sei/InheritenceParentInterface.java
branches/jbossws-1.0/src/test/resources/jbws1010/
branches/jbossws-1.0/src/test/resources/jbws1010/META-INF/
branches/jbossws-1.0/src/test/resources/jbws1010/META-INF/application-client.xml
branches/jbossws-1.0/src/test/resources/jbws1010/META-INF/jboss-client.xml
branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/
branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/jaxrpc-mapping.xml
branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/web.xml
branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/webservices.xml
branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/wsdl/
branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/wsdl/TestService.wsdl
branches/jbossws-1.0/src/test/resources/jbws1010/wstools-config.xml
branches/jbossws-1.0/src/test/resources/wsdlfixture/InheritenceChildInterfaceService_RPC.wsdl
Modified:
branches/jbossws-1.0/src/main/java/org/jboss/ws/tools/metadata/ReflectiveMetaDataBuilder.java
branches/jbossws-1.0/src/test/ant/build-jars.xml
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java
Log:
JBWS-1010 - Support for inherited service endpoint interfaces - JAX-RPC 5.5.4
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/tools/metadata/ReflectiveMetaDataBuilder.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/tools/metadata/ReflectiveMetaDataBuilder.java 2006-06-29 04:10:02 UTC (rev 510)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/tools/metadata/ReflectiveMetaDataBuilder.java 2006-06-29 07:53:21 UTC (rev 511)
@@ -78,7 +78,7 @@
public ToolsEndpointMetaData generate()
{
- generateOperationMetaData(seiClass.getDeclaredMethods());
+ generateOperationMetaData(seiClass.getMethods());
return tmd;
}
Modified: branches/jbossws-1.0/src/test/ant/build-jars.xml
===================================================================
--- branches/jbossws-1.0/src/test/ant/build-jars.xml 2006-06-29 04:10:02 UTC (rev 510)
+++ branches/jbossws-1.0/src/test/ant/build-jars.xml 2006-06-29 07:53:21 UTC (rev 511)
@@ -288,7 +288,35 @@
<include name="jboss-client.xml"/>
</metainf>
</jar>
-
+
+ <!-- jbossws-jbws1010 -->
+ <war warfile="${build.test.dir}/libs/jbossws-jbws1010.war" webxml="${build.test.dir}/resources/jbws1010/WEB-INF/web.xml">
+ <classes dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jbws1010/InheritenceChildInterface.class"/>
+ <include name="org/jboss/test/ws/jbws1010/InheritenceParentInterface.class"/>
+ <include name="org/jboss/test/ws/jbws1010/TestEndpointImpl.class"/>
+ </classes>
+ <webinf dir="${build.test.dir}/resources/jbws1010/WEB-INF">
+ <include name="webservices.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </webinf>
+ </war>
+ <jar destfile="${build.test.dir}/libs/jbossws-jbws1010-client.jar">
+ <fileset dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jbws1010/InheritenceChildInterface.class"/>
+ <include name="org/jboss/test/ws/jbws1010/InheritenceParentInterface.class"/>
+ </fileset>
+ <metainf dir="${build.test.dir}/resources/jbws1010/META-INF">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ </metainf>
+ <metainf dir="${build.test.dir}/resources/jbws1010/WEB-INF">
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </metainf>
+ </jar>
+
<!-- jbossws-jbws231 -->
<war warfile="${build.test.dir}/libs/jbossws-jbws231.war" webxml="${build.test.dir}/resources/jbws231/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/InheritenceChildInterface.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/InheritenceChildInterface.java 2006-06-29 04:10:02 UTC (rev 510)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/InheritenceChildInterface.java 2006-06-29 07:53:21 UTC (rev 511)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.ws.jbws1010;
+
+import java.rmi.RemoteException;
+
+/**
+ *
+ * @author dar...@jb...
+ * @since 27-June-2006
+ */
+public interface InheritenceChildInterface extends InheritenceParentInterface
+{
+
+ public String getB() throws RemoteException;
+
+}
Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/InheritenceChildInterface.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/InheritenceParentInterface.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/InheritenceParentInterface.java 2006-06-29 04:10:02 UTC (rev 510)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/InheritenceParentInterface.java 2006-06-29 07:53:21 UTC (rev 511)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.ws.jbws1010;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ *
+ * @author dar...@jb...
+ * @since 27 June 2006
+ */
+public interface InheritenceParentInterface extends Remote
+{
+
+ public String getA() throws RemoteException;
+
+}
Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/InheritenceParentInterface.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java 2006-06-29 04:10:02 UTC (rev 510)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java 2006-06-29 07:53:21 UTC (rev 511)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.ws.jbws1010;
+
+import javax.naming.InitialContext;
+import javax.xml.rpc.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.test.ws.jbws231.JBWS231TestCase;
+
+public class JBWS1010TestCase extends JBossWSTest
+{
+
+ private static InheritenceChildInterface port;
+
+ public static Test suite() throws Exception
+ {
+ return JBossWSTestSetup.newTestSetup(JBWS1010TestCase.class, "jbossws-jbws1010.war, jbossws-jbws1010-client.jar");
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ if (port == null)
+ {
+ InitialContext iniCtx = getInitialContext();
+ Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ port = (InheritenceChildInterface)service.getPort(InheritenceChildInterface.class);
+ }
+ }
+
+ public void testGetA() throws Exception
+ {
+ String response = port.getA();
+ assertEquals("A", response);
+ }
+
+ public void testGetB() throws Exception
+ {
+ String response = port.getB();
+ assertEquals("B", response);
+ }
+}
Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/TestEndpointImpl.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/TestEndpointImpl.java 2006-06-29 04:10:02 UTC (rev 510)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/TestEndpointImpl.java 2006-06-29 07:53:21 UTC (rev 511)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.ws.jbws1010;
+
+import java.rmi.RemoteException;
+
+/**
+ *
+ * @author dar...@jb...
+ * @since 27-June-2006
+ */
+public class TestEndpointImpl implements InheritenceChildInterface
+{
+
+ public String getA() throws RemoteException
+ {
+ return "A";
+ }
+
+ public String getB() throws RemoteException
+ {
+ return "B";
+ }
+}
Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/TestEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java 2006-06-29 04:10:02 UTC (rev 510)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java 2006-06-29 07:53:21 UTC (rev 511)
@@ -28,6 +28,7 @@
import org.jboss.test.ws.jaxb.complex.ComplexTypes;
import org.jboss.test.ws.tools.sei.ArrayInterface;
import org.jboss.test.ws.tools.sei.CustomInterface;
+import org.jboss.test.ws.tools.sei.InheritenceChildInterface;
import org.jboss.test.ws.tools.sei.PrimitiveTypes;
import org.jboss.test.ws.tools.sei.ServiceException;
import org.jboss.test.ws.tools.sei.StandardJavaTypes;
@@ -95,6 +96,14 @@
String fixturefile = "resources/wsdlfixture/arrays/ArrayInterfaceService_RPC_11.wsdl";
doWSDLTest(seiClass, fixturefile);
}
+
+ /** Test a SEI that inherits a method from a super-interface. */
+ public void testInterfaceInheritence() throws Exception
+ {
+ Class seiClass = InheritenceChildInterface.class;
+ String fixturefile = "resources/wsdlfixture/InheritenceChildInterfaceService_RPC.wsdl";
+ doWSDLTest(seiClass, fixturefile);
+ }
private void doWSDLTest(Class seiClass, String fixturefile) throws Exception
{
Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/sei/InheritenceChildInterface.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/sei/InheritenceChildInterface.java 2006-06-29 04:10:02 UTC (rev 510)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/sei/InheritenceChildInterface.java 2006-06-29 07:53:21 UTC (rev 511)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.ws.tools.sei;
+
+import java.rmi.RemoteException;
+
+/**
+ *
+ * @author dar...@jb...
+ * @since 23-June-2006
+ */
+public interface InheritenceChildInterface extends InheritenceParentInterface
+{
+
+ public String getB() throws RemoteException;
+
+}
Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/sei/InheritenceChildInterface.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/sei/InheritenceParentInterface.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/sei/InheritenceParentInterface.java 2006-06-29 04:10:02 UTC (rev 510)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/sei/InheritenceParentInterface.java 2006-06-29 07:53:21 UTC (rev 511)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.ws.tools.sei;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ *
+ * @author dar...@jb...
+ * @since 23 June 2006
+ */
+public interface InheritenceParentInterface extends Remote
+{
+
+ public String getA() throws RemoteException;
+
+}
Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/sei/InheritenceParentInterface.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/resources/jbws1010/META-INF/application-client.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jbws1010/META-INF/application-client.xml 2006-06-29 04:10:02 UTC (rev 510)
+++ branches/jbossws-1.0/src/test/resources/jbws1010/META-INF/application-client.xml 2006-06-29 07:53:21 UTC (rev 511)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
+ version="1.4">
+
+ <display-name>HelloService</display-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component-ref>
+ <service-endpoint-interface>org.jboss.test.ws.jbws1010.InheritenceChildInterface</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+
+</application-client>
+
Property changes on: branches/jbossws-1.0/src/test/resources/jbws1010/META-INF/application-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/resources/jbws1010/META-INF/jboss-client.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jbws1010/META-INF/jboss-client.xml 2006-06-29 04:10:02 UTC (rev 510)
+++ branches/jbossws-1.0/src/test/resources/jbws1010/META-INF/jboss-client.xml 2006-06-29 07:53:21 UTC (rev 511)
@@ -0,0 +1,15 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!DOCTYPE jboss-client PUBLIC
+ "-//JBoss//DTD Application Client 4.0//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+
+<jboss-client>
+ <jndi-name>jbossws-client</jndi-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <wsdl-override>http://@jbosstest.host.name@:8080/jbossws-jbws1010?wsdl</wsdl-override>
+ </service-ref>
+
+</jboss-client>
Property changes on: branches/jbossws-1.0/src/test/resources/jbws1010/META-INF/jboss-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/jaxrpc-mapping.xml 2006-06-29 04:10:02 UTC (rev 510)
+++ branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/jaxrpc-mapping.xml 2006-06-29 07:53:21 UTC (rev 511)
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jbws1010</package-type>
+ <namespaceURI>http://org.jboss.test.ws/jbws1010/types</namespaceURI>
+ </package-mapping>
+ <service-interface-mapping>
+ <service-interface>org.jboss.test.ws.jbws1010.TestService</service-interface>
+ <wsdl-service-name xmlns:serviceNS='http://org.jboss.test.ws/jbws1010'>serviceNS:TestService</wsdl-service-name>
+ <port-mapping>
+ <port-name>InheritenceChildInterfacePort</port-name>
+ <java-port-name>InheritenceChildInterfacePort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.test.ws.jbws1010.InheritenceChildInterface</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS='http://org.jboss.test.ws/jbws1010'>portTypeNS:InheritenceChildInterface</wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS='http://org.jboss.test.ws/jbws1010'>bindingNS:InheritenceChildInterfaceBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>getB</java-method-name>
+ <wsdl-operation>getB</wsdl-operation>
+ <wsdl-return-value-mapping>
+ <method-return-value>java.lang.String</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1010'>wsdlMsgNS:InheritenceChildInterface_getBResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ <service-endpoint-method-mapping>
+ <java-method-name>getA</java-method-name>
+ <wsdl-operation>getA</wsdl-operation>
+ <wsdl-return-value-mapping>
+ <method-return-value>java.lang.String</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1010'>wsdlMsgNS:InheritenceChildInterface_getAResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Property changes on: branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/web.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/web.xml 2006-06-29 04:10:02 UTC (rev 510)
+++ branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/web.xml 2006-06-29 07:53:21 UTC (rev 511)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jbws1010.TestEndpointImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
+
Property changes on: branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/webservices.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/webservices.xml 2006-06-29 04:10:02 UTC (rev 510)
+++ branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/webservices.xml 2006-06-29 07:53:21 UTC (rev 511)
@@ -0,0 +1,15 @@
+<webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:impl='http://org.jboss.test.ws/jbws1010' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
+ <webservice-description>
+ <webservice-description-name>TestService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>InheritenceChildInterfacePort</port-component-name>
+ <wsdl-port>impl:InheritenceChildInterfacePort</wsdl-port>
+ <service-endpoint-interface>org.jboss.test.ws.jbws1010.InheritenceChildInterface</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>TestEndpoint</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
\ No newline at end of file
Property changes on: branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/webservices.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/wsdl/TestService.wsdl
===================================================================
--- branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/wsdl/TestService.wsdl 2006-06-29 04:10:02 UTC (rev 510)
+++ branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/wsdl/TestService.wsdl 2006-06-29 07:53:21 UTC (rev 511)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='TestService' targetNamespace='http://org.jboss.test.ws/jbws1010' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.test.ws/jbws1010' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types/>
+ <message name='InheritenceChildInterface_getA'/>
+ <message name='InheritenceChildInterface_getAResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <message name='InheritenceChildInterface_getB'/>
+ <message name='InheritenceChildInterface_getBResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <portType name='InheritenceChildInterface'>
+ <operation name='getA'>
+ <input message='tns:InheritenceChildInterface_getA'/>
+ <output message='tns:InheritenceChildInterface_getAResponse'/>
+ </operation>
+ <operation name='getB'>
+ <input message='tns:InheritenceChildInterface_getB'/>
+ <output message='tns:InheritenceChildInterface_getBResponse'/>
+ </operation>
+ </portType>
+ <binding name='InheritenceChildInterfaceBinding' type='tns:InheritenceChildInterface'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='getA'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1010' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1010' use='literal'/>
+ </output>
+ </operation>
+ <operation name='getB'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1010' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1010' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:InheritenceChildInterfaceBinding' name='InheritenceChildInterfacePort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on: branches/jbossws-1.0/src/test/resources/jbws1010/WEB-INF/wsdl/TestService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/resources/jbws1010/wstools-config.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jbws1010/wstools-config.xml 2006-06-29 04:10:02 UTC (rev 510)
+++ branches/jbossws-1.0/src/test/resources/jbws1010/wstools-config.xml 2006-06-29 07:53:21 UTC (rev 511)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ wstools -cp ../../../../output/tests/classes -dest ./WEB-INF -config wstools-config.xml
+-->
+
+<configuration xmlns="http://www.jboss.org/jbossws-tools" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+ <java-wsdl>
+ <service name="TestService" endpoint="org.jboss.test.ws.jbws1010.InheritenceChildInterface" style="rpc">
+ </service>
+ <namespaces target-namespace="http://org.jboss.test.ws/jbws1010" type-namespace="http://org.jboss.test.ws/jbws1010/types"/>
+ <mapping file="jaxrpc-mapping.xml"/>
+ <webservices servlet-link="TestEndpoint"/>
+ </java-wsdl>
+</configuration>
Property changes on: branches/jbossws-1.0/src/test/resources/jbws1010/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/resources/wsdlfixture/InheritenceChildInterfaceService_RPC.wsdl
===================================================================
--- branches/jbossws-1.0/src/test/resources/wsdlfixture/InheritenceChildInterfaceService_RPC.wsdl 2006-06-29 04:10:02 UTC (rev 510)
+++ branches/jbossws-1.0/src/test/resources/wsdlfixture/InheritenceChildInterfaceService_RPC.wsdl 2006-06-29 07:53:21 UTC (rev 511)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='InheritenceChildInterfaceService' targetNamespace='http://org.jboss.ws' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types/>
+ <message name='InheritenceChildInterface_getA'/>
+ <message name='InheritenceChildInterface_getAResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <message name='InheritenceChildInterface_getB'/>
+ <message name='InheritenceChildInterface_getBResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <portType name='InheritenceChildInterface'>
+ <operation name='getA'>
+ <input message='tns:InheritenceChildInterface_getA'/>
+ <output message='tns:InheritenceChildInterface_getAResponse'/>
+ </operation>
+ <operation name='getB'>
+ <input message='tns:InheritenceChildInterface_getB'/>
+ <output message='tns:InheritenceChildInterface_getBResponse'/>
+ </operation>
+ </portType>
+ <binding name='InheritenceChildInterfaceBinding' type='tns:InheritenceChildInterface'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='getA'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.ws' use='literal'/>
+ </output>
+ </operation>
+ <operation name='getB'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.ws' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='InheritenceChildInterfaceService'>
+ <port binding='tns:InheritenceChildInterfaceBinding' name='InheritenceChildInterfacePort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
Property changes on: branches/jbossws-1.0/src/test/resources/wsdlfixture/InheritenceChildInterfaceService_RPC.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
|
Author: mar...@jb...
Date: 2006-06-28 22:10:44 -0400 (Wed, 28 Jun 2006)
New Revision: 4864
Modified:
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DrlDumper.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/compiler/PackageBuilderTest.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/LeapsTest.java
Log:
JBRULES-293 NullPointer for DrlDumper when using Agenda Groups
-removed bad import
-test doesn't work for leaps, so overridden and added FIXME
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DrlDumper.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DrlDumper.java 2006-06-29 01:40:30 UTC (rev 4863)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DrlDumper.java 2006-06-29 02:10:44 UTC (rev 4864)
@@ -40,8 +40,6 @@
import org.drools.lang.descr.RuleDescr;
import org.drools.util.ReflectiveVisitor;
-import sun.security.krb5.internal.at;
-
/**
*
* @author <a href="mailto:jay...@gm...">Author Jayaram C S</a>
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/compiler/PackageBuilderTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/compiler/PackageBuilderTest.java 2006-06-29 01:40:30 UTC (rev 4863)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/compiler/PackageBuilderTest.java 2006-06-29 02:10:44 UTC (rev 4864)
@@ -83,7 +83,7 @@
ruleDescr.setLhs( lhs );
final ColumnDescr column = new ColumnDescr( Cheese.class.getName(),
- "stilton" );
+ "stilton" );
lhs.addDescr( column );
FieldBindingDescr fieldBindingDescr = new FieldBindingDescr( "price",
@@ -97,8 +97,8 @@
"java.util.Map" );
final ReturnValueDescr returnValue = new ReturnValueDescr( "price",
- "==",
- "x" );
+ "==",
+ "x" );
column.addDescr( returnValue );
// There is no m this should produce errors.
@@ -150,7 +150,7 @@
final Tuple tuple = new MockTuple( new HashMap() );
final Activation activation = new MockActivation( rule,
- tuple );
+ tuple );
KnowledgeHelper knowledgeHelper = new org.drools.base.DefaultKnowledgeHelper( activation,
workingMemory );
@@ -227,10 +227,10 @@
final Tuple tuple = new MockTuple( new HashMap() );
final Activation activation = new MockActivation( newRule,
- tuple );
+ tuple );
final KnowledgeHelper knowledgeHelper = new org.drools.base.DefaultKnowledgeHelper( activation,
- workingMemory );
+ workingMemory );
newRule.getConsequence().evaluate( knowledgeHelper,
workingMemory );
assertEquals( new Integer( 1 ),
@@ -238,7 +238,7 @@
}
private Object serializeIn(final byte[] bytes) throws IOException,
- ClassNotFoundException {
+ ClassNotFoundException {
final ObjectInput in = new ObjectInputStream( new ByteArrayInputStream( bytes ) );
final Object obj = in.readObject();
in.close();
@@ -285,12 +285,12 @@
ruleDescr.setLhs( lhs );
final ColumnDescr column = new ColumnDescr( Cheese.class.getName(),
- "stilton" );
+ "stilton" );
lhs.addDescr( column );
final LiteralDescr listeralDescr = new LiteralDescr( "type",
- "==",
- "stilton" );
+ "==",
+ "stilton" );
column.addDescr( listeralDescr );
@@ -313,7 +313,7 @@
ruleDescr.setLhs( lhs );
final ColumnDescr column = new ColumnDescr( Cheese.class.getName(),
- "stilton" );
+ "stilton" );
lhs.addDescr( column );
FieldBindingDescr fieldBindingDescr = new FieldBindingDescr( "price",
@@ -327,8 +327,8 @@
"java.util.Map" );
final ReturnValueDescr returnValue = new ReturnValueDescr( "price",
- "==",
- "new Integer(( ( ( Integer )map.get(x) ).intValue() * y.intValue()))" );
+ "==",
+ "new Integer(( ( ( Integer )map.get(x) ).intValue() * y.intValue()))" );
column.addDescr( returnValue );
ruleDescr.setConsequence( "modify(stilton);" );
@@ -381,19 +381,19 @@
ruleDescr.setLhs( lhs );
final ColumnDescr column = new ColumnDescr( Cheese.class.getName(),
- "stilton" );
+ "stilton" );
lhs.addDescr( column );
final FieldBindingDescr fieldBindingDescr = new FieldBindingDescr( "price",
- "x" );
+ "x" );
column.addDescr( fieldBindingDescr );
packageDescr.addGlobal( "map",
"java.util.Map" );
final PredicateDescr predicate = new PredicateDescr( "price",
- "y",
- "( ( Integer )map.get(x) ).intValue() == y.intValue()" );
+ "y",
+ "( ( Integer )map.get(x) ).intValue() == y.intValue()" );
column.addDescr( predicate );
ruleDescr.setConsequence( "modify(stilton);" );
@@ -446,7 +446,7 @@
ruleDescr.setLhs( lhs );
final ColumnDescr column = new ColumnDescr( Cheese.class.getName(),
- "stilton" );
+ "stilton" );
lhs.addDescr( column );
FieldBindingDescr fieldBindingDescr = new FieldBindingDescr( "price",
@@ -507,8 +507,8 @@
public void testOr() throws Exception {
final PackageBuilder builder = new PackageBuilder();
final Rule rule = createRule( new OrDescr(),
- builder,
- "modify(stilton);" );
+ builder,
+ "modify(stilton);" );
assertLength( 0,
builder.getErrors() );
@@ -527,8 +527,8 @@
public void testAnd() throws Exception {
final PackageBuilder builder = new PackageBuilder();
final Rule rule = createRule( new AndDescr(),
- builder,
- "modify(stilton);" );
+ builder,
+ "modify(stilton);" );
assertLength( 0,
builder.getErrors() );
@@ -708,11 +708,11 @@
ruleDescr.setLhs( lhs );
final ColumnDescr columnDescr = new ColumnDescr( Cheese.class.getName(),
- "stilton" );
+ "stilton" );
final LiteralDescr literalDescr = new LiteralDescr( "type",
- "==",
- null );
+ "==",
+ null );
columnDescr.addDescr( literalDescr );
ruleDescr.setConsequence( "" );
@@ -725,9 +725,9 @@
assertLength( 0,
builder.getErrors() );
}
-
+
public void testDuplicateRuleNames() throws Exception {
-
+
final PackageBuilder builder = new PackageBuilder();
final PackageDescr packageDescr = new PackageDescr( "p1" );
@@ -743,46 +743,87 @@
null );
columnDescr.addDescr( literalDescr );
ruleDescr.setConsequence( "" );
-
+
ruleDescr = new RuleDescr( "rule-1" );
- ruleDescr.setLocation( 42, 43 );
+ ruleDescr.setLocation( 42,
+ 43 );
packageDescr.addRule( ruleDescr );
lhs = new AndDescr();
ruleDescr.setLhs( lhs );
columnDescr = new ColumnDescr( Cheese.class.getName(),
- "stilton" );
+ "stilton" );
literalDescr = new LiteralDescr( "type",
- "!=",
- null );
+ "!=",
+ null );
columnDescr.addDescr( literalDescr );
ruleDescr.setConsequence( "" );
-
-
+
ruleDescr = new RuleDescr( "rule-2" );
- ruleDescr.setLocation( 42, 43 );
+ ruleDescr.setLocation( 42,
+ 43 );
packageDescr.addRule( ruleDescr );
lhs = new AndDescr();
ruleDescr.setLhs( lhs );
columnDescr = new ColumnDescr( Cheese.class.getName(),
- "stilton" );
+ "stilton" );
literalDescr = new LiteralDescr( "type",
- "!=",
- null );
+ "!=",
+ null );
columnDescr.addDescr( literalDescr );
- ruleDescr.setConsequence( "" );
+ ruleDescr.setConsequence( "" );
builder.addPackage( packageDescr );
-
-
assertLength( 1,
builder.getErrors() );
ParserError err = (ParserError) builder.getErrors()[0];
- assertEquals(42, err.getRow());
- assertEquals(43, err.getCol());
-
+ assertEquals( 42,
+ err.getRow() );
+ assertEquals( 43,
+ err.getCol() );
+
}
+ public void testDuplicateDeclaration() {
+ final PackageBuilder builder = new PackageBuilder();
+
+ final PackageDescr packageDescr = new PackageDescr( "p1" );
+ final RuleDescr ruleDescr = new RuleDescr( "rule-1" );
+ packageDescr.addRule( ruleDescr );
+
+ final AndDescr lhs = new AndDescr();
+ ruleDescr.setLhs( lhs );
+
+ final ColumnDescr column1 = new ColumnDescr( Cheese.class.getName(),
+ "stilton" );
+ lhs.addDescr( column1 );
+
+ final FieldBindingDescr fieldBindingDescr = new FieldBindingDescr( "type",
+ "$type" );
+
+ final LiteralDescr listeralDescr = new LiteralDescr( "type",
+ "==",
+ "stilton" );
+
+ column1.addDescr( fieldBindingDescr );
+ column1.addDescr( listeralDescr );
+
+ final ColumnDescr column2 = new ColumnDescr( Cheese.class.getName(),
+ "stilton" );
+ lhs.addDescr( column2 );
+ column2.addDescr( fieldBindingDescr );
+
+ ruleDescr.setConsequence( "modify(stilton);" );
+
+ builder.addPackage( packageDescr );
+
+ And and = builder.getPackage().getRule( "rule-1" ).getLhs();
+ and.getChildren().get( 0 );
+
+ assertLength( 0,
+ builder.getErrors() );
+ }
+
private void createReturnValueRule(final PackageDescr packageDescr,
final String expression) {
final RuleDescr ruleDescr = new RuleDescr( "rule-1" );
@@ -792,7 +833,7 @@
ruleDescr.setLhs( lhs );
final ColumnDescr column = new ColumnDescr( Cheese.class.getName(),
- "stilton" );
+ "stilton" );
lhs.addDescr( column );
FieldBindingDescr fieldBindingDescr = new FieldBindingDescr( "price",
@@ -806,8 +847,8 @@
"java.util.Map" );
final ReturnValueDescr returnValue = new ReturnValueDescr( "price",
- "==",
- expression );
+ "==",
+ expression );
column.addDescr( returnValue );
ruleDescr.setConsequence( "modify(stilton);" );
@@ -822,19 +863,19 @@
ruleDescr.setLhs( lhs );
final ColumnDescr column = new ColumnDescr( Cheese.class.getName(),
- "stilton" );
+ "stilton" );
lhs.addDescr( column );
final FieldBindingDescr fieldBindingDescr = new FieldBindingDescr( "price",
- "x" );
+ "x" );
column.addDescr( fieldBindingDescr );
packageDescr.addGlobal( "map",
"java.util.Map" );
final PredicateDescr predicate = new PredicateDescr( "price",
- "y",
- expression );
+ "y",
+ expression );
column.addDescr( predicate );
ruleDescr.setConsequence( "modify(stilton);" );
@@ -893,11 +934,11 @@
lhs.addDescr( (PatternDescr) ceDescr );
final ColumnDescr columnDescr = new ColumnDescr( Cheese.class.getName(),
- "stilton" );
+ "stilton" );
final LiteralDescr literalDescr = new LiteralDescr( "type",
- "==",
- "stilton" );
+ "==",
+ "stilton" );
columnDescr.addDescr( literalDescr );
ceDescr.addDescr( columnDescr );
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/LeapsTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/LeapsTest.java 2006-06-29 01:40:30 UTC (rev 4863)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/LeapsTest.java 2006-06-29 02:10:44 UTC (rev 4864)
@@ -19,6 +19,7 @@
import java.io.ByteArrayInputStream;
import java.io.InputStreamReader;
import java.io.Reader;
+import java.io.StringReader;
import java.util.ArrayList;
import java.util.List;
@@ -28,9 +29,13 @@
import org.drools.QueryResults;
import org.drools.RuleBase;
import org.drools.WorkingMemory;
+import org.drools.compiler.DrlParser;
import org.drools.compiler.PackageBuilder;
+import org.drools.lang.DrlDumper;
+import org.drools.lang.descr.PackageDescr;
import org.drools.rule.Package;
import org.drools.rule.Rule;
+import org.drools.xml.XmlDumper;
/**
* This runs the integration test cases with the leaps implementation.
@@ -289,4 +294,90 @@
assertEquals( "help" , workingMemory.getObjects().get(1) );
}
+ // @FIXME this is broken for leaps
+ public void testDumpers() throws Exception {
+ assertTrue(true);
+// final DrlParser parser = new DrlParser();
+// final PackageDescr pkg = parser.parse( new InputStreamReader( getClass().getResourceAsStream( "test_Dumpers.drl" ) ) );
+//
+// PackageBuilder builder = new PackageBuilder();
+// builder.addPackage(pkg );
+//
+// RuleBase ruleBase = getRuleBase();
+// ruleBase.addPackage( builder.getPackage() );
+// WorkingMemory workingMemory = ruleBase.newWorkingMemory();
+//
+// List list = new ArrayList();
+// workingMemory.setGlobal( "list",
+// list );
+//
+// final Cheese brie = new Cheese( "brie",
+// 12 );
+// workingMemory.assertObject( brie );
+//
+// workingMemory.fireAllRules();
+//
+// assertEquals( 3,
+// list.size() );
+// assertEquals( "3 1",
+// list.get( 0 ) );
+// assertEquals( "MAIN",
+// list.get( 1 ) );
+// assertEquals( "1 1",
+// list.get( 2 ) );
+//
+// final DrlDumper drlDumper = new DrlDumper();
+// final String drlResult = drlDumper.dump( pkg );
+// builder = new PackageBuilder();
+// builder.addPackageFromDrl( new StringReader( drlResult ) );
+//
+// ruleBase = getRuleBase();
+// ruleBase.addPackage( builder.getPackage() );
+// workingMemory = ruleBase.newWorkingMemory();
+//
+// list = new ArrayList();
+// workingMemory.setGlobal( "list",
+// list );
+//
+// workingMemory.assertObject( brie );
+//
+// workingMemory.fireAllRules();
+//
+// assertEquals( 3,
+// list.size() );
+// assertEquals( "3 1",
+// list.get( 0 ) );
+// assertEquals( "MAIN",
+// list.get( 1 ) );
+// assertEquals( "1 1",
+// list.get( 2 ) );
+//
+// final XmlDumper xmlDumper = new XmlDumper();
+// final String xmlResult = xmlDumper.dump( pkg );
+// builder = new PackageBuilder();
+// builder.addPackageFromXml( new StringReader( xmlResult ) );
+//
+// ruleBase = getRuleBase();
+// ruleBase.addPackage( builder.getPackage() );
+// workingMemory = ruleBase.newWorkingMemory();
+//
+// list = new ArrayList();
+// workingMemory.setGlobal( "list",
+// list );
+//
+// workingMemory.assertObject( brie );
+//
+// workingMemory.fireAllRules();
+//
+// assertEquals( 3,
+// list.size() );
+// assertEquals( "3 1",
+// list.get( 0 ) );
+// assertEquals( "MAIN",
+// list.get( 1 ) );
+// assertEquals( "1 1",
+// list.get( 2 ) );
+ }
+
+
}
|
|
From: <jbo...@li...> - 2006-06-29 01:40:33
|
Author: mar...@jb...
Date: 2006-06-28 21:40:30 -0400 (Wed, 28 Jun 2006)
New Revision: 4863
Modified:
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
Log:
JBRULES-293 NullPointer for DrlDumper when using Agenda Groups
-Fixed DrlDumper by putting quotes around agenda and activation groups
-Added a more complex integration test case for drl and xml
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java 2006-06-29 01:39:53 UTC (rev 4862)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java 2006-06-29 01:40:30 UTC (rev 4863)
@@ -1294,7 +1294,7 @@
list.get( 7 ) );
}
- public void testDumper() throws Exception {
+ public void testDumpers() throws Exception {
final DrlParser parser = new DrlParser();
final PackageDescr pkg = parser.parse( new InputStreamReader( getClass().getResourceAsStream( "test_Dumpers.drl" ) ) );
|
Author: mar...@jb...
Date: 2006-06-28 21:39:53 -0400 (Wed, 28 Jun 2006)
New Revision: 4862
Added:
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Dumpers.drl
Modified:
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DrlDumper.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/xml/DumperTest.java
Log:
JBRULES-293 NullPointer for DrlDumper when using Agenda Groups
-Fixed DrlDumper by putting quotes around agenda and activation groups
-Added a more complex integration test case for drl and xml
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DrlDumper.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DrlDumper.java 2006-06-29 01:22:22 UTC (rev 4861)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DrlDumper.java 2006-06-29 01:39:53 UTC (rev 4862)
@@ -40,6 +40,8 @@
import org.drools.lang.descr.RuleDescr;
import org.drools.util.ReflectiveVisitor;
+import sun.security.krb5.internal.at;
+
/**
*
* @author <a href="mailto:jay...@gm...">Author Jayaram C S</a>
@@ -69,7 +71,15 @@
public void visitAttributeDescr(final AttributeDescr attributeDescr) {
this.template = new String();
- this.template = "\t " + attributeDescr.getName() + " " + attributeDescr.getValue() + DrlDumper.eol;
+ String name = attributeDescr.getName();
+ String value = null;
+ if ( name.equals( "agenda-group" ) || name.equals( "activation-group" ) ) {
+ // These attributes may need quotes around them, if they have spaces, so add anyway
+ value = "\"" + attributeDescr.getValue() + "\"";
+ } else {
+ value = attributeDescr.getValue();
+ }
+ this.template = "\t " + name + " " + value + DrlDumper.eol;
}
public void visitBoundVariableDescr(final BoundVariableDescr descr) {
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java 2006-06-29 01:22:22 UTC (rev 4861)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java 2006-06-29 01:39:53 UTC (rev 4862)
@@ -25,6 +25,7 @@
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.io.Reader;
+import java.io.StringReader;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@@ -64,11 +65,13 @@
import org.drools.event.DebugWorkingMemoryEventListener;
import org.drools.event.DefaultAgendaEventListener;
import org.drools.integrationtests.helloworld.Message;
+import org.drools.lang.DrlDumper;
import org.drools.lang.descr.PackageDescr;
import org.drools.rule.Package;
import org.drools.rule.Rule;
import org.drools.spi.ActivationGroup;
import org.drools.spi.AgendaGroup;
+import org.drools.xml.XmlDumper;
/**
* This contains the test cases for each engines implementation to execute.
@@ -1290,7 +1293,91 @@
assertEquals( "group2",
list.get( 7 ) );
}
+
+ public void testDumper() throws Exception {
+ final DrlParser parser = new DrlParser();
+ final PackageDescr pkg = parser.parse( new InputStreamReader( getClass().getResourceAsStream( "test_Dumpers.drl" ) ) );
+
+ PackageBuilder builder = new PackageBuilder();
+ builder.addPackage(pkg );
+ RuleBase ruleBase = getRuleBase();
+ ruleBase.addPackage( builder.getPackage() );
+ WorkingMemory workingMemory = ruleBase.newWorkingMemory();
+
+ List list = new ArrayList();
+ workingMemory.setGlobal( "list",
+ list );
+
+ final Cheese brie = new Cheese( "brie",
+ 12 );
+ workingMemory.assertObject( brie );
+
+ workingMemory.fireAllRules();
+
+ assertEquals( 3,
+ list.size() );
+ assertEquals( "3 1",
+ list.get( 0 ) );
+ assertEquals( "MAIN",
+ list.get( 1 ) );
+ assertEquals( "1 1",
+ list.get( 2 ) );
+
+ final DrlDumper drlDumper = new DrlDumper();
+ final String drlResult = drlDumper.dump( pkg );
+ builder = new PackageBuilder();
+ builder.addPackageFromDrl( new StringReader( drlResult ) );
+
+ ruleBase = getRuleBase();
+ ruleBase.addPackage( builder.getPackage() );
+ workingMemory = ruleBase.newWorkingMemory();
+
+ list = new ArrayList();
+ workingMemory.setGlobal( "list",
+ list );
+
+ workingMemory.assertObject( brie );
+
+ workingMemory.fireAllRules();
+
+ assertEquals( 3,
+ list.size() );
+ assertEquals( "3 1",
+ list.get( 0 ) );
+ assertEquals( "MAIN",
+ list.get( 1 ) );
+ assertEquals( "1 1",
+ list.get( 2 ) );
+
+ final XmlDumper xmlDumper = new XmlDumper();
+ final String xmlResult = xmlDumper.dump( pkg );
+ builder = new PackageBuilder();
+ builder.addPackageFromXml( new StringReader( xmlResult ) );
+
+ ruleBase = getRuleBase();
+ ruleBase.addPackage( builder.getPackage() );
+ workingMemory = ruleBase.newWorkingMemory();
+
+ list = new ArrayList();
+ workingMemory.setGlobal( "list",
+ list );
+
+ workingMemory.assertObject( brie );
+
+ workingMemory.fireAllRules();
+
+ assertEquals( 3,
+ list.size() );
+ assertEquals( "3 1",
+ list.get( 0 ) );
+ assertEquals( "MAIN",
+ list.get( 1 ) );
+ assertEquals( "1 1",
+ list.get( 2 ) );
+ }
+
+
public void testXorGroups() throws Exception {
final PackageBuilder builder = new PackageBuilder();
builder.addPackageFromDrl( new InputStreamReader( getClass().getResourceAsStream( "test_ActivationGroups.drl" ) ) );
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/xml/DumperTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/xml/DumperTest.java 2006-06-29 01:22:22 UTC (rev 4861)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/xml/DumperTest.java 2006-06-29 01:39:53 UTC (rev 4862)
@@ -3,13 +3,20 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.List;
import junit.framework.TestCase;
+import org.drools.Cheese;
+import org.drools.RuleBase;
+import org.drools.WorkingMemory;
import org.drools.compiler.DrlParser;
+import org.drools.compiler.PackageBuilder;
import org.drools.lang.DrlDumper;
import org.drools.lang.descr.PackageDescr;
import org.drools.lang.descr.RuleDescr;
+import org.drools.rule.Package;
/**
* Test the dump/convert format utilities.
@@ -85,7 +92,7 @@
ruleDumped.getConsequence() );
}
-
+
private void assertEqualsIgnoreWhitespace(final String expected,
final String actual) {
final String cleanExpected = expected.replaceAll( "\\s+",
Added: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Dumpers.drl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Dumpers.drl 2006-06-29 01:22:22 UTC (rev 4861)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Dumpers.drl 2006-06-29 01:39:53 UTC (rev 4862)
@@ -0,0 +1,43 @@
+package org.drools.test;
+
+import org.drools.Cheese;
+
+global java.util.List list;
+
+rule "test MAIN 1"
+ salience 10
+ when
+ Cheese( )
+ then
+ list.add( "MAIN" );
+ drools.setFocus( "agenda group 1" );
+end
+
+rule "test group1 1"
+ agenda-group "agenda group 1"
+ when
+ Cheese( )
+ then
+ list.add( "1 1" );
+end
+
+rule "test group3 1"
+ salience 5
+ agenda-group "agenda group 3"
+ activation-group "activation group 3"
+ auto-focus true
+ when
+ Cheese( )
+ then
+ list.add( "3 1" );
+end
+
+
+rule "test group3 2"
+ agenda-group "agenda group 3"
+ activation-group "activation group 3"
+ when
+ Cheese( )
+ then
+ list.add( "3 2" );
+end
\ No newline at end of file
|
|
From: <jbo...@li...> - 2006-06-29 01:22:26
|
Author: mic...@jb...
Date: 2006-06-28 21:22:22 -0400 (Wed, 28 Jun 2006)
New Revision: 4861
Modified:
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/PackageBuilder.java
Log:
improved comments
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/PackageBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/PackageBuilder.java 2006-06-29 01:01:11 UTC (rev 4860)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/PackageBuilder.java 2006-06-29 01:22:22 UTC (rev 4861)
@@ -55,24 +55,16 @@
* This can be done by merging into existing binary packages, or totally from source.
*/
public class PackageBuilder {
+
private JavaCompiler compiler;
-
private Package pkg;
-
private List results;
-
private PackageStore packageStoreWrapper;
-
private MemoryResourceReader src;
-
private PackageBuilderConfiguration configuration;
-
private Map errorHandlers;
-
private List generatedClassList;
-
private ClassTypeResolver typeResolver;
-
private ClassFieldExtractorCache classFieldExtractorCache;
/**
@@ -173,7 +165,8 @@
/**
* This adds a package from a Descr/AST
- * This will also trigger a compile.
+ * This will also trigger a compile, if there are any generated classes to compile
+ * of course.
*/
public void addPackage(final PackageDescr packageDescr) {
@@ -355,6 +348,7 @@
/**
* This will setup the semantic components of the rule for compiling later on.
+ * It will not actually call the compiler
*/
private void addRuleSemantics(final RuleBuilder builder,
final Rule rule,
@@ -533,6 +527,11 @@
* This is needed, as the compiling is done as one
* hit at the end, and we need to be able to work out what rule/ast element
* caused the error.
+ *
+ * An error handler it created for each class task that is queued to be compiled.
+ * This doesn't mean an error has occurred, it just means it *may* occur
+ * in the future and we need to be able to map it back to the AST element
+ * that originally spawned the code to be compiled.
*/
public abstract static class ErrorHandler {
private List errors = new ArrayList();
@@ -542,13 +541,20 @@
this.errors.add( err );
}
+ /**
+ *
+ * @return A DroolsError object populated as appropriate,
+ * should the unthinkable happen and this need to be reported.
+ */
public abstract DroolsError getError();
/**
* We must use an error of JCI problem objects.
* If there are no problems, null is returned.
+ * These errors are placed in the DroolsError instances.
+ * Its not 1 to 1 with reported errors.
*/
- protected CompilationProblem[] getErrors() {
+ protected CompilationProblem[] collectCompilerProblems() {
if ( errors.size() == 0 ) {
return null;
} else {
@@ -575,7 +581,7 @@
public DroolsError getError() {
return new RuleError( rule,
descr,
- getErrors(),
+ collectCompilerProblems(),
message );
}
@@ -608,7 +614,7 @@
public DroolsError getError() {
return new FunctionError( descr,
- getErrors(),
+ collectCompilerProblems(),
message );
}
|
|
From: <jbo...@li...> - 2006-06-29 01:01:19
|
Author: unibrew
Date: 2006-06-28 21:01:11 -0400 (Wed, 28 Jun 2006)
New Revision: 4860
Modified:
labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/delete_topic.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_move.xhtml
Log:
[JBFORUMS-44] Improving moderator's view XHTML's as well as improving their authorization support.
Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java 2006-06-29 00:58:59 UTC (rev 4859)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java 2006-06-29 01:01:11 UTC (rev 4860)
@@ -66,6 +66,7 @@
private Collection page = new ArrayList();
private Map topicNavigator = new HashMap();
private Map checkboxes;
+
private ResourceBundle bundle;
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/delete_topic.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/delete_topic.xhtml 2006-06-29 00:58:59 UTC (rev 4859)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/delete_topic.xhtml 2006-06-29 01:01:11 UTC (rev 4860)
@@ -34,7 +34,7 @@
<ui:composition template="/views/common/common.xhtml">
<ui:define name="mainContent">
-
+<forums:isAllowed fragment="acl://moderateForum" contextData="#{moderator.forum}">
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0">
<tr>
<th class="thHead" height="25" valign="middle"><span class="tableTitle">${resource.Topic_delete_message}</span></th>
@@ -58,7 +58,7 @@
</tr>
</table>
-
+</forums:isAllowed>
</ui:define>
</ui:composition>
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_move.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_move.xhtml 2006-06-29 00:58:59 UTC (rev 4859)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_move.xhtml 2006-06-29 01:01:11 UTC (rev 4860)
@@ -29,85 +29,95 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:forums="http://www.jboss.com/products/jbossportal/forums" class="bb">
- <ui:composition template="/views/common/common.xhtml">
- <ui:define name="mainContent">
- <h:form>
- <table width="100%" cellspacing="2" cellpadding="2" border="0"
- align="center">
- <tr>
- <td align="left" class="nav">
- <h:outputLink value="#{forums:outputLink(shared.links['forum'],true)}"
- styleClass="nav">
- <f:param name="f" value="#{moderator.forum.id}"/>
- <h:outputText value="#{moderator.forum.name}"/>
- </h:outputLink>
- </td>
- </tr>
- </table>
- <table width="100%" cellpadding="4" cellspacing="1" border="0"
- class="forumline">
- <tr>
- <th height="25" class="thHead">
- <b>${resource.Confirm}</b>
- </th>
- </tr>
- <tr>
- <td class="row1">
- <table width="100%" border="0" cellspacing="0"
- cellpadding="1">
- <tr>
- <td>&nbsp;</td>
- </tr>
- <tr>
- <td align="center">
- <span class="gen">
- ${resource.Move_to_forum} &nbsp;
- <select name="forum_to_id">
- <option value="-1">${resource.Select_forum}</option>
- <c:forEach items="${jumpbox.categories}"
- var="category">
- <option value="-1"></option>
- <option value="-1">${category.title}</option>
- <option value="-1">----------------</option>
- <c:forEach items="${category.forums}"
- var="forum">
- <option value="${forum.id}">${forum.name}</option>
- </c:forEach>
- </c:forEach>
- </select>
- <br/>
- <br/>
- <!-- TODO: FUTURE FEATURE: SHADOW NOT AVAILABLE-->
- <!--<input type="checkbox" name="move_leave_shadow" checked="checked"DISABLED/>${resource.Leave_shadow_topic}[N/A yet...]<br /> -->
- <br/>
- ${resource.Confirm_move_topic}
- </span>
- <br/>
- <br/>
- <h:commandButton type="submit" value="Yes"
- styleClass="mainoption"
- action="#{moderator.moveTopic}">
- <f:param name="f"
- value="#{moderator.forum.id}"/>
- </h:commandButton>
- &nbsp;&nbsp;
- <h:commandButton type="button" value="No"
- styleClass="liteoption"
- onclick="javascript:history.back();">
- <f:param name="f"
- value="#{moderator.forum.id}"/>
- </h:commandButton>
- </td>
- </tr>
- <tr>
- <td>&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </h:form>
- </ui:define>
- </ui:composition>
+<ui:composition template="/views/common/common.xhtml">
+<ui:define name="mainContent">
+<forums:isAllowed fragment="acl://moderateForum" contextData="#{moderator.forum}">
+<h:form>
+ <table width="100%" cellspacing="2" cellpadding="2" border="0"
+ align="center">
+ <tr>
+ <td align="left" class="nav">
+ <h:outputLink value="#{forums:outputLink(shared.links['forum'],true)}"
+ styleClass="nav">
+ <f:param name="f" value="#{moderator.forum.id}"/>
+ <h:outputText value="#{moderator.forum.name}"/>
+ </h:outputLink>
+ </td>
+ </tr>
+ </table>
+ <table width="100%" cellpadding="4" cellspacing="1" border="0"
+ class="forumline">
+ <tr>
+ <th height="25" class="thHead">
+ <b>${resource.Confirm}</b>
+ </th>
+ </tr>
+ <tr>
+ <td class="row1">
+ <table width="100%" border="0" cellspacing="0"
+ cellpadding="1">
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td align="center">
+ <span class="gen">
+ ${resource.Move_to_forum} &nbsp;
+ <select name="forum_to_id">
+ <option value="-1">${resource.Select_forum}</option>
+ <c:forEach items="${jumpbox.categories}"
+ var="category">
+ <forums:isAllowed fragment="acl://readCategory"
+ contextData="#{category}">
+ <option value="-1"></option>
+ <option value="-1">${category.title}</option>
+ <option value="-1">----------------</option>
+ <c:forEach items="${category.forums}"
+ var="forum">
+ <forums:isAllowed fragment="acl://newTopic"
+ contextData="#{forum}">
+ <option value="${forum.id}">
+ ${forum.name}
+ </option>
+ </forums:isAllowed>
+ </c:forEach>
+ </forums:isAllowed>
+ </c:forEach>
+ </select>
+ <br/>
+ <br/>
+ <!-- TODO: FUTURE FEATURE: SHADOW NOT AVAILABLE-->
+ <!--<input type="checkbox" name="move_leave_shadow" checked="checked"DISABLED/>${resource.Leave_shadow_topic}[N/A yet...]<br /> -->
+ <br/>
+ ${resource.Confirm_move_topic}
+ </span>
+ <br/>
+ <br/>
+ <h:commandButton type="submit" value="Yes"
+ styleClass="mainoption"
+ action="#{moderator.moveTopic}">
+ <f:param name="f"
+ value="#{moderator.forum.id}"/>
+ </h:commandButton>
+ &nbsp;&nbsp;
+ <h:commandButton type="button" value="No"
+ styleClass="liteoption"
+ onclick="javascript:history.back();">
+ <f:param name="f"
+ value="#{moderator.forum.id}"/>
+ </h:commandButton>
+ </td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+</h:form>
+</forums:isAllowed>
+</ui:define>
+</ui:composition>
</div>
\ No newline at end of file
|
Author: unibrew Date: 2006-06-28 20:58:59 -0400 (Wed, 28 Jun 2006) New Revision: 4859 Added: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/SplitTopic.java Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_split.xhtml Log: [JBFORUMS-54] Rewriting JSP to XHTML and adding managed bean for SplitTopic moderator action. Added: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/SplitTopic.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/SplitTopic.java 2006-06-29 00:07:38 UTC (rev 4858) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/SplitTopic.java 2006-06-29 00:58:59 UTC (rev 4859) @@ -0,0 +1,42 @@ +/* +* JBoss, Home of Professional Open Source +* Copyright 2005, JBoss Inc., 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.portlet.forums.ui.action; + +import org.jboss.portlet.forums.ui.BaseController; + +/** + * @author <a href="mailto:rys...@jb...">Ryszard Kozmik</a> + */ +public class SplitTopic extends BaseController { + + private String newTopicTitle; + + + public void setNewTopicTitle(String newTopicTitle) { + this.newTopicTitle = newTopicTitle; + } + + public String getNewTopicTitle() { + return newTopicTitle; + } +} Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml 2006-06-29 00:07:38 UTC (rev 4858) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml 2006-06-29 00:58:59 UTC (rev 4859) @@ -292,12 +292,17 @@ <managed-bean-name>moderator</managed-bean-name> <managed-bean-class>org.jboss.portlet.forums.ui.action.ModeratorAction</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> - <managed-property> - <property-name>userPreferences</property-name> - <property-class>org.jboss.portlet.forums.ui.action.PreferenceController</property-class> - <value>#{prefController}</value> - </managed-property> - </managed-bean> + <managed-property> + <property-name>userPreferences</property-name> + <property-class>org.jboss.portlet.forums.ui.action.PreferenceController</property-class> + <value>#{prefController}</value> + </managed-property> + </managed-bean> + <managed-bean> + <managed-bean-name>splitTopic</managed-bean-name> + <managed-bean-class>org.jboss.portlet.forums.ui.action.SplitTopic</managed-bean-class> + <managed-bean-scope>request</managed-bean-scope> + </managed-bean> <navigation-rule> <from-view-id>/views/moderator/modcp_body.xhtml</from-view-id> <navigation-case> Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_split.xhtml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_split.xhtml 2006-06-29 00:07:38 UTC (rev 4858) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_split.xhtml 2006-06-29 00:58:59 UTC (rev 4859) @@ -29,85 +29,146 @@ xmlns:f="http://java.sun.com/jsf/core" xmlns:forums="http://www.jboss.com/products/jbossportal/forums" class="bb"> - <ui:composition template="/views/common/common.xhtml"> - <ui:define name="mainContent"> -<c:if test="#{moderator.initialized && moderator.forum!=null && moderator.forum.id!=-1}"> - <forums:isAllowed fragment="acl://moderateForum" contextData="#{moderator.forum}"> - <h:messages layout="table" infoStyle="color:green" warnStyle="color:red"/> +<ui:composition template="/views/common/common.xhtml"> +<ui:define name="mainContent"> +<c:if test="#{splitTopic.initialized && splitTopic.topic!=null && splitTopic.topic.id!=-1}"> +<forums:isAllowed fragment="acl://moderateForum" contextData="#{splitTopic.forum}"> +<h:messages layout="table" infoStyle="color:green" warnStyle="color:red"/> -<form method="post" action="${n:out("S_SPLIT_ACTION")}"> +<h:form> <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> - <td align="left" class="nav"><a href="${n:out("U_INDEX")}" class="nav">${n:i18n("L_INDEX")}</a><span - class="nav"> - -> <a href="${n:out("U_VIEW_FORUM")}" class="nav">${n:out("FORUM_NAME")}</a></span></td> + <td align="left" class="nav"> + <span class="nav"> + ->&nbsp; + <h:outputLink value="#{forums:outputLink(shared.links['forum'],true)}" + styleClass="nav"> + <f:param name="f" value="#{splitTopic.forum.id}"/> + <h:outputText value="#{splitTopic.forum.name}"/> + </h:outputLink> + </span> + </td> </tr> </table> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> - <th height="25" class="thHead" colspan="3" nowrap="nowrap">${n:i18n("L_SPLIT_TOPIC")}</th> + <th height="25" class="thHead" colspan="3" nowrap="nowrap"> + ${resource.L_SPLIT_TOPIC} + </th> </tr> <tr> - <td class="row2" colspan="3" align="center"><span class="gensmall">${n:i18n("L_SPLIT_TOPIC_EXPLAIN")}</span> + <td class="row2" colspan="3" align="center"> + <span class="gensmall">${resource.L_SPLIT_TOPIC_EXPLAIN}</span> </td> </tr> <tr> - <td class="row1" nowrap="nowrap"><span class="gen">${n:i18n("L_SPLIT_SUBJECT")}</span></td> - <td class="row2" colspan="2"><input class="post" type="text" size="35" style="width: 350px" maxlength="60" - name="subject"/></td> + <td class="row1" nowrap="nowrap"> + <span class="gen">${resource.L_SPLIT_SUBJECT}</span> + </td> + <td class="row2" colspan="2"> + <h:inputText class="post" size="35" style="width: 350px" maxlength="60" + name="subject" value="#{splitTopic.newTopicTitle}"/> + </td> </tr> <tr> - <td class="row1" nowrap="nowrap"><span class="gen">${n:i18n("L_SPLIT_FORUM")}</span></td> - <td class="row2" colspan="2">${n:out("S_FORUM_SELECT")}</td> + <td class="row1" nowrap="nowrap"> + <span class="gen">${resource.L_SPLIT_FORUM}</span> + </td> + <td class="row2" colspan="2"> + <select name="forum_to_id"> + <option value="-1">${resource.Select_forum}</option> + <c:forEach items="${jumpbox.categories}" + var="category"> + <forums:isAllowed fragment="acl://readCategory" + contextData="#{category}"> + <option value="-1"></option> + <option value="-1">${category.title}</option> + <option value="-1">----------------</option> + <c:forEach items="${category.forums}" + var="forum"> + <forums:isAllowed fragment="acl://newTopic" + contextData="#{forum}"> + <option value="${forum.id}"> + ${forum.name} + </option> + </forums:isAllowed> + </c:forEach> + </forums:isAllowed> + </c:forEach> + </select> + </td> </tr> <tr> <td class="catHead" colspan="3" height="28"> - <table width="60%" cellspacing="0" cellpadding="0" border="0" align="center"> + <table width="60%" cellspacing="0" cellpadding="0" + border="0" align="center"> <tr> <td width="50%" align="center"> - <input class="liteoption" type="submit" name="split_type_all" value="${n:i18n("L_SPLIT_POSTS")}"/> + <h:commandButton action="{splitTopic.splitPosts}" + type="submit" + class="liteoption" + name="split_type_all" + value="{resource.L_SPLIT_POSTS}"/> </td> <td width="50%" align="center"> - <input class="liteoption" type="submit" name="split_type_beyond" - value="${n:i18n("L_SPLIT_AFTER")}"/> + <h:commandButton action="{splitTopic.splitAfter}" + type="submit" + class="liteoption" + name="split_type_beyond" + value="{resource.L_SPLIT_AFTER}"/> </td> </tr> </table> </td> </tr> <tr> - <th class="thLeft" nowrap="nowrap">${n:i18n("L_AUTHOR")}</th> - <th nowrap="nowrap">${n:i18n("L_MESSAGE")}</th> - <th class="thRight" nowrap="nowrap">${n:i18n("L_SELECT")}</th> + <th class="thLeft" nowrap="nowrap">${resource.L_AUTHOR}</th> + <th nowrap="nowrap">${resoure.L_MESSAGE}</th> + <th class="thRight" nowrap="nowrap">${resource.L_SELECT}</th> </tr> - <n:iterate ctx="postrow"> + <c:forEach items="#{splitTopic.topic.posts}" var="postrow" varStatus="status" > <tr> - <td align="left" valign="top" class="${n:out("postrow.ROW_CLASS")}"><span class="name"><a - name="${n:out("postrow.U_POST_ID")}"></a>${n:out("postrow.POSTER_NAME")}</span></td> + <td align="left" valign="top" class="${n:out("postrow.ROW_CLASS")}"> + <span class="name"> + <a name="${n:out("postrow.U_POST_ID")}"></a> + ${n:out("postrow.POSTER_NAME")} + </span> + </td> <td width="100%" valign="top" class="${n:out("postrow.ROW_CLASS")}"> <table width="100%" cellspacing="0" cellpadding="3" border="0"> <tr> - <td valign="middle"><img src="${n:out("postrow.IMG_MINIPOST")}" alt="${n:i18n("L_POST")}"><span - class="postdetails">${n:i18n("L_POSTED")}: - ${n:out("postrow.POST_DATE")} ${n:i18n("L_POST_SUBJECT")}: ${n:out("postrow.POST_SUBJECT")}</span> + <td valign="middle"> + <img src="${n:out("postrow.IMG_MINIPOST")}" alt="${resource.L_POST}"> + <span class="postdetails"> + ${resource.L_POSTED}: + ${n:out("postrow.POST_DATE")} + + ${resource.L_POST_SUBJECT}: + ${n:out("postrow.POST_SUBJECT")} + </span> </td> </tr> <tr> <td valign="top"> <hr size="1"/> - <span class="postbody">${n:out("postrow.MESSAGE")}</span></td> + <span class="postbody"> + ${n:out("postrow.MESSAGE")} + </span> + </td> </tr> </table> </td> - <td width="5%" align="center" - class="${n:out("postrow.ROW_CLASS")}"><%--${n:out("postrow.S_SPLIT_CHECKBOX")}--%> - <input type="checkbox" name="post_id_list[${n:out("postrow.POST_ROW_INDEX")}]" + <td width="5%" align="center" class="${n:out("postrow.ROW_CLASS")}"> + <%--${n:out("postrow.S_SPLIT_CHECKBOX")}--%> + <input type="checkbox" + name="post_id_list[${n:out("postrow.POST_ROW_INDEX")}]" value="${n:out("postrow.POST_ID")}"/> </td> </tr> <tr> - <td colspan="3" height="1" class="row3"><img src="${n:out("postrow.IMG_SPACER")}" width="1" height="1" - alt="."></td> + <td colspan="3" height="1" class="row3"> + <img src="${n:out("postrow.IMG_SPACER")}" width="1" height="1" alt="."> + </td> </tr> </n:iterate> <tr> @@ -115,12 +176,14 @@ <table width="60%" cellspacing="0" cellpadding="0" border="0" align="center"> <tr> <td width="50%" align="center"> - <input class="liteoption" type="submit" name="split_type_all" value="${n:i18n("L_SPLIT_POSTS")}"/> + <input class="liteoption" type="submit" name="split_type_all" + value="${resource.L_SPLIT_POSTS}"/> </td> <td width="50%" align="center"> <input class="liteoption" type="submit" name="split_type_beyond" - value="${n:i18n("L_SPLIT_AFTER")}"/> - ${n:out("S_HIDDEN_FIELDS")} </td> + value="${resource.L_SPLIT_AFTER}"/> + ${n:out("S_HIDDEN_FIELDS")} + </td> </tr> </table> </td> @@ -128,10 +191,14 @@ </table> <table width="100%" cellspacing="2" border="0" align="center" cellpadding="2"> <tr> - <td align="right" valign="top"><span class="gensmall">${n:out("S_TIMEZONE")}</span></td> + <td align="right" valign="top"> + <span class="gensmall"> + ${n:out("S_TIMEZONE")} + </span> + </td> </tr> </table> -</form> +</h:form> </forums:isAllowed> </c:if> |
|
From: <jbo...@li...> - 2006-06-29 00:46:41
|
Author: jas...@jb...
Date: 2006-06-28 20:46:39 -0400 (Wed, 28 Jun 2006)
New Revision: 509
Modified:
trunk/src/main/java/org/jboss/ws/tools/WSDLToJava.java
Log:
MFB
Modified: trunk/src/main/java/org/jboss/ws/tools/WSDLToJava.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/tools/WSDLToJava.java 2006-06-29 00:30:35 UTC (rev 508)
+++ trunk/src/main/java/org/jboss/ws/tools/WSDLToJava.java 2006-06-29 00:46:39 UTC (rev 509)
@@ -358,7 +358,7 @@
if (! xt.getAnonymous())
xt = xsmodel.getTypeDefinition(xt.getName(), xt.getNamespace());
if(xt instanceof XSComplexTypeDefinition)
- generateJavaSourceForException((XSComplexTypeDefinition)xt,xsmodel);
+ generateJavaSource((XSComplexTypeDefinition)xt,xsmodel, faultXMLName.getLocalPart(), true);
Class cl = getJavaType(faultXMLType, false);
if (cl == null)
@@ -563,15 +563,13 @@
private void generateJavaSource(XSComplexTypeDefinition xt, JBossXSModel xsmodel, String containingElement) throws IOException
{
- XSDTypeToJava xtj = new XSDTypeToJava();
- xtj.setTypeMapping(this.typeMapping);
- xtj.createJavaFile((XSComplexTypeDefinition)xt, containingElement, getLocationForJavaGeneration(), seiPkgName, xsmodel, false);
+ generateJavaSource(xt, xsmodel, containingElement, false);
}
- private void generateJavaSourceForException(XSComplexTypeDefinition xt, JBossXSModel xsmodel) throws IOException
+ private void generateJavaSource(XSComplexTypeDefinition xt, JBossXSModel xsmodel, String containingElement, boolean exception) throws IOException
{
XSDTypeToJava xtj = new XSDTypeToJava();
xtj.setTypeMapping(this.typeMapping);
- xtj.createJavaFile((XSComplexTypeDefinition)xt, null,getLocationForJavaGeneration(),seiPkgName,xsmodel,true);
+ xtj.createJavaFile((XSComplexTypeDefinition)xt, containingElement, getLocationForJavaGeneration(), seiPkgName, xsmodel, exception);
}
-}
+}
\ No newline at end of file
|
|
From: <jbo...@li...> - 2006-06-29 00:30:43
|
Author: jas...@jb...
Date: 2006-06-28 20:30:35 -0400 (Wed, 28 Jun 2006)
New Revision: 508
Modified:
branches/jbossws-1.0/src/main/java/org/jboss/ws/tools/WSDLToJava.java
Log:
revert eroneous merge
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/tools/WSDLToJava.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/tools/WSDLToJava.java 2006-06-28 14:10:36 UTC (rev 507)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/tools/WSDLToJava.java 2006-06-29 00:30:35 UTC (rev 508)
@@ -358,7 +358,7 @@
if (! xt.getAnonymous())
xt = xsmodel.getTypeDefinition(xt.getName(), xt.getNamespace());
if(xt instanceof XSComplexTypeDefinition)
- generateJavaSourceForException((XSComplexTypeDefinition)xt,xsmodel);
+ generateJavaSource((XSComplexTypeDefinition)xt,xsmodel, faultXMLName.getLocalPart(), true);
Class cl = getJavaType(faultXMLType, false);
if (cl == null)
@@ -563,15 +563,13 @@
private void generateJavaSource(XSComplexTypeDefinition xt, JBossXSModel xsmodel, String containingElement) throws IOException
{
- XSDTypeToJava xtj = new XSDTypeToJava();
- xtj.setTypeMapping(this.typeMapping);
- xtj.createJavaFile((XSComplexTypeDefinition)xt, containingElement, getLocationForJavaGeneration(), seiPkgName, xsmodel, false);
+ generateJavaSource(xt, xsmodel, containingElement, false);
}
- private void generateJavaSourceForException(XSComplexTypeDefinition xt, JBossXSModel xsmodel) throws IOException
+ private void generateJavaSource(XSComplexTypeDefinition xt, JBossXSModel xsmodel, String containingElement, boolean exception) throws IOException
{
XSDTypeToJava xtj = new XSDTypeToJava();
xtj.setTypeMapping(this.typeMapping);
- xtj.createJavaFile((XSComplexTypeDefinition)xt, null,getLocationForJavaGeneration(),seiPkgName,xsmodel,true);
+ xtj.createJavaFile((XSComplexTypeDefinition)xt, containingElement, getLocationForJavaGeneration(), seiPkgName, xsmodel, exception);
}
-}
+}
\ No newline at end of file
|
|
From: <jbo...@li...> - 2006-06-29 00:07:43
|
Author: mic...@jb... Date: 2006-06-28 20:07:38 -0400 (Wed, 28 Jun 2006) New Revision: 4858 Modified: labs/jbossrules/trunk/drools-decisiontables/src/test/resources/data/TeamAllocationExample_TYPICAL_EXAMPLE.xls Log: Changed it to 3.0 syntax Modified: labs/jbossrules/trunk/drools-decisiontables/src/test/resources/data/TeamAllocationExample_TYPICAL_EXAMPLE.xls =================================================================== (Binary files differ) |
|
From: <jbo...@li...> - 2006-06-28 23:46:28
|
Author: KrisVerlaenen
Date: 2006-06-28 19:46:22 -0400 (Wed, 28 Jun 2006)
New Revision: 4857
Modified:
labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/LocationDeterminator.java
labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/RuleCompletionProcessor.java
labs/jbossrules/trunk/drools-ide/src/test/java/org/drools/ide/editors/completion/LocationDeterminatorTest.java
Log:
JBRULES-296: Code completion should suggest operators and arguments inside column constraints
- operators and arguments code completions now also take the type of the parameter
and possibly the operator itself (better) into account
Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/LocationDeterminator.java
===================================================================
--- labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/LocationDeterminator.java 2006-06-28 22:05:57 UTC (rev 4856)
+++ labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/LocationDeterminator.java 2006-06-28 23:46:22 UTC (rev 4857)
@@ -22,9 +22,9 @@
static final Pattern COLUMN_PATTERN_START = Pattern.compile(".*[(,](\\s*(\\S*)\\s*:)?\\s*[^\\s<>!=:]*", Pattern.DOTALL);
static final Pattern COLUMN_PATTERN_OPERATOR = Pattern.compile(".*[(,](\\s*(\\S*)\\s*:)?\\s*([^\\s<>!=:]+)\\s+", Pattern.DOTALL);
- static final Pattern COLUMN_PATTERN_CONTAINS_ARGUMENT = Pattern.compile(".*[(,](\\s*(\\S*)\\s*:)?\\s*([^\\s<>!=:]+)\\s+contains\\s+", Pattern.DOTALL);
- static final Pattern COLUMN_PATTERN_MATCHES_ARGUMENT = Pattern.compile(".*[(,](\\s*(\\S*)\\s*:)?\\s*([^\\s<>!=:]+)\\s+matches\\s+", Pattern.DOTALL);
- static final Pattern COLUMN_PATTERN_EXCLUDES_ARGUMENT = Pattern.compile(".*[(,](\\s*(\\S*)\\s*:)?\\s*([^\\s<>!=:]+)\\s+excludes\\s+", Pattern.DOTALL);
+ static final Pattern COLUMN_PATTERN_CONTAINS_ARGUMENT = Pattern.compile(".*[(,](\\s*(\\S*)\\s*:)?\\s*([^\\s<>!=:]+)\\s+contains\\s+[^\\s<>!=:]*", Pattern.DOTALL);
+ static final Pattern COLUMN_PATTERN_MATCHES_ARGUMENT = Pattern.compile(".*[(,](\\s*(\\S*)\\s*:)?\\s*([^\\s<>!=:]+)\\s+matches\\s+[^\\s<>!=:]*", Pattern.DOTALL);
+ static final Pattern COLUMN_PATTERN_EXCLUDES_ARGUMENT = Pattern.compile(".*[(,](\\s*(\\S*)\\s*:)?\\s*([^\\s<>!=:]+)\\s+excludes\\s+[^\\s<>!=:]*", Pattern.DOTALL);
static final Pattern COLUMN_PATTERN_COMPARATOR_ARGUMENT = Pattern.compile(".*[(,](\\s*(\\S*)\\s*:)?\\s*([^\\s<>!=:]+)\\s*([<>=!]+)\\s*[^\\s<>!=:]*", Pattern.DOTALL);
static final Pattern EXISTS_PATTERN = Pattern.compile(".*\\s+exists\\s*\\(?\\s*((\\S*)\\s*:)?\\s*\\S*", Pattern.DOTALL);
@@ -45,6 +45,7 @@
static final String LOCATION_PROPERTY_CLASS_NAME = "ClassName";
static final String LOCATION_PROPERTY_PROPERTY_NAME = "PropertyName";
+ static final String LOCATION_PROPERTY_OPERATOR = "Operator";
private LocationDeterminator() {
}
@@ -114,7 +115,7 @@
} else if (descr instanceof ColumnDescr) {
ColumnDescr columnDescr = (ColumnDescr) descr;
// TODO: this is not completely safe, there are rare occasions where this could fail
- Pattern pattern = Pattern.compile(".*(" + columnDescr.getObjectType() + ")\\s*\\((.*)");
+ Pattern pattern = Pattern.compile(".*(" + columnDescr.getObjectType() + ")\\s*\\((.*)", Pattern.DOTALL);
Matcher matcher = pattern.matcher(backText);
String columnContents = null;
while (matcher.find()) {
@@ -127,6 +128,7 @@
if (matcher.matches()) {
Location location = new Location(LOCATION_INSIDE_CONDITION_OPERATOR);
location.setProperty(LOCATION_PROPERTY_CLASS_NAME, columnDescr.getObjectType());
+ location.setProperty(LOCATION_PROPERTY_PROPERTY_NAME, matcher.group(3));
return location;
}
matcher = COLUMN_PATTERN_COMPARATOR_ARGUMENT.matcher(columnContents);
@@ -134,6 +136,7 @@
Location location = new Location(LOCATION_INSIDE_CONDITION_ARGUMENT);
location.setProperty(LOCATION_PROPERTY_CLASS_NAME, columnDescr.getObjectType());
location.setProperty(LOCATION_PROPERTY_PROPERTY_NAME, matcher.group(3));
+ location.setProperty(LOCATION_PROPERTY_OPERATOR, matcher.group(4));
return location;
}
matcher = COLUMN_PATTERN_CONTAINS_ARGUMENT.matcher(columnContents);
@@ -141,6 +144,7 @@
Location location = new Location(LOCATION_INSIDE_CONDITION_ARGUMENT);
location.setProperty(LOCATION_PROPERTY_CLASS_NAME, columnDescr.getObjectType());
location.setProperty(LOCATION_PROPERTY_PROPERTY_NAME, matcher.group(3));
+ location.setProperty(LOCATION_PROPERTY_OPERATOR, "contains");
return location;
}
matcher = COLUMN_PATTERN_EXCLUDES_ARGUMENT.matcher(columnContents);
@@ -148,6 +152,7 @@
Location location = new Location(LOCATION_INSIDE_CONDITION_ARGUMENT);
location.setProperty(LOCATION_PROPERTY_CLASS_NAME, columnDescr.getObjectType());
location.setProperty(LOCATION_PROPERTY_PROPERTY_NAME, matcher.group(3));
+ location.setProperty(LOCATION_PROPERTY_OPERATOR, "excludes");
return location;
}
matcher = COLUMN_PATTERN_MATCHES_ARGUMENT.matcher(columnContents);
@@ -155,6 +160,7 @@
Location location = new Location(LOCATION_INSIDE_CONDITION_ARGUMENT);
location.setProperty(LOCATION_PROPERTY_CLASS_NAME, columnDescr.getObjectType());
location.setProperty(LOCATION_PROPERTY_PROPERTY_NAME, matcher.group(3));
+ location.setProperty(LOCATION_PROPERTY_OPERATOR, "matches");
return location;
}
matcher = COLUMN_PATTERN_START.matcher(columnContents);
Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/RuleCompletionProcessor.java
===================================================================
--- labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/RuleCompletionProcessor.java 2006-06-28 22:05:57 UTC (rev 4856)
+++ labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/RuleCompletionProcessor.java 2006-06-28 23:46:22 UTC (rev 4857)
@@ -7,6 +7,7 @@
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
+import java.util.Map.Entry;
import java.util.regex.Pattern;
import org.drools.compiler.DrlParser;
@@ -16,8 +17,12 @@
import org.drools.ide.editors.DRLRuleEditor;
import org.drools.ide.editors.DSLAdapter;
import org.drools.ide.util.ProjectClassLoader;
+import org.drools.lang.descr.AndDescr;
import org.drools.lang.descr.ColumnDescr;
+import org.drools.lang.descr.ExistsDescr;
import org.drools.lang.descr.FieldBindingDescr;
+import org.drools.lang.descr.NotDescr;
+import org.drools.lang.descr.OrDescr;
import org.drools.lang.descr.PackageDescr;
import org.drools.lang.descr.PatternDescr;
import org.drools.lang.descr.RuleDescr;
@@ -195,49 +200,54 @@
}
break;
case LocationDeterminator.LOCATION_INSIDE_CONDITION_OPERATOR :
- list.add( new RuleCompletionProposal(prefix.length(), "<", "< ", droolsIcon));
- list.add( new RuleCompletionProposal(prefix.length(), "<=", "<= ", droolsIcon));
- list.add( new RuleCompletionProposal(prefix.length(), ">", "> ", droolsIcon));
- list.add( new RuleCompletionProposal(prefix.length(), ">=", ">= ", droolsIcon));
+ className = (String) location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME);
+ String property = (String) location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME);
+ String type = getPropertyClass(className, property);
+
list.add( new RuleCompletionProposal(prefix.length(), "==", "== ", droolsIcon));
list.add( new RuleCompletionProposal(prefix.length(), "!=", "!= ", droolsIcon));
- list.add( new RuleCompletionProposal(prefix.length(), "matches", "matches ", droolsIcon));
- list.add( new RuleCompletionProposal(prefix.length(), "contains", "contains ", droolsIcon));
- list.add( new RuleCompletionProposal(prefix.length(), "excludes", "excludes ", droolsIcon));
list.add( new RuleCompletionProposal(prefix.length(), ":", ": ", droolsIcon));
list.add( new RuleCompletionProposal(prefix.length(), "->", "-> ( )", 5, droolsIcon));
+
+ if (isComparable(type)) {
+ list.add( new RuleCompletionProposal(prefix.length(), "<", "< ", droolsIcon));
+ list.add( new RuleCompletionProposal(prefix.length(), "<=", "<= ", droolsIcon));
+ list.add( new RuleCompletionProposal(prefix.length(), ">", "> ", droolsIcon));
+ list.add( new RuleCompletionProposal(prefix.length(), ">=", ">= ", droolsIcon));
+ }
+ if (type.equals("java.lang.String")) {
+ list.add( new RuleCompletionProposal(prefix.length(), "matches", "matches \"\"", 9, droolsIcon));
+ }
+ if (isSubtypeOf(type, "java.util.Collection")) {
+ list.add( new RuleCompletionProposal(prefix.length(), "contains", "contains ", droolsIcon));
+ list.add( new RuleCompletionProposal(prefix.length(), "excludes", "excludes ", droolsIcon));
+ }
break;
case LocationDeterminator.LOCATION_INSIDE_CONDITION_ARGUMENT :
// determine type
className = (String) location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME);
- String property = (String) location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME);
- String type = null;
- if (className != null) {
- ClassTypeResolver resolver = new ClassTypeResolver(getDRLEditor().getImports(), ProjectClassLoader.getProjectClassLoader(getEditor()));
- try {
- Class clazz = resolver.resolveType(className);
- if (clazz != null) {
- Class clazzz = (Class) new ClassFieldInspector(clazz).getFieldTypes().get(property);
- if (clazzz != null) {
- type = clazzz.getName();
- }
- }
- } catch (IOException exc) {
- // Do nothing
- } catch (ClassNotFoundException exc) {
- // Do nothing
- }
+ property = (String) location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME);
+ String operator = (String) location.getProperty(LocationDeterminator.LOCATION_PROPERTY_OPERATOR);
+ type = getPropertyClass(className, property);
+
+ if ("contains".equals(operator) || "excludes".equals(operator)) {
+ type = "java.lang.Object";
}
+
+ boolean isObject = false;
+ if ("java.lang.Object".equals(type)) {
+ isObject = true;
+ }
list.add( new RuleCompletionProposal(prefix.length(), "null", "null", droolsIcon));
- if (type == null || "boolean".equals(type)) {
+ if ("boolean".equals(type)) {
list.add( new RuleCompletionProposal(prefix.length(), "true", "true", droolsIcon));
list.add( new RuleCompletionProposal(prefix.length(), "false", "false", droolsIcon));
}
- if (type == null || "java.lang.String".equals(type)) {
+ if (isObject || "java.lang.String".equals(type)) {
list.add( new RuleCompletionProposal(prefix.length(), "\"\"", "\"\"", 1, droolsIcon));
}
- if (type == null || "java.util.Date".equals(type)) {
+ if (isObject || "java.util.Date".equals(type)) {
list.add( new RuleCompletionProposal(prefix.length(), "\"dd-mmm-yyyy\"", "\"dd-mmm-yyyy\"", 1, droolsIcon));
}
list.add( new RuleCompletionProposal(prefix.length(), "()", "( )", 2, droolsIcon));
@@ -248,13 +258,17 @@
if (rules != null && rules.size() == 1) {
Map result = new HashMap();
getRuleParameters(result, ((RuleDescr) rules.get(0)).getLhs().getDescrs());
- Iterator iterator2 = result.keySet().iterator();
+ Iterator iterator2 = result.entrySet().iterator();
while (iterator2.hasNext()) {
- String name = (String) iterator2.next();
- RuleCompletionProposal proposal = new RuleCompletionProposal(prefix.length(), name);
- proposal.setPriority(-1);
- proposal.setImage(methodIcon);
- list.add(proposal);
+ Map.Entry entry = (Map.Entry) iterator2.next();
+ String paramName = (String) entry.getKey();
+ String paramType = (String) entry.getValue();
+ if (isSubtypeOf(paramType, type)) {
+ RuleCompletionProposal proposal = new RuleCompletionProposal(prefix.length(), paramName);
+ proposal.setPriority(-1);
+ proposal.setImage(methodIcon);
+ list.add(proposal);
+ }
}
}
} catch (DroolsParserException exc) {
@@ -286,6 +300,65 @@
}
}
+ private String getPropertyClass(String className, String propertyName) {
+ if (className != null) {
+ ClassTypeResolver resolver = new ClassTypeResolver(getDRLEditor().getImports(), ProjectClassLoader.getProjectClassLoader(getEditor()));
+ try {
+ Class clazz = resolver.resolveType(className);
+ if (clazz != null) {
+ Class clazzz = (Class) new ClassFieldInspector(clazz).getFieldTypes().get(propertyName);
+ if (clazzz != null) {
+ return clazzz.getName();
+ }
+ }
+ } catch (IOException exc) {
+ // Do nothing
+ } catch (ClassNotFoundException exc) {
+ // Do nothing
+ }
+ }
+ return null;
+ }
+
+ private boolean isComparable(String type) {
+ if (type == null) {
+ return false;
+ }
+ if (type.equals("byte") || type.equals("short")
+ || type.equals("int") || type.equals("long")
+ || type.equals("float") || type.equals("double")
+ || type.equals("char")) {
+ return true;
+ }
+ if (isSubtypeOf(type, "java.lang.Comparable")) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Returns true if the first class is the same or a subtype of the second class.
+ * @param class1
+ * @param class2
+ * @return
+ */
+ private boolean isSubtypeOf(String class1, String class2) {
+ if (class1 == null || class2 == null) {
+ return false;
+ }
+ ClassTypeResolver resolver = new ClassTypeResolver(getDRLEditor().getImports(), ProjectClassLoader.getProjectClassLoader(getEditor()));
+ try {
+ Class clazz1 = resolver.resolveType(class1);
+ Class clazz2 = resolver.resolveType(class2);
+ if (clazz1 == null || clazz2 == null) {
+ return false;
+ }
+ return clazz2.isAssignableFrom(clazz1);
+ } catch (ClassNotFoundException exc) {
+ return false;
+ }
+ }
+
private boolean consequence(String backText) {
return isKeywordOnLine(backText, "then");
}
@@ -371,23 +444,47 @@
}
private void getRuleParameters(Map result, List descrs) {
+ if (descrs == null) {
+ return;
+ }
Iterator iterator = descrs.iterator();
while (iterator.hasNext()) {
PatternDescr descr = (PatternDescr) iterator.next();
- if (descr instanceof ColumnDescr) {
+ if (descr instanceof ColumnDescr) {
String name = ((ColumnDescr) descr).getIdentifier();
if (name != null) {
result.put(name, ((ColumnDescr) descr).getObjectType());
}
- getRuleParameters(result, ((ColumnDescr) descr).getDescrs());
- } else if (descr instanceof FieldBindingDescr) {
- String name = ((FieldBindingDescr) descr).getIdentifier();
+ getRuleSubParameters(result, ((ColumnDescr) descr).getDescrs(), ((ColumnDescr) descr).getObjectType());
+ } else if (descr instanceof AndDescr) {
+ getRuleParameters(result, ((AndDescr) descr).getDescrs());
+ } else if (descr instanceof OrDescr) {
+ getRuleParameters(result, ((OrDescr) descr).getDescrs());
+ } else if (descr instanceof ExistsDescr) {
+ getRuleParameters(result, ((ExistsDescr) descr).getDescrs());
+ } else if (descr instanceof NotDescr) {
+ getRuleParameters(result, ((NotDescr) descr).getDescrs());
+ }
+ }
+ }
+
+ private void getRuleSubParameters(Map result, List descrs, String clazz) {
+ if (descrs == null) {
+ return;
+ }
+ Iterator iterator = descrs.iterator();
+ while (iterator.hasNext()) {
+ PatternDescr descr = (PatternDescr) iterator.next();
+ if (descr instanceof FieldBindingDescr) {
+ FieldBindingDescr fieldDescr = (FieldBindingDescr) descr;
+ String name = fieldDescr.getIdentifier();
+ String field = fieldDescr.getFieldName();
+ String type = getPropertyClass(clazz, field);
if (name != null) {
- // TODO retrieve type
- result.put(name, null);
+ result.put(name, type);
}
}
- }
+ }
}
private List getRHSJavaCompletionProposals(final String consequenceStart, final String prefix) {
Modified: labs/jbossrules/trunk/drools-ide/src/test/java/org/drools/ide/editors/completion/LocationDeterminatorTest.java
===================================================================
--- labs/jbossrules/trunk/drools-ide/src/test/java/org/drools/ide/editors/completion/LocationDeterminatorTest.java 2006-06-28 22:05:57 UTC (rev 4856)
+++ labs/jbossrules/trunk/drools-ide/src/test/java/org/drools/ide/editors/completion/LocationDeterminatorTest.java 2006-06-28 23:46:22 UTC (rev 4857)
@@ -197,6 +197,7 @@
location = LocationDeterminator.getLocationInCondition(input);
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_OPERATOR, location.getType());
assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
+ assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
input =
"rule MyRule \n" +
@@ -205,6 +206,7 @@
location = LocationDeterminator.getLocationInCondition(input);
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_OPERATOR, location.getType());
assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
+ assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
input =
"rule MyRule \n" +
@@ -213,6 +215,7 @@
location = LocationDeterminator.getLocationInCondition(input);
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_OPERATOR, location.getType());
assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
+ assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
input =
"rule MyRule \n" +
@@ -221,6 +224,7 @@
location = LocationDeterminator.getLocationInCondition(input);
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_OPERATOR, location.getType());
assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
+ assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
input =
"rule MyRule \n" +
@@ -229,6 +233,7 @@
location = LocationDeterminator.getLocationInCondition(input);
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_OPERATOR, location.getType());
assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
+ assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
input =
"rule MyRule \n" +
@@ -237,6 +242,7 @@
location = LocationDeterminator.getLocationInCondition(input);
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_OPERATOR, location.getType());
assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
+ assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
input =
"rule MyRule \n" +
@@ -245,6 +251,7 @@
location = LocationDeterminator.getLocationInCondition(input);
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_OPERATOR, location.getType());
assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
+ assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
input =
"rule MyRule \n" +
@@ -253,6 +260,7 @@
location = LocationDeterminator.getLocationInCondition(input);
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_OPERATOR, location.getType());
assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
+ assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
input =
"rule MyRule \n" +
@@ -262,6 +270,7 @@
location = LocationDeterminator.getLocationInCondition(input);
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_OPERATOR, location.getType());
assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
+ assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
/** Inside of condition: argument */
input =
@@ -272,6 +281,7 @@
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_ARGUMENT, location.getType());
assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
+ assertEquals("==", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_OPERATOR));
input =
"rule MyRule \n" +
@@ -281,24 +291,27 @@
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_ARGUMENT, location.getType());
assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
+ assertEquals("==", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_OPERATOR));
input =
"rule MyRule \n" +
" when \n" +
- " Class ( name : property == ";
+ " Class ( name : property <= ";
location = LocationDeterminator.getLocationInCondition(input);
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_ARGUMENT, location.getType());
assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
+ assertEquals("<=", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_OPERATOR));
input =
"rule MyRule \n" +
" when \n" +
- " Class ( name:property == ";
+ " Class ( name:property != ";
location = LocationDeterminator.getLocationInCondition(input);
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_ARGUMENT, location.getType());
assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
+ assertEquals("!=", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_OPERATOR));
input =
"rule MyRule \n" +
@@ -308,6 +321,7 @@
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_ARGUMENT, location.getType());
assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
assertEquals("property2", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
+ assertEquals("==", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_OPERATOR));
input =
"rule MyRule \n" +
@@ -317,6 +331,7 @@
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_ARGUMENT, location.getType());
assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
+ assertEquals("==", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_OPERATOR));
input =
"rule MyRule \n" +
@@ -326,6 +341,7 @@
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_ARGUMENT, location.getType());
assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
+ assertEquals("==", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_OPERATOR));
input =
"rule MyRule \n" +
@@ -335,7 +351,38 @@
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_ARGUMENT, location.getType());
assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
+ assertEquals("==", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_OPERATOR));
+ input =
+ "rule MyRule \n" +
+ " when \n" +
+ " Class ( property contains ";
+ location = LocationDeterminator.getLocationInCondition(input);
+ assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_ARGUMENT, location.getType());
+ assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
+ assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
+ assertEquals("contains", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_OPERATOR));
+
+ input =
+ "rule MyRule \n" +
+ " when \n" +
+ " Class ( property excludes ";
+ location = LocationDeterminator.getLocationInCondition(input);
+ assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_ARGUMENT, location.getType());
+ assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
+ assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
+ assertEquals("excludes", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_OPERATOR));
+
+ input =
+ "rule MyRule \n" +
+ " when \n" +
+ " Class ( property matches \"prop";
+ location = LocationDeterminator.getLocationInCondition(input);
+ assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_ARGUMENT, location.getType());
+ assertEquals("Class", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME));
+ assertEquals("property", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
+ assertEquals("matches", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_OPERATOR));
+
/** EXISTS */
input =
"rule MyRule \n" +
@@ -552,6 +599,7 @@
" Class ( ) and Class ( name ";
location = LocationDeterminator.getLocationInCondition(input);
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_OPERATOR, location.getType());
+ assertEquals("name", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
input =
"rule MyRule \n" +
@@ -661,6 +709,7 @@
" Class ( ) or Class ( name ";
location = LocationDeterminator.getLocationInCondition(input);
assertEquals(LocationDeterminator.LOCATION_INSIDE_CONDITION_OPERATOR, location.getType());
+ assertEquals("name", location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME));
input =
"rule MyRule \n" +
|
|
From: <jbo...@li...> - 2006-06-28 22:05:58
|
Author: dam...@jb...
Date: 2006-06-28 18:05:57 -0400 (Wed, 28 Jun 2006)
New Revision: 4856
Modified:
labs/jbosslabs/trunk/portal-extensions/svn-hooks/blog-check.sh
labs/jbosslabs/trunk/portal-extensions/svn-hooks/xml-check.sh
Log:
Updating error codes to show more info on error.
Modified: labs/jbosslabs/trunk/portal-extensions/svn-hooks/blog-check.sh
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/svn-hooks/blog-check.sh 2006-06-28 21:57:30 UTC (rev 4855)
+++ labs/jbosslabs/trunk/portal-extensions/svn-hooks/blog-check.sh 2006-06-28 22:05:57 UTC (rev 4856)
@@ -20,7 +20,7 @@
if [ "$type" != "D" -a -n "`echo $token | grep ".*/members/.*/blog/.*\.\(htm\|html\)"`" ]
then
$SVNLOOK proplist $OPTS $REPOS $token | grep "^[[:space:]]*title$" || {
- echo "The title property for a blog entry is not set. Aborting commit." >&2
+ echo "The 'title' property for a blog entry is not set. Please set the 'title' property. Example: 'svn propedit title ./mySpiffyBlogPost.html'. Aborting commit." >&2
exit 1
}
fi
Modified: labs/jbosslabs/trunk/portal-extensions/svn-hooks/xml-check.sh
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/svn-hooks/xml-check.sh 2006-06-28 21:57:30 UTC (rev 4855)
+++ labs/jbosslabs/trunk/portal-extensions/svn-hooks/xml-check.sh 2006-06-28 22:05:57 UTC (rev 4856)
@@ -20,7 +20,7 @@
if [ "$type" != "D" -a -n "`echo $token | grep .*[.]xml$`" ]
then
$SVNLOOK cat $OPTS $REPOS $token | xmllint - >/dev/null || {
- echo "Error parsing XML; aborting commit." >&2
+ echo "Error parsing XML. Please make sure your xml is valid by using a tool such as 'xmllint'. Invalid XML breaks things. Aborting commit." >&2
exit 1
}
fi
|
|
From: <jbo...@li...> - 2006-06-28 21:57:33
|
Author: unibrew
Date: 2006-06-28 17:57:30 -0400 (Wed, 28 Jun 2006)
New Revision: 4855
Modified:
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml
Log:
[JBFORUMS-89] Integrating lock and unlock topic moderator's actions.
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml 2006-06-28 21:55:45 UTC (rev 4854)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml 2006-06-28 21:57:30 UTC (rev 4855)
@@ -126,15 +126,9 @@
</forums:isAllowed>
<forums:isAllowed fragment="acl://reply" contextData="#{topic.topic}">
<!-- reply -->
- <h:commandLink id="replyTopic" action="#{replyTopic.start}" style="text-decoration: none;">
- <f:param name="f" value="#{topic.topic.forum.id}"/>
- <f:param name="t" value="#{topic.topic.id}"/>
- <f:verbatim>
- <img border="0"
+ <img border="0" style="text-decoration: none;"
src="#{forums:themeURL('resourceReplyLockedURL')}"
alt="${resource.Topic_locked}" />
- </f:verbatim>
- </h:commandLink>
</forums:isAllowed>
</c:when>
@@ -541,15 +535,9 @@
</forums:isAllowed>
<forums:isAllowed fragment="acl://reply" contextData="#{topic.topic}">
<!-- reply -->
- <h:commandLink id="replyTopicBelow" action="#{replyTopic.start}" style="text-decoration: none;">
- <f:param name="f" value="#{topic.topic.forum.id}"/>
- <f:param name="t" value="#{topic.topic.id}"/>
- <f:verbatim>
- <img border="0"
+ <img border="0" style="text-decoration: none;"
src="#{forums:themeURL('resourceReplyLockedURL')}"
alt="${resource.Topic_locked}" />
- </f:verbatim>
- </h:commandLink>
</forums:isAllowed>
</c:when>
@@ -741,7 +729,7 @@
</td>
</tr>
- <!--<forums:isAllowed fragment="acl://moderateForum" contextData="#{forum.forum}">-->
+ <forums:isAllowed fragment="acl://moderateForum" contextData="#{forum.forum}">
<c:if test="#{moderator.initialized && moderator.forum!=null && moderator.forum.id!=-1}">
<tr>
<td>
@@ -760,15 +748,23 @@
</f:verbatim>
</h:commandLink>&nbsp;
<c:choose>
- <c:when test="#{topic.topic.status==forums:constantInt('TOPIC_LOCKED')}">
- <a href="" style="text-decoration: none;">
+ <c:when test="#{topic.topic.status!=forums:constantInt('TOPIC_LOCKED')}">
+ <h:commandLink action="#{moderator.lockTopic}" style="text-decoration: none;">
+ <f:param name="t" value="#{topic.topic.id}"/>
+ <f:verbatim>
<img border="0" src="/portal-forums/subSilver/images/topic_lock.gif" alt="Lock this topic" title="Lock this topic"/>
- </a>&nbsp;
+ </f:verbatim>
+ </h:commandLink>
+ &nbsp;
</c:when>
<c:otherwise>
- <a href="" style="text-decoration: none;">
+ <h:commandLink action="#{moderator.unlockTopic}" style="text-decoration: none;">
+ <f:param name="t" value="#{topic.topic.id}"/>
+ <f:verbatim>
<img border="0" src="/portal-forums/subSilver/images/topic_unlock.gif" alt="Lock this topic" title="Lock this topic"/>
- </a>&nbsp;
+ </f:verbatim>
+ </h:commandLink>
+ &nbsp;
</c:otherwise>
</c:choose>
<a href="" style="text-decoration: none;">
@@ -777,7 +773,7 @@
</td>
</tr>
</c:if>
- <!--</forums:isAllowed>-->
+ </forums:isAllowed>
</table>
</forums:isAllowed>
</forums:isAllowed>
|
|
From: <jbo...@li...> - 2006-06-28 21:55:50
|
Author: unibrew Date: 2006-06-28 17:55:45 -0400 (Wed, 28 Jun 2006) New Revision: 4854 Added: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_split.xhtml Log: [JBFORUMS-54] Adding split topic view. Added: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_split.xhtml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_split.xhtml 2006-06-28 20:37:05 UTC (rev 4853) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_split.xhtml 2006-06-28 21:55:45 UTC (rev 4854) @@ -0,0 +1,140 @@ +<!-- +/* +* JBoss, Home of Professional Open Source +* Copyright 2005, JBoss Inc., 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. +*/ +--> + +<div xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://java.sun.com/jsf/facelets" + xmlns:c="http://java.sun.com/jstl/core" + xmlns:h="http://java.sun.com/jsf/html" + xmlns:f="http://java.sun.com/jsf/core" + xmlns:forums="http://www.jboss.com/products/jbossportal/forums" class="bb"> + + <ui:composition template="/views/common/common.xhtml"> + <ui:define name="mainContent"> +<c:if test="#{moderator.initialized && moderator.forum!=null && moderator.forum.id!=-1}"> + <forums:isAllowed fragment="acl://moderateForum" contextData="#{moderator.forum}"> + <h:messages layout="table" infoStyle="color:green" warnStyle="color:red"/> + +<form method="post" action="${n:out("S_SPLIT_ACTION")}"> + <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> + <tr> + <td align="left" class="nav"><a href="${n:out("U_INDEX")}" class="nav">${n:i18n("L_INDEX")}</a><span + class="nav"> + -> <a href="${n:out("U_VIEW_FORUM")}" class="nav">${n:out("FORUM_NAME")}</a></span></td> + </tr> + </table> + <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> + <tr> + <th height="25" class="thHead" colspan="3" nowrap="nowrap">${n:i18n("L_SPLIT_TOPIC")}</th> + </tr> + <tr> + <td class="row2" colspan="3" align="center"><span class="gensmall">${n:i18n("L_SPLIT_TOPIC_EXPLAIN")}</span> + </td> + </tr> + <tr> + <td class="row1" nowrap="nowrap"><span class="gen">${n:i18n("L_SPLIT_SUBJECT")}</span></td> + <td class="row2" colspan="2"><input class="post" type="text" size="35" style="width: 350px" maxlength="60" + name="subject"/></td> + </tr> + <tr> + <td class="row1" nowrap="nowrap"><span class="gen">${n:i18n("L_SPLIT_FORUM")}</span></td> + <td class="row2" colspan="2">${n:out("S_FORUM_SELECT")}</td> + </tr> + <tr> + <td class="catHead" colspan="3" height="28"> + <table width="60%" cellspacing="0" cellpadding="0" border="0" align="center"> + <tr> + <td width="50%" align="center"> + <input class="liteoption" type="submit" name="split_type_all" value="${n:i18n("L_SPLIT_POSTS")}"/> + </td> + <td width="50%" align="center"> + <input class="liteoption" type="submit" name="split_type_beyond" + value="${n:i18n("L_SPLIT_AFTER")}"/> + </td> + </tr> + </table> + </td> + </tr> + <tr> + <th class="thLeft" nowrap="nowrap">${n:i18n("L_AUTHOR")}</th> + <th nowrap="nowrap">${n:i18n("L_MESSAGE")}</th> + <th class="thRight" nowrap="nowrap">${n:i18n("L_SELECT")}</th> + </tr> + <n:iterate ctx="postrow"> + <tr> + <td align="left" valign="top" class="${n:out("postrow.ROW_CLASS")}"><span class="name"><a + name="${n:out("postrow.U_POST_ID")}"></a>${n:out("postrow.POSTER_NAME")}</span></td> + <td width="100%" valign="top" class="${n:out("postrow.ROW_CLASS")}"> + <table width="100%" cellspacing="0" cellpadding="3" border="0"> + <tr> + <td valign="middle"><img src="${n:out("postrow.IMG_MINIPOST")}" alt="${n:i18n("L_POST")}"><span + class="postdetails">${n:i18n("L_POSTED")}: + ${n:out("postrow.POST_DATE")} ${n:i18n("L_POST_SUBJECT")}: ${n:out("postrow.POST_SUBJECT")}</span> + </td> + </tr> + <tr> + <td valign="top"> + <hr size="1"/> + <span class="postbody">${n:out("postrow.MESSAGE")}</span></td> + </tr> + </table> + </td> + <td width="5%" align="center" + class="${n:out("postrow.ROW_CLASS")}"><%--${n:out("postrow.S_SPLIT_CHECKBOX")}--%> + <input type="checkbox" name="post_id_list[${n:out("postrow.POST_ROW_INDEX")}]" + value="${n:out("postrow.POST_ID")}"/> + </td> + </tr> + <tr> + <td colspan="3" height="1" class="row3"><img src="${n:out("postrow.IMG_SPACER")}" width="1" height="1" + alt="."></td> + </tr> + </n:iterate> + <tr> + <td class="catBottom" colspan="3" height="28"> + <table width="60%" cellspacing="0" cellpadding="0" border="0" align="center"> + <tr> + <td width="50%" align="center"> + <input class="liteoption" type="submit" name="split_type_all" value="${n:i18n("L_SPLIT_POSTS")}"/> + </td> + <td width="50%" align="center"> + <input class="liteoption" type="submit" name="split_type_beyond" + value="${n:i18n("L_SPLIT_AFTER")}"/> + ${n:out("S_HIDDEN_FIELDS")} </td> + </tr> + </table> + </td> + </tr> + </table> + <table width="100%" cellspacing="2" border="0" align="center" cellpadding="2"> + <tr> + <td align="right" valign="top"><span class="gensmall">${n:out("S_TIMEZONE")}</span></td> + </tr> + </table> +</form> + +</forums:isAllowed> +</c:if> +</ui:define> +</ui:composition> +</div> \ No newline at end of file |
|
From: <jbo...@li...> - 2006-06-28 20:37:08
|
Author: rl...@jb...
Date: 2006-06-28 16:37:05 -0400 (Wed, 28 Jun 2006)
New Revision: 4853
Added:
labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/BuildDistMojo.java
Log:
add to version control
Added: labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/BuildDistMojo.java
===================================================================
--- labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/BuildDistMojo.java 2006-06-28 20:36:45 UTC (rev 4852)
+++ labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/BuildDistMojo.java 2006-06-28 20:37:05 UTC (rev 4853)
@@ -0,0 +1,436 @@
+package org.apache.maven.plugin.builddist;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.resolver.ArtifactResolver;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.shared.model.fileset.FileSet;
+import org.apache.maven.shared.model.fileset.util.FileSetManager;
+import org.codehaus.plexus.archiver.ArchiverException;
+import org.codehaus.plexus.archiver.UnArchiver;
+import org.codehaus.plexus.archiver.manager.ArchiverManager;
+import org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
+import org.codehaus.plexus.util.FileUtils;
+
+/**
+ * Assemble an application bundle or distribution from a prescribed list
+ *
+ * @aggregator
+ * @version $Id: BuildDistMojo.java
+ * @goal builddist
+ */
+public class BuildDistMojo extends AbstractMojo
+{
+ /**
+ * To look up Archiver/UnArchiver implementations
+ *
+ * @parameter expression="${component.org.codehaus.plexus.archiver.manager.ArchiverManager}"
+ * @required
+ */
+
+ protected ArchiverManager archiverManager;
+
+ /**
+ * @parameter expression="${project.remoteArtifactRepositories}"
+ * @readonly
+ * @required
+ */
+ private java.util.List remoteRepos;
+
+ /**
+ * @component
+ */
+ private ArtifactFactory factory;
+
+ /**
+ * @component
+ */
+ private ArtifactResolver resolver;
+
+ /**
+ * @parameter expression="${localRepository}"
+ * @readonly
+ * @required
+ */
+ private ArtifactRepository local;
+
+ /**
+ * Contains the full list of projects in the reactor.
+ *
+ * @parameter expression="${reactorProjects}"
+ * @required
+ * @readonly
+ */
+ private List reactorProjects;
+
+ /**
+ * The Maven Project.
+ *
+ * @parameter expression="${project}"
+ * @required
+ * @readonly
+ */
+ private MavenProject project;
+
+ /**
+ * A list of directories.
+ *
+ * @parameter
+ * @required
+ */
+ private ArrayList dirs;
+
+ /**
+ * A list of directories.
+ *
+ * @parameter expression="${basedir}"
+ * @readonly
+ */
+ private File basedir;
+
+ public void execute() throws MojoExecutionException, MojoFailureException
+ {
+
+ //for each directory defined, attempt to create the directory
+ //and then fill it with the proper contents
+ Iterator iter = dirs.iterator();
+ while (iter.hasNext())
+ {
+ Dir dir = (Dir) iter.next();
+
+ try
+ {
+ populateDir(dir, basedir);
+ }
+ catch (MojoFailureException e)
+ {
+ throw e;
+ }
+ catch (FileNotFoundException e)
+ {
+ throw new MojoFailureException(e.getMessage());
+
+ }
+
+ }
+
+ }
+
+ /**
+ * Create a directory and populate it's contents
+ *
+ * @param dir
+ */
+ private void populateDir(Dir dir, File currDir) throws MojoFailureException, FileNotFoundException
+ {
+
+ // try {
+ dir.setLocation(FileUtils.resolveFile(currDir, dir.getName()));
+
+ this.getLog().debug("Creating directory " + dir.getLocation());
+
+ FileUtils.mkdir(dir.getLocation().getAbsolutePath());
+
+ this.getLog().debug("Populating directory " + dir.getLocation().getAbsolutePath() + " with artifacts");
+
+ if (dir.getArtifacts() != null)
+ populateArtifacts(dir);
+
+ if (dir.getReposArtifacts() != null)
+ populateReposArtifacts(dir);
+
+ if (dir.getFilesets() != null)
+ populateFilesets(dir);
+
+ //if the new directory we just made needs to contain sub
+ // directories
+ //then we create and populate them
+ if (dir.getDirs() != null)
+ {
+
+ //for each directory defined, attempt to create the directory
+ //and then fill it with the proper contents
+ Iterator iter = dir.getDirs().iterator();
+
+ while (iter.hasNext())
+ {
+ Dir subDir = (Dir) iter.next();
+
+ populateDir(subDir, dir.getLocation());
+
+ }
+ }
+ /*
+ * catch ( e) { throw new MojoFailureException( "Error occured while
+ * populating directory");
+ * }
+ */
+ }
+
+ private void populateFilesets(Dir dir) throws MojoFailureException
+ {
+
+ FileSetManager fileSetManager;
+ fileSetManager = new FileSetManager(getLog(), true);
+
+ Iterator iter = dir.getFilesets().iterator();
+
+ while (iter.hasNext())
+ {
+ FileSet fileset = (FileSet) iter.next();
+
+ //copy included files;
+ String includedFiles[] = fileSetManager.getIncludedFiles(fileset);
+
+ for (int i = 0; i < includedFiles.length; i++)
+ {
+ File srcFile = FileUtils.resolveFile(new File(fileset.getDirectory()), includedFiles[i]);
+
+ if (!srcFile.exists())
+ throw new MojoFailureException("File: " + srcFile.getAbsolutePath() + " does not exist"
+ + "\nPlease check the artifact definition");
+
+ File destFile = FileUtils.resolveFile(dir.getLocation(), includedFiles[i]);
+
+ try
+ {
+ getLog().info("Copying " + srcFile.getAbsolutePath() + " to " + destFile.getAbsolutePath());
+
+ FileUtils.copyFile(srcFile, destFile);
+
+ }
+ catch (IOException e)
+ {
+ throw new MojoFailureException("Error copying file: " + e.getMessage());
+
+ }
+
+ }
+
+ }
+
+ }
+
+ /**
+ * Populate a directory with artifacts from a predefined module
+ *
+ * @param dir
+ * The dir object to populate
+ */
+ private void populateArtifacts(Dir dir) throws MojoFailureException, FileNotFoundException
+ {
+ //for each artifact defined, attempt to copy the
+ //the artifact to the directory location
+ Iterator iter = dir.getArtifacts().iterator();
+
+ while (iter.hasNext())
+ {
+ org.apache.maven.plugin.builddist.Artifact artifact = (org.apache.maven.plugin.builddist.Artifact) iter.next();
+
+ //determine the src file
+ File moduleDir = FileUtils.resolveFile(this.getBasedir().getParentFile(), artifact.getModule());
+ File artifactDir = FileUtils.resolveFile(moduleDir, artifact.getArtifactLocation());
+ File srcFile = FileUtils.resolveFile(artifactDir, artifact.getArtifactName());
+
+ if (!srcFile.exists())
+ throw new FileNotFoundException("File: " + srcFile.getAbsolutePath() + " does not exist"
+ + "\nPlease check the artifact definition");
+
+ File destFile;
+ if (artifact.isUnpack())
+ {
+ try
+ {
+ this.unpack(srcFile, dir.getLocation(), true);
+ }
+ catch (Exception e)
+ {
+ throw new MojoFailureException("Error unpacking archive: " + e.getMessage());
+ }
+
+ }
+ else
+ {
+
+ //determine the destination file
+ if (artifact.getToName() == null)
+ destFile = FileUtils.resolveFile(dir.getLocation(), artifact.getArtifactName());
+ else
+ destFile = FileUtils.resolveFile(dir.getLocation(), artifact.getToName());
+
+ try
+ {
+ getLog().info("Copying " + srcFile.getAbsolutePath() + " to " + destFile.getAbsolutePath());
+
+ if (!srcFile.isDirectory())
+ FileUtils.copyFile(srcFile, destFile);
+ else
+ FileUtils.copyDirectoryStructure(srcFile, FileUtils.resolveFile(dir.getLocation(), srcFile.getName()));
+ }
+ catch (IOException e)
+ {
+ System.out.println(e.getStackTrace());
+ System.out.println(e.getLocalizedMessage());
+ throw new MojoFailureException("Error copying file: " + e.getMessage());
+
+ }
+
+ }
+ }
+ }
+
+ /**
+ * Populate a directory with thirdparty libraries
+ *
+ * @param dir
+ * The dir object to populate
+ */
+ private void populateReposArtifacts(Dir dir) throws MojoFailureException
+ {
+ //for each artifact defined, attempt to copy the
+ //the artifact to the directory location
+ Iterator iter = dir.getReposArtifacts().iterator();
+
+ while (iter.hasNext())
+ {
+ ReposArtifact reposArtifact = (ReposArtifact) iter.next();
+
+ if (reposArtifact.getPackaging() == null)
+ reposArtifact.setPackaging("jar");
+ if (reposArtifact.getVersion() == null)
+ determineReposArtifactVersion(reposArtifact);
+
+ //get a reference to the the repository version of the artifact
+ Artifact artifact = factory.createArtifact(reposArtifact.getGroupId(), reposArtifact.getArtifactId(),
+ reposArtifact.getVersion(), Artifact.SCOPE_PROVIDED, reposArtifact.getPackaging());
+
+ try
+ {
+ resolver.resolve(artifact, remoteRepos, local);
+
+ String destFileName;
+ if (reposArtifact.getToName() != null)
+ destFileName = reposArtifact.getToName();
+ else if (reposArtifact.isStripVersion())
+ destFileName = reposArtifact.getArtifactId() + "." + reposArtifact.getPackaging();
+ else
+ destFileName = artifact.getFile().getName();
+
+ /*
+ if (artifact.getToName() == null)
+ destFile = FileUtils.resolveFile(dir.getLocation(), artifact
+ .getArtifactName());
+ else
+ destFile = FileUtils.resolveFile(dir.getLocation(), artifact
+ .getToName());
+ */
+ getLog().info(
+ "Copying " + artifact.getFile().getPath() + " to " + dir.getLocation().getAbsolutePath() + "/"
+ + destFileName);
+
+ FileUtils.copyFile(artifact.getFile(), FileUtils.resolveFile(dir.getLocation(), destFileName));
+
+ }
+ catch (Exception e)
+ {
+ throw new MojoFailureException("Error when copying file from repository");
+ }
+
+ }
+
+ }
+
+ /* Tries to find missing version from dependancy management. If found, the artifact is updated with
+ * the correct version.
+ * @param artifact representing configured file.
+ */
+ private void determineReposArtifactVersion(ReposArtifact artifact)
+ {
+ this.getLog().debug("Attempting to find missing version from dependency management.");
+
+ List list = this.project.getDependencyManagement().getDependencies();
+
+ for (int i = 0; i < list.size(); ++i)
+ {
+ Dependency dependency = (Dependency) list.get(i);
+
+ if (dependency.getGroupId().equals(artifact.getGroupId())
+ && dependency.getArtifactId().equals(artifact.getArtifactId())
+ && dependency.getType().equals(artifact.getPackaging()))
+ {
+ this.getLog().debug("Found missing version: " + dependency.getVersion());
+
+ artifact.setVersion(dependency.getVersion());
+ }
+ }
+ }
+
+ /**
+ * @return Returns the project.
+ */
+ public MavenProject getProject()
+ {
+ return project;
+ }
+
+ /**
+ * @return Returns the basedir.
+ */
+ public File getBasedir()
+ {
+ return basedir;
+ }
+
+ /**
+ * @param basedir
+ * The basedir to set.
+ */
+ public void setBasedir(File basedir)
+ {
+ this.basedir = basedir;
+ }
+
+ protected void unpack(File file, File location, boolean overWrite) throws MojoExecutionException,
+ NoSuchArchiverException
+ {
+
+ String archiveExt = FileUtils.getExtension(file.getAbsolutePath()).toLowerCase();
+
+ if (archiveExt.equalsIgnoreCase("sar") || archiveExt.equalsIgnoreCase("deployer"))
+ archiveExt = "jar";
+ try
+ {
+ UnArchiver unArchiver;
+
+ unArchiver = this.archiverManager.getUnArchiver(archiveExt);
+
+ unArchiver.setOverwrite(overWrite);
+ unArchiver.setSourceFile(file);
+
+ unArchiver.setDestDirectory(location);
+
+ unArchiver.extract();
+ }
+ catch (IOException e)
+ {
+ throw new MojoExecutionException("Error unpacking file: " + file + "to: " + location, e);
+ }
+ catch (ArchiverException e)
+ {
+ throw new MojoExecutionException("Error unpacking file: " + file + "to: " + location, e);
+ }
+ }
+
+}
\ No newline at end of file
|
|
From: <jbo...@li...> - 2006-06-28 20:36:47
|
Author: rl...@jb...
Date: 2006-06-28 16:36:45 -0400 (Wed, 28 Jun 2006)
New Revision: 4852
Removed:
labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/BuildDistMojo.java
Log:
update
Deleted: labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/BuildDistMojo.java
===================================================================
--- labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/BuildDistMojo.java 2006-06-28 20:36:02 UTC (rev 4851)
+++ labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/BuildDistMojo.java 2006-06-28 20:36:45 UTC (rev 4852)
@@ -1,15 +0,0 @@
-package org.apache.maven.plugin.builddist;
-
-/**
- * Assemble an application bundle or distribution from an assembly descriptor.
- *
- * @version $Id: BuildDistMojoe.java
- * @goal builddist
- * @requiresDependencyResolution test
- * @execute phase="package"
- * @aggregator
- */
-public class BuildDistMojo
- extends AbstractMojo
-{
-}
|
|
From: <jbo...@li...> - 2006-06-28 20:36:07
|
Author: rl...@jb...
Date: 2006-06-28 16:36:02 -0400 (Wed, 28 Jun 2006)
New Revision: 4851
Added:
labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/Artifact.java
labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/Dir.java
labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/Fileset.java
labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/ReposArtifact.java
Log:
add to vc
Added: labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/Artifact.java
===================================================================
--- labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/Artifact.java 2006-06-28 20:26:39 UTC (rev 4850)
+++ labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/Artifact.java 2006-06-28 20:36:02 UTC (rev 4851)
@@ -0,0 +1,107 @@
+package org.apache.maven.plugin.builddist;
+
+/*
+ * Created on Jan 18, 2006
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+
+/**
+ * @author ruel
+ *
+ * TODO To change the template for this generated type comment go to Window -
+ * Preferences - Java - Code Style - Code Templates
+ */
+public class Artifact {
+
+ /**
+ * the name to use if renaming the artifact
+ */
+ private String toName;
+
+ private String module;
+
+ private String artifactName;
+
+ private boolean unpack;
+
+ /**
+ * The artifact location relevant to its module location
+ *
+ * @parameter expression="${artifactLocation}" default-value="/output/lib"
+ */
+ private String artifactLocation;
+
+ /**
+ * @return Returns the artifactName.
+ */
+ public String getArtifactName() {
+ return artifactName;
+ }
+
+ /**
+ * @param artifactName
+ * The artifactName to set.
+ */
+ public void setArtifactName(String artifactName) {
+ this.artifactName = artifactName;
+ }
+
+ /**
+ * @return Returns the module.
+ */
+ public String getModule() {
+ return module;
+ }
+
+ /**
+ * @param module
+ * The module to set.
+ */
+ public void setModule(String module) {
+ this.module = module;
+ }
+ /**
+ * @return Returns the artifactLocation.
+ */
+ public String getArtifactLocation() {
+ return artifactLocation;
+ }
+ /**
+ * @param artifactLocation The artifactLocation to set.
+ */
+ public void setArtifactLocation(String artifactLocation) {
+ this.artifactLocation = artifactLocation;
+ }
+ /**
+ * @return Returns the toName.
+ */
+ public String getToName() {
+ return toName;
+ }
+ /**
+ * @param toName The toName to set.
+ */
+ public void setToName(String toName) {
+ this.toName = toName;
+ }
+ /**
+ * Get the unpack.
+ *
+ * @return the unpack.
+ */
+ public boolean isUnpack()
+ {
+ return unpack;
+ }
+ /**
+ * Set the unpack.
+ *
+ * @param unpack The unpack to set.
+ */
+ public void setUnpack(boolean unpack)
+ {
+ this.unpack = unpack;
+ }
+}
Added: labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/Dir.java
===================================================================
--- labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/Dir.java 2006-06-28 20:26:39 UTC (rev 4850)
+++ labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/Dir.java 2006-06-28 20:36:02 UTC (rev 4851)
@@ -0,0 +1,128 @@
+/*
+ * Created on Jan 17, 2006
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.apache.maven.plugin.builddist;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author ruel
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class Dir {
+
+ /**
+ * The list of filesets to delete, in addition to the default directories.
+ *
+ * @parameter
+ */
+ private List filesets;
+
+ /**
+ * The name of the directory
+ */
+ private String name;
+
+ /**
+ * A list of directories
+ */
+ private ArrayList dirs;
+
+ /**
+ * A list of artifacts
+ */
+ private ArrayList artifacts;
+
+ /**
+ * A list of repository Artifacts
+ */
+ private ArrayList reposArtifacts;
+
+ private File location;
+
+ /**
+ * @return Returns the dirs.
+ */
+ public ArrayList getDirs() {
+ return dirs;
+ }
+ /**
+ * @param dirs The dirs to set.
+ */
+ public void setDirs(ArrayList dirs) {
+ this.dirs = dirs;
+ }
+ /**
+ * @return Returns the name.
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name The name to set.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+ /**
+ * @return Returns the artifacts.
+ */
+ public ArrayList getArtifacts() {
+ return artifacts;
+ }
+ /**
+ * @param artifacts The artifacts to set.
+ */
+ public void setArtifacts(ArrayList artifacts) {
+ this.artifacts = artifacts;
+ }
+ /**
+ * @return Returns the location.
+ */
+ public File getLocation() {
+ return location;
+ }
+ /**
+ * @param location The location to set.
+ */
+ public void setLocation(File location) {
+ this.location = location;
+ }
+ /**
+ * @return Returns the reposArtifacts.
+ */
+ public ArrayList getReposArtifacts() {
+ return reposArtifacts;
+ }
+ /**
+ * @param reposArtifacts The reposArtifacts to set.
+ */
+ public void setReposArtifacts(ArrayList reposArtifacts) {
+ this.reposArtifacts = reposArtifacts;
+ }
+ /**
+ * Get the filesets.
+ *
+ * @return the filesets.
+ */
+ public List getFilesets()
+ {
+ return filesets;
+ }
+ /**
+ * Set the filesets.
+ *
+ * @param filesets The filesets to set.
+ */
+ public void setFilesets(List filesets)
+ {
+ this.filesets = filesets;
+ }
+}
Added: labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/Fileset.java
===================================================================
--- labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/Fileset.java 2006-06-28 20:26:39 UTC (rev 4850)
+++ labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/Fileset.java 2006-06-28 20:36:02 UTC (rev 4851)
@@ -0,0 +1,13 @@
+package org.apache.maven.plugin.builddist;
+import org.apache.maven.shared.model.fileset.FileSet;
+
+public class Fileset
+ extends FileSet
+{
+
+ public String toString()
+ {
+ return "file-set: " + getDirectory() + " (included: " + getIncludes() + ", excluded: " + getExcludes() + ")";
+ }
+
+}
Added: labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/ReposArtifact.java
===================================================================
--- labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/ReposArtifact.java 2006-06-28 20:26:39 UTC (rev 4850)
+++ labs/jbossbuild/trunk/projects/maven-plugins/maven-builddist-plugin/src/main/java/org/apache/maven/plugin/builddist/ReposArtifact.java 2006-06-28 20:36:02 UTC (rev 4851)
@@ -0,0 +1,127 @@
+/*
+ * Created on Jan 18, 2006
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.apache.maven.plugin.builddist;
+
+/**
+ * @author ruel
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class ReposArtifact {
+
+ /**
+ * The group id
+ */
+ private String groupId;
+
+ /**
+ * The artifactId
+ */
+ private String artifactId;
+
+ /**
+ * The version
+ */
+ private String version;
+
+ /**
+ * The artifact location relevant to its module location
+ *
+ * @parameter expression="${toName}"
+ */
+ private String toName;
+
+ /**
+ * Flag for removing version from filename
+ */
+ private boolean stripVersion=true;
+
+ /**
+ * @parameter expression=${packaging} default-value="jar"
+ */
+ private String packaging;
+
+ /**
+ * @return Returns the artifactId.
+ */
+ public String getArtifactId() {
+ return artifactId;
+ }
+ /**
+ * @param artifactId The artifactId to set.
+ */
+ public void setArtifactId(String artifactId) {
+ this.artifactId = artifactId;
+ }
+ /**
+ * @return Returns the groupId.
+ */
+ public String getGroupId() {
+ return groupId;
+ }
+ /**
+ * @param groupId The groupId to set.
+ */
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+ /**
+ * @return Returns the packaging.
+ */
+ public String getPackaging() {
+ return packaging;
+ }
+ /**
+ * @param packaging The packaging to set.
+ */
+ public void setPackaging(String packaging) {
+ this.packaging = packaging;
+ }
+ /**
+ * @return Returns the stripVersion.
+ */
+ public boolean isStripVersion() {
+ return stripVersion;
+ }
+ /**
+ * @param stripVersion The stripVersion to set.
+ */
+ public void setStripVersion(boolean stripVersion) {
+ this.stripVersion = stripVersion;
+ }
+ /**
+ * @return Returns the version.
+ */
+ public String getVersion() {
+ return version;
+ }
+ /**
+ * @param version The version to set.
+ */
+ public void setVersion(String version) {
+ this.version = version;
+ }
+ /**
+ * Get the toName.
+ *
+ * @return the toName.
+ */
+ public String getToName()
+ {
+ return toName;
+ }
+ /**
+ * Set the toName.
+ *
+ * @param toName The toName to set.
+ */
+ public void setToName(String toName)
+ {
+ this.toName = toName;
+ }
+}
|
|
From: <jbo...@li...> - 2006-06-28 20:26:42
|
Author: KrisVerlaenen
Date: 2006-06-28 16:26:39 -0400 (Wed, 28 Jun 2006)
New Revision: 4850
Modified:
labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/DRLSourceViewerConfig.java
Log:
JBRULES-345:Problem mouse over
- added annotation hover for both the annotation ruler and the overview ruler
Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/DRLSourceViewerConfig.java
===================================================================
--- labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/DRLSourceViewerConfig.java 2006-06-28 19:55:16 UTC (rev 4849)
+++ labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/DRLSourceViewerConfig.java 2006-06-28 20:26:39 UTC (rev 4850)
@@ -16,11 +16,12 @@
import org.eclipse.jface.text.rules.BufferedRuleBasedScanner;
import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.source.DefaultAnnotationHover;
+import org.eclipse.jface.text.source.IAnnotationHover;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.SourceViewerConfiguration;
import org.eclipse.swt.graphics.Color;
-
/**
* Source viewer config wires up the syntax highlighting, partitioning
* and content assistance.
@@ -29,106 +30,97 @@
*
*/
public class DRLSourceViewerConfig extends SourceViewerConfiguration {
+
private DRLScanner scanner;
- private static Color DEFAULT_COLOR = ColorManager.getInstance().getColor(ColorManager.DEFAULT);
- private DRLRuleEditor editor;
-
+
+ private static Color DEFAULT_COLOR =
+ ColorManager.getInstance().getColor(ColorManager.DEFAULT);
+
+ private DRLRuleEditor editor;
+
public DRLSourceViewerConfig(DRLRuleEditor editor) {
- this.editor = editor;
- }
+ this.editor = editor;
+ }
protected DRLScanner getScanner() {
if (scanner == null) {
scanner = new DRLScanner();
- scanner.setDefaultReturnToken(
- new Token(new TextAttribute(DEFAULT_COLOR)));
+ scanner.setDefaultReturnToken(new Token(new TextAttribute(DEFAULT_COLOR)));
}
return scanner;
}
/**
* Define reconciler - this has to be done for each partition.
- * Currently there are 3 partitions, Inside rule, outside rule and inside comment.
+ * Currently there are 3 partitions, Inside rule, outside rule and inside comment.
*/
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
-
-
PresentationReconciler reconciler = new PresentationReconciler();
-
- //bucket partition... (everything else outside a rule)
+
+ //bucket partition... (everything else outside a rule)
DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getScanner());
reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
-
- //inside a rule partition
- dr = new DefaultDamagerRepairer(getScanner());
- reconciler.setDamager(dr, DRLPartionScanner.RULE_PART_CONTENT);
- reconciler.setRepairer(dr, DRLPartionScanner.RULE_PART_CONTENT);
+ //inside a rule partition
+ dr = new DefaultDamagerRepairer(getScanner());
+ reconciler.setDamager(dr, DRLPartionScanner.RULE_PART_CONTENT);
+ reconciler.setRepairer(dr, DRLPartionScanner.RULE_PART_CONTENT);
-
- //finally, inside a multi line comment.
- dr = new DefaultDamagerRepairer(new SingleTokenScanner(new TextAttribute(
- ColorManager.getInstance().getColor(
- ColorManager.SINGLE_LINE_COMMENT )
- )));
- reconciler.setDamager(dr, DRLPartionScanner.RULE_COMMENT);
- reconciler.setRepairer(dr, DRLPartionScanner.RULE_COMMENT);
-
-
- return reconciler;
+ //finally, inside a multi line comment.
+ dr = new DefaultDamagerRepairer(new SingleTokenScanner(
+ new TextAttribute(ColorManager.getInstance().getColor(
+ ColorManager.SINGLE_LINE_COMMENT))));
+ reconciler.setDamager(dr, DRLPartionScanner.RULE_COMMENT);
+ reconciler.setRepairer(dr, DRLPartionScanner.RULE_COMMENT);
+
+ return reconciler;
}
-
-
- /**
- * Single token scanner, used for scanning for multiline comments mainly.
- */
- static class SingleTokenScanner extends BufferedRuleBasedScanner {
- public SingleTokenScanner(TextAttribute attribute) {
- setDefaultReturnToken(new Token(attribute));
- }
- }
-
- /**
- * Get the appropriate content assistance, for each partition.
- */
- public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
+ /**
+ * Single token scanner, used for scanning for multiline comments mainly.
+ */
+ static class SingleTokenScanner extends BufferedRuleBasedScanner {
+ public SingleTokenScanner(TextAttribute attribute) {
+ setDefaultReturnToken(new Token(attribute));
+ }
+ }
+
+ /**
+ * Get the appropriate content assistance, for each partition.
+ */
+ public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
ContentAssistant assistant = new ContentAssistant();
-
- //setup the content assistance, which is
- //sensitive to the partition that it is in.
-
- assistant.setContentAssistProcessor(new DefaultCompletionProcessor(editor),
- IDocument.DEFAULT_CONTENT_TYPE);
-
-
- assistant.setContentAssistProcessor(new RuleCompletionProcessor(editor),
- DRLPartionScanner.RULE_PART_CONTENT);
-
+ //setup the content assistance, which is
+ //sensitive to the partition that it is in.
+ assistant.setContentAssistProcessor(
+ new DefaultCompletionProcessor(editor), IDocument.DEFAULT_CONTENT_TYPE);
+ assistant.setContentAssistProcessor(
+ new RuleCompletionProcessor(editor), DRLPartionScanner.RULE_PART_CONTENT);
+ assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
+ return assistant;
+ }
-
+ public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
+ return DRLPartionScanner.LEGAL_CONTENT_TYPES;
+ }
-// assistant.enableAutoActivation(false);
-// assistant.setAutoActivationDelay(500);
- assistant.setProposalPopupOrientation(
- IContentAssistant.PROPOSAL_OVERLAY);
- return assistant;
+ public IReconciler getReconciler(ISourceViewer sourceViewer) {
+ MonoReconciler reconciler = null;
+ if (sourceViewer != null) {
+ reconciler = new MonoReconciler(
+ new DRLReconcilingStrategy(sourceViewer, editor), false);
+ reconciler.setDelay(500);
+ reconciler.setProgressMonitor(new NullProgressMonitor());
+ }
+ return reconciler;
}
- public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
- return DRLPartionScanner.LEGAL_CONTENT_TYPES;
- }
+ public IAnnotationHover getOverviewRulerAnnotationHover(ISourceViewer sourceViewer) {
+ return new DefaultAnnotationHover();
+ }
- public IReconciler getReconciler(ISourceViewer sourceViewer)
- {
- MonoReconciler reconciler = null;
- if (sourceViewer != null) {
- reconciler = new MonoReconciler(new DRLReconcilingStrategy(sourceViewer, editor), false);
- reconciler.setDelay(500);
- reconciler.setProgressMonitor(new NullProgressMonitor());
- }
- return reconciler;
- }
-
+ public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {
+ return new DefaultAnnotationHover();
+ }
}
\ No newline at end of file
|
|
From: <jbo...@li...> - 2006-06-28 19:55:20
|
Author: estebanschifman
Date: 2006-06-28 15:55:16 -0400 (Wed, 28 Jun 2006)
New Revision: 4849
Modified:
labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/TestNotification.java
Log:
Added NotifySqlTable example
Modified: labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/TestNotification.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/TestNotification.java 2006-06-28 19:54:21 UTC (rev 4848)
+++ labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/TestNotification.java 2006-06-28 19:55:16 UTC (rev 4849)
@@ -25,6 +25,7 @@
import java.text.SimpleDateFormat;
import org.jboss.soa.esb.helpers.*;
+import org.jboss.soa.esb.helpers.persist.SimpleDataSource;
import org.jboss.soa.esb.notification.*;
import org.jboss.soa.esb.services.*;
@@ -53,7 +54,8 @@
// oEl.addElemChild(fileListTarget());
// oEl.addElemChild(emailTarget());
// oEl.addElemChild(jmsQueueTarget());
- oEl.addElemChild(jmsTopicTarget());
+// oEl.addElemChild(jmsTopicTarget());
+ oEl.addElemChild(sqlTableTarget());
NotificationList oNL = new NotificationList(oEl);
@@ -157,4 +159,39 @@
}
return oaRet;
} //________________________________
+
+ static DomElement sqlTableTarget() throws Exception
+ {
+ DomElement oTgt = new DomElement(NotificationList.CHILD_TGT);
+ oTgt.setAttr(NotificationTarget.PRM_NOTIF_CLASS,"NotifySqlTable");
+
+ oTgt.setAttr(SimpleDataSource.DRIVER,"org.postgresql.Driver");
+ oTgt.setAttr(SimpleDataSource.URL,"jdbc:postgresql://lavasca:5432/rosetta");
+ oTgt.setAttr(SimpleDataSource.USER,"postgres");
+ oTgt.setAttr(SimpleDataSource.PASSWORD,"");
+
+ // Table name for insert - must exist in database (URL)
+ oTgt.setAttr(NotifySqlTable.ATT_TABLE,"test_notif_table");
+ // Column that will contain the dynamic data generated by the ActionClass
+ // must exist in table (ATT_TABLE above)
+ oTgt.setAttr(NotifySqlTable.ATT_DATA,"msg");
+
+ // constant data that can be also added in the insert
+ // (perhaps needed for queries)
+ // Key = column name (it must exist in the table, same as ATT_DATA column)
+ KeyValuePair[] oaCols = new KeyValuePair[]
+ {new KeyValuePair("src","TestNotification")
+ ,new KeyValuePair("ref","any Ref")
+ ,new KeyValuePair("val1","VVVV 11111")
+ };
+ for (KeyValuePair oCurr : oaCols)
+ { DomElement oElem = new DomElement(NotifySqlTable.CHILD_COLUMN);
+ oElem.setAttr(NotifySqlTable.ATT_NAME,oCurr.getKey());
+ oElem.setAttr(NotifySqlTable.ATT_VALUE,oCurr.getValue());
+ oTgt.addElemChild(oElem);
+ }
+
+
+ return oTgt;
+ } //________________________________
} //____________________________________________________________________________
|
|
From: <jbo...@li...> - 2006-06-28 19:54:27
|
Author: estebanschifman
Date: 2006-06-28 15:54:21 -0400 (Wed, 28 Jun 2006)
New Revision: 4848
Modified:
labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/notification/NotifySqlTable.java
Log:
Make some mnemonics "public"
Modified: labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/notification/NotifySqlTable.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/notification/NotifySqlTable.java 2006-06-28 17:07:12 UTC (rev 4847)
+++ labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/notification/NotifySqlTable.java 2006-06-28 19:54:21 UTC (rev 4848)
@@ -30,13 +30,13 @@
public class NotifySqlTable extends NotificationTarget
{
- protected static final String CHILD_COLUMN= "column";
+ public static final String CHILD_COLUMN= "column";
- protected static final String ATT_TABLE = "table";
- protected static final String ATT_DATA = "dataColumn";
+ public static final String ATT_TABLE = "table";
+ public static final String ATT_DATA = "dataColumn";
- protected static final String ATT_NAME = "name";
- protected static final String ATT_VALUE = "value";
+ public static final String ATT_NAME = "name";
+ public static final String ATT_VALUE = "value";
private String m_sDriver ,m_sURL ,m_sUser ,m_sPwd
,m_sTable ,m_sDataCol;
|
|
From: <jbo...@li...> - 2006-06-28 17:07:17
|
Author: wrzep
Date: 2006-06-28 13:07:12 -0400 (Wed, 28 Jun 2006)
New Revision: 4847
Modified:
labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/Status.java
labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/common/Constants.java
labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/service/impl/ScoresServiceImpl.java
labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/tools/ScoresManager.java
Log:
JBLAB-599
Modified: labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/Status.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/Status.java 2006-06-28 15:10:52 UTC (rev 4846)
+++ labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/Status.java 2006-06-28 17:07:12 UTC (rev 4847)
@@ -229,8 +229,8 @@
if (pluginsValues != null) {
- log.info("Refreshing scores...");
refreshScores(pluginsValues);
+ log.info("Refreshed scores.");
}
return true;
Modified: labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/common/Constants.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/common/Constants.java 2006-06-28 15:10:52 UTC (rev 4846)
+++ labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/common/Constants.java 2006-06-28 17:07:12 UTC (rev 4847)
@@ -7,8 +7,10 @@
public static final int MAX_ATTEMPTS = 10;
- public static final String STATUS_LOCAL_SERVICE = "java:/Status/LocalScoresService";
- public static final String STATUS_REMOTE_SERVICE = "java:/Status/RemoteScoresService";
+ public static final String STATUS_LOCAL_SERVICE = "ScoresService/local";
+ //"java:/ScoresService/local";
+ public static final String STATUS_REMOTE_SERVICE = "ScoresService/remote";
+ //"java:/ScoresService/remote";
public static final long CACHE_INTERVAL = 5*60*1000; /* milliseconds */
Modified: labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/service/impl/ScoresServiceImpl.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/service/impl/ScoresServiceImpl.java 2006-06-28 15:10:52 UTC (rev 4846)
+++ labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/service/impl/ScoresServiceImpl.java 2006-06-28 17:07:12 UTC (rev 4847)
@@ -35,6 +35,7 @@
import javax.ejb.Local;
import javax.ejb.Remote;
+import javax.ejb.Stateless;
import org.jboss.annotation.ejb.LocalBinding;
import org.jboss.annotation.ejb.RemoteBinding;
@@ -66,9 +67,10 @@
* @author Pawel Wrzeszcz (pawel.wrzeszcz [at] gmail.com)
*/
-@Service(objectName=Tags.STATUS_SERVICE_NAME)
-@Local(ScoresServiceLocal.class)
-@LocalBinding(jndiBinding=Constants.STATUS_LOCAL_SERVICE)
+//@Service(objectName=Tags.STATUS_SERVICE_NAME)
+@Stateless
+//@Local(ScoresServiceLocal.class)
+//@LocalBinding(jndiBinding=Constants.STATUS_LOCAL_SERVICE)
@Remote(ScoresServiceRemote.class)
@RemoteBinding(jndiBinding=Constants.STATUS_REMOTE_SERVICE)
public class ScoresServiceImpl implements ScoresService {
Modified: labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/tools/ScoresManager.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/tools/ScoresManager.java 2006-06-28 15:10:52 UTC (rev 4846)
+++ labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/tools/ScoresManager.java 2006-06-28 17:07:12 UTC (rev 4847)
@@ -74,14 +74,9 @@
service.save(projects, pluginsConf, portalName);
}
- public static boolean hasScores(Calendar cal) {
+ public static boolean hasScores(Calendar cal) throws NamingException {
- ScoresService service;
- try {
- service = getService();
- } catch (NamingException e) {
- return false;
- }
+ ScoresService service = getService();
return service.hasPluginsValues(portalName, cal);
}
@@ -117,7 +112,15 @@
System.out.println("Trying " + cal.getTime().toString());
- if (ScoresManager.hasScores(cal)) {
+ boolean hasScores;
+
+ try {
+ hasScores = ScoresManager.hasScores(cal);
+ } catch (NamingException e) {
+ throw new GetScoresException(e);
+ }
+
+ if (hasScores) {
return ScoresManager.getScores(cal);
}
@@ -185,8 +188,9 @@
String serviceBinding =
(isRemote ? Constants.STATUS_REMOTE_SERVICE :
Constants.STATUS_LOCAL_SERVICE);
+
Object ref = context.lookup(serviceBinding);
-
+
// Narrow the reference of the object returned by lookup() method
ScoresService service =
(ScoresService) PortableRemoteObject.narrow( ref,
|
|
From: <jbo...@li...> - 2006-06-28 15:10:56
|
Author: estebanschifman
Date: 2006-06-28 11:10:52 -0400 (Wed, 28 Jun 2006)
New Revision: 4846
Modified:
labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/Controller.java
labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/TestNotification.java
Log:
TestNotification has now NotifyQueues and NotifyTopics examples
Modified: labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/Controller.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/Controller.java 2006-06-28 15:07:54 UTC (rev 4845)
+++ labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/Controller.java 2006-06-28 15:10:52 UTC (rev 4846)
@@ -37,9 +37,10 @@
Class[] oaTest =
{
- TestParamsRepository.class
- ,TestPersonAddrPhone.class
- ,TestObjStore.class
+ TestNotification.class
+// TestParamsRepository.class
+// ,TestPersonAddrPhone.class
+// ,TestObjStore.class
};
for (Class oCls : oaTest)
Modified: labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/TestNotification.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/TestNotification.java 2006-06-28 15:07:54 UTC (rev 4845)
+++ labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/TestNotification.java 2006-06-28 15:10:52 UTC (rev 4846)
@@ -50,11 +50,19 @@
DomElement oEl = new DomElement("MyFileList");
oEl.setAttr(NotificationList.TYPE,"OK");
- oEl.addElemChild(fileListTarget());
+// oEl.addElemChild(fileListTarget());
+// oEl.addElemChild(emailTarget());
+// oEl.addElemChild(jmsQueueTarget());
+ oEl.addElemChild(jmsTopicTarget());
NotificationList oNL = new NotificationList(oEl);
+
+ // to see how the XML looks like
+ // this is just a unit test class
+ // Typically the XML is used in a parameter object (DomElement.fromXml())
System.out.println(oNL.toString());
+ // a simple timestamped message
Date oNow = new Date(System.currentTimeMillis());
SimpleDateFormat oStamp = new SimpleDateFormat("dd/MMM/yyyy HH:mm:ss.SSS");
StringBuilder sb = new StringBuilder(oStamp.format(oNow))
@@ -67,15 +75,15 @@
{
DomElement oTgt = new DomElement(NotificationList.CHILD_TGT);
oTgt.setAttr(NotificationTarget.PRM_NOTIF_CLASS,"NotifyEmail");
- oTgt.setAttr(EsbEmail.FROM,"my...@my...");
- oTgt.setAttr(EsbEmail.SENDTO,"som...@ta...");;
+ oTgt.setAttr(EsbEmail.FROM,"se...@jb...");
+ oTgt.setAttr(EsbEmail.SENDTO,"rec...@ho...,rec...@jb...");;
oTgt.setAttr(EsbEmail.SUBJECT,"TEST from Rosetta");
oTgt.setAttr(EsbEmail.MESSAGE,"This is the text of your message");
// This class does NOT send the e-mails, the app server does
// consequently these paths would have to be accessible in the
// application server (filesystem / mounts)
- String[] sa = {"C:/tmp/tomcat.sh","E;/tmp/program.js"};
+ String[] sa = {"/tmp/tomcat.sh","/tmp/program.js"};
for (String sCurr : sa)
oTgt.addTextChild(EsbEmail.ATTACH,sCurr);
@@ -90,7 +98,7 @@
// This class does NOT write the files, the app server does
// consequently these paths would have to be accessible in the
// application server (filesystem / mounts)
- String[] sa = {"file:///E:/tmp/file1.notif","file:///E:/tmp/file2.notif"};
+ String[] sa = {"file:///tmp/file1.notif","file:///tmp/file2.notif"};
for (String sCurr : sa)
{ DomElement oFile = new DomElement(NotifyFiles.CHILD_FILE);
oFile.setAttr(NotifyFiles.ATT_URI,sCurr);
@@ -99,4 +107,54 @@
}
return oTgt;
} //________________________________
+
+ static DomElement jmsQueueTarget() throws Exception
+ {
+ DomElement oTgt = new DomElement(NotificationList.CHILD_TGT);
+ oTgt.setAttr(NotificationTarget.PRM_NOTIF_CLASS,"NotifyQueues");
+
+ String[] sa = {"queue/A","queue/B"};
+ for (String sCurr : sa)
+ { DomElement oQ = new DomElement(NotifyQueues.CHILD_QUEUE);
+ oQ.setAttr(NotifyJMS.ATT_DEST_NAME,sCurr);
+ for (DomElement oProp : getMessageProperties())
+ oQ.addElemChild(oProp);
+ oTgt.addElemChild(oQ);
+ }
+ return oTgt;
+ } //________________________________
+
+ static DomElement jmsTopicTarget() throws Exception
+ {
+ DomElement oTgt = new DomElement(NotificationList.CHILD_TGT);
+ oTgt.setAttr(NotificationTarget.PRM_NOTIF_CLASS,"NotifyTopics");
+
+ String[] sa = {"topic/testTopic"};
+ for (String sCurr : sa)
+ { DomElement oQ = new DomElement(NotifyTopics.CHILD_TOPIC);
+ oQ.setAttr(NotifyJMS.ATT_DEST_NAME,sCurr);
+ for (DomElement oProp : getMessageProperties())
+ oQ.addElemChild(oProp);
+ oTgt.addElemChild(oQ);
+ }
+ return oTgt;
+ } //________________________________
+
+ static DomElement[] getMessageProperties() throws Exception
+ {
+ KeyValuePair[] oaProps = new KeyValuePair[]
+ {new KeyValuePair("prop1","111")
+ ,new KeyValuePair("prop2","bbb")
+ ,new KeyValuePair("prop3","abc123")
+ };
+ DomElement[] oaRet = new DomElement[oaProps.length];
+ int iCurr = 0;
+ for (KeyValuePair oCurr : oaProps)
+ { DomElement oElem = new DomElement(NotifyJMS.CHILD_MSG_PROP);
+ oElem.setAttr(NotifyJMS.ATT_PROP_NAME,oCurr.getKey());
+ oElem.setAttr(NotifyJMS.ATT_PROP_VALUE,oCurr.getValue());
+ oaRet[iCurr++] = oElem;
+ }
+ return oaRet;
+ } //________________________________
} //____________________________________________________________________________
|
|
From: <jbo...@li...> - 2006-06-28 15:08:00
|
Author: estebanschifman
Date: 2006-06-28 11:07:54 -0400 (Wed, 28 Jun 2006)
New Revision: 4845
Modified:
labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/notification/NotifyJMS.java
labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/notification/NotifyQueues.java
labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/notification/NotifyTopics.java
Log:
Make property mnemonics "public"
Modified: labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/notification/NotifyJMS.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/notification/NotifyJMS.java 2006-06-28 13:11:11 UTC (rev 4844)
+++ labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/notification/NotifyJMS.java 2006-06-28 15:07:54 UTC (rev 4845)
@@ -49,23 +49,23 @@
* at constructor time, that will hold a "name" "value" pair to be
* included in the JMS message header
*/
- protected static final String CHILD_MSG_PROP = "messageProp";
+ public static final String CHILD_MSG_PROP = "messageProp";
/**
* Attribute name mnemonic for the name of the message property to
* fill with contents of the "value" aattribute
*/
- protected static final String ATT_PROP_NAME = "name";
+ public static final String ATT_PROP_NAME = "name";
/**
* Attribute name mnemonic for the value to assign to the corresponding
* message property
*/
- protected static final String ATT_PROP_VALUE = "value";
+ public static final String ATT_PROP_VALUE = "value";
/**
* Attribute name mnemonic for the att that will hold the JNDI name
* of the destination javax.jms.Destination object
*/
- protected static final String ATT_DEST_NAME = "jndiName";
+ public static final String ATT_DEST_NAME = "jndiName";
/**
* This object holds the JNDI naming context that will be used to obtain
Modified: labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/notification/NotifyQueues.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/notification/NotifyQueues.java 2006-06-28 13:11:11 UTC (rev 4844)
+++ labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/notification/NotifyQueues.java 2006-06-28 15:07:54 UTC (rev 4845)
@@ -40,7 +40,7 @@
* the value to look up in the JNDI context in order to obtain a queue
* @see NotifyJMS#ATT_DEST_NAME
*/
- protected static final String CHILD_QUEUE = "queue";
+ public static final String CHILD_QUEUE = "queue";
public NotifyQueues(DomElement p_oP) throws Exception
Modified: labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/notification/NotifyTopics.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/notification/NotifyTopics.java 2006-06-28 13:11:11 UTC (rev 4844)
+++ labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/notification/NotifyTopics.java 2006-06-28 15:07:54 UTC (rev 4845)
@@ -28,7 +28,7 @@
public class NotifyTopics extends NotifyJMS
{
- protected static final String CHILD_TOPIC = "topic";
+ public static final String CHILD_TOPIC = "topic";
public NotifyTopics(DomElement p_oP) throws Exception
{ super (p_oP);
|