Skip to content

Commit

Permalink
LEP-1250
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.liferay.com/repos/public/portal/trunk@2017 05bdf26c-840f-0410-9ced-eb539d925f36
  • Loading branch information
brianchandotcom committed Sep 6, 2006
1 parent 8209022 commit 515c1a2
Show file tree
Hide file tree
Showing 29 changed files with 571 additions and 1 deletion.
27 changes: 26 additions & 1 deletion build-common-web.xml
Expand Up @@ -5,9 +5,34 @@

<target name="clean">
<delete file="${war.file}.war" failonerror="false" />

<delete includeemptydirs="true" failonerror="false">
<fileset dir="docroot/WEB-INF/classes" excludes="${classes.dir.excludes}" />
</delete>
</target>

<target name="compile">
<if>
<available file="docroot/WEB-INF/src" />
<then>
<mkdir dir="docroot/WEB-INF/classes" />

<javac
classpathref="web.classpath"
compiler="${javac.compiler}"
debug="${javac.debug}"
deprecation="${javac.deprecation}"
destdir="docroot/WEB-INF/classes"
fork="${javac.fork}"
memoryMaximumSize="${javac.memoryMaximumSize}"
nowarn="on"
srcdir="docroot/WEB-INF/src"
/>
</then>
</if>
</target>

<target name="war">
<target name="war" depends="compile">
<war
basedir="docroot"
destfile="${war.file}.war"
Expand Down
7 changes: 7 additions & 0 deletions build-common.xml
Expand Up @@ -29,6 +29,13 @@
<path refid="lib.classpath" />
</path>

<path id="web.classpath">
<pathelement location="${project.dir}/portal-kernel/classes" />
<fileset dir="${project.dir}/lib/development" includes="servlet.jar" />
<fileset dir="docroot/WEB-INF/lib" includes="*.jar" />
<path refid="web-lib.classpath" />
</path>

<taskdef classpathref="lib.classpath" resource="net/sf/antcontrib/antcontrib.properties" />
<taskdef classpathref="lib.classpath" resource="axis-tasks.properties" />

Expand Down
10 changes: 10 additions & 0 deletions jbpm-web/build.xml
@@ -0,0 +1,10 @@
<?xml version="1.0"?>

<project name="jbpm-web" basedir="." default="war">
<path id="web-lib.classpath">
</path>

<import file="../build-common-web.xml" />

<property name="war.file" value="${ant.project.name}" />
</project>
@@ -0,0 +1,54 @@
/**
* Copyright (c) 2000-2006 Liferay, LLC. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package com.liferay.jbpm;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
* <a href="WorkflowComponent.java.html"><b><i>View Source</i></b></a>
*
* @author Charles May
*
*/
public class WorkflowComponent {

public String process(HttpServletRequest req, HttpServletResponse res) {
String cmd = req.getParameter("cmd");

String results = "";

if (cmd.equals("deployXml")) {
results = "<results><definitionId>1</definitionId></results>";
}
else if (cmd.equals("getDefinitions")) {
results = "<results />";
}
else if (cmd.equals("getDefinitionsSize")) {
results = "<results><size>0</size></results>";
}

return results;
}

}
@@ -0,0 +1,72 @@
/**
* Copyright (c) 2000-2006 Liferay, LLC. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package com.liferay.jbpm.servlet;

import com.liferay.jbpm.WorkflowComponent;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.util.StackTraceUtil;

import java.io.IOException;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
* <a href="JBPMServlet.java.html"><b><i>View Source</i></b></a>
*
* @author Charles May
*
*/
public class JBPMServlet extends HttpServlet {

public void service(HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException {

WorkflowComponent workflowComponent = new WorkflowComponent();

String result = workflowComponent.process(req, res);

res.setContentType("text/xml");

ServletOutputStream out = res.getOutputStream();

try {
if (!res.isCommitted()) {
out.print(result);
}
}
catch (Exception e) {
_log.warn(StackTraceUtil.getStackTrace(e));
}
finally {
out.flush();
out.close();
}
}

private static Log _log = LogFactoryUtil.getLog(JBPMServlet.class);

}
15 changes: 15 additions & 0 deletions jbpm-web/docroot/WEB-INF/web.xml
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
<servlet>
<servlet-name>JBPMServlet</servlet-name>
<display-name>JBPMServlet</display-name>
<servlet-class>com.liferay.jbpm.servlet.JBPMServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>JBPMServlet</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>
</web-app>
1 change: 1 addition & 0 deletions lib/versions.txt
Expand Up @@ -75,6 +75,7 @@ Portals Bridges 1.0
Portlet 1.0
Quartz 1.5.0
Secure FTP 1.6.3
Servicemix 2.0.2
Simple Java Captcha 0.03 (patched for debug and additional properties)
SLF4J 1.0.2
Smack 2.2.0
Expand Down
11 changes: 11 additions & 0 deletions servicemix-web/build.xml
@@ -0,0 +1,11 @@
<?xml version="1.0"?>

<project name="servicemix-web" basedir="." default="war">
<path id="web-lib.classpath">
<fileset dir="../lib/portal" includes="jmx-ri.jar,xml-apis.jar" />
</path>

<import file="../build-common-web.xml" />

<property name="war.file" value="${ant.project.name}" />
</project>
21 changes: 21 additions & 0 deletions servicemix-web/docroot/WEB-INF/applicationContext.xml
@@ -0,0 +1,21 @@
<?xml version="1.0"?>

<beans xmlns="http://xbean.org/schemas/spring/1.0" xmlns:spring="http://xbean.org/schemas/spring/1.0" xmlns:servicemix="http://servicemix.org/config/1.0" xmlns:liferay="http://www.liferay.com/servicemix/">
<servicemix:container spring:id="jbi" rootDir="../wdir" useMBeanServer="true" createMBeanServer="true" installationDirPath="../install" deploymentDirPath="../deploy" monitorInstallationDirectory="true" dumpStats="true" statsInterval="10" transactionManager="#transactionManager">
<servicemix:activationSpecs>
<servicemix:activationSpec componentName="httpInOutBinding" service="liferay:httpInOutBinding" destinationService="liferay:workflow">
<servicemix:component>
<bean class="com.liferay.jbi.util.HttpInOutBinding" />
</servicemix:component>
</servicemix:activationSpec>
<servicemix:activationSpec componentName="workflow" service="liferay:workflow">
<servicemix:component>
<bean class="com.liferay.jbi.util.URLTransformComponent">
<property name="url" value="http://localhost:8080/jbpm-web/servlet" />
</bean>
</servicemix:component>
</servicemix:activationSpec>
</servicemix:activationSpecs>
</servicemix:container>
<bean id="transactionManager" class="org.jencks.factory.TransactionManagerFactoryBean" />
</beans>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,99 @@
/**
* Copyright (c) 2000-2006 Liferay, LLC. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package com.liferay.jbi.components.workflow;

import java.util.Map;

import javax.jbi.messaging.MessagingException;

/**
* <a href="WorkflowComponent.java.html"><b><i>View Source</i></b></a>
*
* @author Charles May
*
*/
public interface WorkflowComponent {

public String deployDefinition(String xml) throws MessagingException;

public String getCurrentTasks(
String instanceId, String userId, String tokenId)
throws MessagingException;

public String getDefinitions(
String definitionId, String name, String start, String end)
throws MessagingException;

public String getDefinitionsSize(String definitionId, String name)
throws MessagingException;

public String getInstances(
String definitionId, String instanceId, String workflowName,
String workflowVersion, String gtStartDate, String ltStartDate,
String gtEndDate, String ltEndDate, String hideEndedTasks,
String andSearch, String start, String end)
throws MessagingException;

public String getInstancesSize(
String definitionId, String instanceId, String workflowName,
String workflowVersion, String gtStartDate, String ltStartDate,
String gtEndDate, String ltEndDate, String hideEndedTasks,
String andSearch)
throws MessagingException;

public String getTaskFormParameters(String taskId)
throws MessagingException;

public String getTaskTransitions(String taskId) throws MessagingException;

public String getTokenChildren(String instanceId) throws MessagingException;

public String getUserTasks(
String instanceId, String userId, String taskName,
String workflowName, String assignedTo, String gtCreateDate,
String ltCreateDate, String gtStartDate, String ltStartDate,
String gtEndDate, String ltEndDate, String hideEndedTasks,
String andSearch, String start, String end)
throws MessagingException;

public String getUserTasksSize(
String instanceId, String userId, String taskName,
String workflowName, String assignedTo, String gtCreateDate,
String ltCreateDate, String gtStartDate, String ltStartDate,
String gtEndDate, String ltEndDate, String hideEndedTasks,
String andSearch)
throws MessagingException;

public String signalInstance(String instanceId) throws MessagingException;

public String signalToken(String instanceId, String tokenId)
throws MessagingException;

public String startWorkflow(String definitionId, String userId)
throws MessagingException;

public String updateTask(
String taskId, String userId, String transition, Map parameterMap)
throws MessagingException;

}

0 comments on commit 515c1a2

Please sign in to comment.