JBoss Tools SVN: r9811 - workspace/dart/plugins/org.jboss.tools.smooks.model/src/org/milyn/xsd/smooks/util.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-08-20 05:58:53 -0400 (Wed, 20 Aug 2008)
New Revision: 9811
Added:
workspace/dart/plugins/org.jboss.tools.smooks.model/src/org/milyn/xsd/smooks/util/SmooksConstants.java
Log:
Change some interfaces struction and some method for modifying Analyzer design
Added: workspace/dart/plugins/org.jboss.tools.smooks.model/src/org/milyn/xsd/smooks/util/SmooksConstants.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.model/src/org/milyn/xsd/smooks/util/SmooksConstants.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.model/src/org/milyn/xsd/smooks/util/SmooksConstants.java 2008-08-20 09:58:53 UTC (rev 9811)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.milyn.xsd.smooks.util;
+
+/**
+ * @author Dart Peng
+ * @Date Aug 20, 2008
+ */
+public class SmooksConstants {
+ public static final String GLOBAL_PARAMETERS = "global-parameters";
+ public static final String STREAM_FILTER_TYPE = "stream.filter.type";
+ public static final String SAX = "SAX";
+ public static final String DOM = "DOM";
+ public static final String BEAN_POPULATOR = "org.milyn.javabean.BeanPopulator";
+
+ public static final String BEAN_ID = "beanId";
+
+ public static final String BEAN_CLASS = "beanClass";
+
+ public static final String BINDINGS = "bindings";
+}
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.model/src/org/milyn/xsd/smooks/util/SmooksConstants.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 8 months
JBoss Tools SVN: r9810 - in workspace/dart/plugins: org.jboss.tools.smooks.ui/META-INF and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-08-20 05:58:02 -0400 (Wed, 20 Aug 2008)
New Revision: 9810
Added:
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/AbstractAnalyzer.java
Modified:
workspace/dart/plugins/org.jboss.tools.smooks.javabean/META-INF/MANIFEST.MF
workspace/dart/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/AnalyzerFactory.java
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/SmooksFileBuilder.java
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/modelparser/SmooksConfigurationFileGenerateContext.java
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java
workspace/dart/plugins/org.jboss.tools.smooks.xml/META-INF/MANIFEST.MF
workspace/dart/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/model/AbstractXMLObject.java
workspace/dart/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/model/DocumentObject.java
workspace/dart/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/model/TagObject.java
Log:
Change some interfaces struction and some method for modifying Analyzer design
Modified: workspace/dart/plugins/org.jboss.tools.smooks.javabean/META-INF/MANIFEST.MF
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.javabean/META-INF/MANIFEST.MF 2008-08-20 09:17:31 UTC (rev 9809)
+++ workspace/dart/plugins/org.jboss.tools.smooks.javabean/META-INF/MANIFEST.MF 2008-08-20 09:58:02 UTC (rev 9810)
@@ -30,3 +30,8 @@
libs/commons-logging-api-1.1.1.jar,
libs/commons-logging-tests.jar,
.
+Export-Package: org.jboss.tools.smooks.javabean,
+ org.jboss.tools.smooks.javabean.analyzer,
+ org.jboss.tools.smooks.javabean.commandprocessor,
+ org.jboss.tools.smooks.javabean.model,
+ org.jboss.tools.smooks.javabean.ui
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2008-08-20 09:17:31 UTC (rev 9809)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2008-08-20 09:58:02 UTC (rev 9810)
@@ -16,7 +16,10 @@
org.eclipse.jdt.ui,
org.eclipse.xsd,
org.eclipse.ui.forms,
- org.jboss.tools.smooks.model
+ org.jboss.tools.smooks.model,
+ org.eclipse.emf,
+ org.eclipse.emf.edit,
+ org.jboss.tools.smooks.model.edit
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
Added: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/AbstractAnalyzer.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/AbstractAnalyzer.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/AbstractAnalyzer.java 2008-08-20 09:58:02 UTC (rev 9810)
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.analyzer;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+import org.milyn.xsd.smooks.ParamType;
+import org.milyn.xsd.smooks.ResourceConfigType;
+import org.milyn.xsd.smooks.SmooksFactory;
+import org.milyn.xsd.smooks.SmooksPackage;
+import org.milyn.xsd.smooks.SmooksResourceListType;
+import org.milyn.xsd.smooks.provider.SmooksItemProviderAdapterFactory;
+import org.milyn.xsd.smooks.util.SmooksModelUtils;
+
+/**
+ * @author Dart Peng
+ * @Date Aug 20, 2008
+ */
+public abstract class AbstractAnalyzer implements IAnalyzer {
+ protected List usedConnectionList = new ArrayList();
+ protected AdapterFactoryEditingDomain editingDomain;
+ protected ComposedAdapterFactory adapterFactory;
+
+ public AbstractAnalyzer() {
+ adapterFactory = new ComposedAdapterFactory(
+ ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+
+ adapterFactory
+ .addAdapterFactory(new ResourceItemProviderAdapterFactory());
+ adapterFactory
+ .addAdapterFactory(new SmooksItemProviderAdapterFactory());
+
+ editingDomain = new AdapterFactoryEditingDomain(adapterFactory,
+ createCommandStack(), new HashMap<Resource, Boolean>());
+ }
+
+ protected CommandStack createCommandStack() {
+ return new BasicCommandStack();
+ }
+
+ protected boolean connectionIsUsed(Object connection) {
+ return (usedConnectionList.indexOf(connection) != -1);
+ }
+
+ protected void setConnectionUsed(Object connection) {
+ usedConnectionList.add(connection);
+ }
+
+ protected void cleanUsedConnectionList() {
+ usedConnectionList.clear();
+ }
+
+ protected void addResourceConfigType(SmooksResourceListType resourceList,
+ ResourceConfigType resourceConfig) {
+ Command addResourceConfigCommand = AddCommand.create(
+ getEditingDomain(), resourceList, SmooksPackage.eINSTANCE
+ .getSmooksResourceListType_AbstractResourceConfig(),
+ resourceConfig);
+ addResourceConfigCommand.execute();
+ }
+
+
+ protected ParamType addParamTypeToResourceConfig(
+ ResourceConfigType resourceConfigType, String name, String text) {
+ ParamType paramType = SmooksFactory.eINSTANCE.createParamType();
+ paramType.setName(name);
+ if (text != null) {
+ SmooksModelUtils.appendTextToSmooksType(paramType, text);
+ }
+ resourceConfigType.getParam().add(paramType);
+ return paramType;
+ }
+
+ /**
+ * @return the editingDomain
+ */
+ public AdapterFactoryEditingDomain getEditingDomain() {
+ return editingDomain;
+ }
+
+ /**
+ * @param editingDomain
+ * the editingDomain to set
+ */
+ public void setEditingDomain(AdapterFactoryEditingDomain editingDomain) {
+ this.editingDomain = editingDomain;
+ }
+
+}
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/AbstractAnalyzer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/AnalyzerFactory.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/AnalyzerFactory.java 2008-08-20 09:17:31 UTC (rev 9809)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/AnalyzerFactory.java 2008-08-20 09:58:02 UTC (rev 9810)
@@ -39,7 +39,6 @@
private void initAnalyzerMap() {
if (analyzerMap == null) {
analyzerMap = new HashMap<String, AnalyzerMapper>();
- ;
IExtensionRegistry registry = Platform.getExtensionRegistry();
IExtensionPoint ep = registry
.getExtensionPoint(SmooksExtensionPointConstants.EXTENTION_POINT_ANALYZER);
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/SmooksFileBuilder.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/SmooksFileBuilder.java 2008-08-20 09:17:31 UTC (rev 9809)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/SmooksFileBuilder.java 2008-08-20 09:58:02 UTC (rev 9810)
@@ -11,8 +11,12 @@
import org.eclipse.emf.ecore.resource.Resource;
import org.jboss.tools.smooks.ui.modelparser.SmooksConfigurationFileGenerateContext;
import org.milyn.xsd.smooks.DocumentRoot;
+import org.milyn.xsd.smooks.ParamType;
+import org.milyn.xsd.smooks.ResourceConfigType;
import org.milyn.xsd.smooks.SmooksFactory;
import org.milyn.xsd.smooks.SmooksResourceListType;
+import org.milyn.xsd.smooks.util.SmooksConstants;
+import org.milyn.xsd.smooks.util.SmooksModelUtils;
import org.milyn.xsd.smooks.util.SmooksResourceFactoryImpl;
public class SmooksFileBuilder {
@@ -24,14 +28,21 @@
AnalyzerFactory factory = AnalyzerFactory.getInstance();
IAnalyzer analyzer = factory.getAnalyzer(context.getSourceDataTypeID(),
context.getTargetDataTypeID());
+
if (analyzer == null)
throw new SmooksAnalyzerException(
"can't find the Analyzer for sourceID : "
+ context.getSourceDataTypeID()
+ " and the targetID : "
+ context.getTargetDataTypeID());
+
SmooksResourceListType listType = analyzer
.analyzeMappingGraphModel(context);
+
+ // init the smooksresourcelist
+ initSmooksParseStyle(context,listType);
+
+ // serialize model to stream
Resource resource = new SmooksResourceFactoryImpl()
.createResource(null);
DocumentRoot dr = SmooksFactory.eINSTANCE.createDocumentRoot();
@@ -44,4 +55,25 @@
resource.save(outputStream, Collections.EMPTY_MAP);
return new ByteArrayInputStream(outputStream.toByteArray());
}
+ /**
+ *
+ * <code> <resource-config selector="global-parameters">
+ * <param name="stream.filter.type">SAX< /param>
+ * </resource-config> </code>
+ * @param context
+ * @param resourceList
+ */
+ protected void initSmooksParseStyle(SmooksConfigurationFileGenerateContext context,SmooksResourceListType resourceList){
+// String type = context.getSmooksType();
+// if(type == null) return;
+// ResourceConfigType config = SmooksFactory.eINSTANCE.createResourceConfigType();
+// config.setSelector(SmooksConstants.GLOBAL_PARAMETERS);
+// ParamType param = SmooksFactory.eINSTANCE.createParamType();
+// param.setName(SmooksConstants.STREAM_FILTER_TYPE);
+// SmooksModelUtils.appendTextToSmooksType(param, SmooksConstants.SAX);
+//
+// config.getParam().add(param);
+
+// resourceList.getAbstractResourceConfig().add(0,config);
+ }
}
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-08-20 09:17:31 UTC (rev 9809)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-08-20 09:58:02 UTC (rev 9810)
@@ -91,6 +91,7 @@
import org.jboss.tools.smooks.ui.modelparser.SmooksConfigurationFileGenerateContext;
import org.jboss.tools.smooks.ui.wizards.TransformDataSelectionWizard;
import org.jboss.tools.smooks.utils.UIUtils;
+import org.milyn.xsd.smooks.util.SmooksConstants;
/**
* @author Dart Peng
@@ -436,7 +437,7 @@
SmooksConfigurationFileGenerateContext context = new SmooksConfigurationFileGenerateContext();
context.setSourceDataTypeID(this.sourceDataTypeID);
context.setTargetDataTypeID(this.targetDataTypeID);
- context.setSmooksType("SAX");
+ context.setSmooksType(SmooksConstants.SAX);
context.setDataMappingRootModel(this.rootModel);
return context;
}
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/modelparser/SmooksConfigurationFileGenerateContext.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/modelparser/SmooksConfigurationFileGenerateContext.java 2008-08-20 09:17:31 UTC (rev 9809)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/modelparser/SmooksConfigurationFileGenerateContext.java 2008-08-20 09:58:02 UTC (rev 9810)
@@ -18,10 +18,7 @@
*/
public class SmooksConfigurationFileGenerateContext {
- public static final String TYPE_SAX = "sax";
- public static final String TYPE_DOM = "sax";
-
protected String sourceDataTypeID = null;
protected String targetDataTypeID = null;
protected GraphRootModel dataMappingRootModel;
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java 2008-08-20 09:17:31 UTC (rev 9809)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java 2008-08-20 09:58:02 UTC (rev 9810)
@@ -18,6 +18,8 @@
import org.eclipse.ui.IFileEditorInput;
import org.jboss.tools.smooks.ui.ViewerInitorStore;
import org.jboss.tools.smooks.ui.gef.model.AbstractStructuredDataModel;
+import org.jboss.tools.smooks.ui.gef.model.IConnectableModel;
+import org.jboss.tools.smooks.ui.gef.model.LineConnectionModel;
/**
*
@@ -37,6 +39,50 @@
return createFillLayout(1, 1);
}
+ public static boolean hasSourceConnectionModel(
+ AbstractStructuredDataModel model) {
+ if (model instanceof IConnectableModel) {
+ return !((IConnectableModel) model).getModelSourceConnections()
+ .isEmpty();
+ }
+ return false;
+ }
+
+ public static boolean hasTargetConnectionModel(
+ AbstractStructuredDataModel model) {
+ if (model instanceof IConnectableModel) {
+ return !((IConnectableModel) model).getModelTargetConnections()
+ .isEmpty();
+ }
+ return false;
+ }
+
+ public static LineConnectionModel getFirstSourceModelViaConnection(
+ AbstractStructuredDataModel target) {
+ if (target instanceof IConnectableModel) {
+ List list = ((IConnectableModel) target)
+ .getModelSourceConnections();
+ if (list.isEmpty())
+ return null;
+ // get the first connection
+ return (LineConnectionModel) list.get(0);
+ }
+ return null;
+ }
+
+ public static LineConnectionModel getFirstTargetModelViaConnection(
+ AbstractStructuredDataModel target) {
+ if (target instanceof IConnectableModel) {
+ List list = ((IConnectableModel) target)
+ .getModelTargetConnections();
+ if (list.isEmpty())
+ return null;
+ // get the first connection
+ return (LineConnectionModel) list.get(0);
+ }
+ return null;
+ }
+
/**
*
* @param parent
Modified: workspace/dart/plugins/org.jboss.tools.smooks.xml/META-INF/MANIFEST.MF
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.xml/META-INF/MANIFEST.MF 2008-08-20 09:17:31 UTC (rev 9809)
+++ workspace/dart/plugins/org.jboss.tools.smooks.xml/META-INF/MANIFEST.MF 2008-08-20 09:58:02 UTC (rev 9810)
@@ -19,3 +19,9 @@
Eclipse-LazyStart: true
Bundle-ClassPath: libs/dom4j-1.6.1.jar,
.
+Export-Package: org.jboss.tools.smooks.xml,
+ org.jboss.tools.smooks.xml.model,
+ org.jboss.tools.smooks.xml.ui,
+ org.jboss.tools.smooks.xml2java.model,
+ org.jboss.tools.smooks.xsd.model,
+ org.jboss.tools.smooks.xsd.ui
Modified: workspace/dart/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/model/AbstractXMLObject.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/model/AbstractXMLObject.java 2008-08-20 09:17:31 UTC (rev 9809)
+++ workspace/dart/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/model/AbstractXMLObject.java 2008-08-20 09:58:02 UTC (rev 9810)
@@ -19,6 +19,8 @@
*/
public class AbstractXMLObject {
+ protected AbstractXMLObject parent;
+
protected String name;
protected List<AbstractXMLObject> children = new ArrayList<AbstractXMLObject>();
@@ -38,6 +40,20 @@
public void setChildren(List<AbstractXMLObject> children) {
this.children = children;
}
+
+ /**
+ * @return the parent
+ */
+ public AbstractXMLObject getParent() {
+ return parent;
+ }
+
+ /**
+ * @param parent the parent to set
+ */
+ public void setParent(AbstractXMLObject parent) {
+ this.parent = parent;
+ }
}
Modified: workspace/dart/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/model/DocumentObject.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/model/DocumentObject.java 2008-08-20 09:17:31 UTC (rev 9809)
+++ workspace/dart/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/model/DocumentObject.java 2008-08-20 09:58:02 UTC (rev 9810)
@@ -23,6 +23,7 @@
public void setRootTag(TagObject rootTag) {
this.rootTag = rootTag;
+ if(rootTag != null) rootTag.setParent(this);
}
public String toString(){
@@ -31,5 +32,15 @@
return "Docuement Object : " +getName();
}
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.smooks.xml.model.AbstractXMLObject#getParent()
+ */
+ @Override
+ public AbstractXMLObject getParent() {
+ return null;
+ }
+
+
}
Modified: workspace/dart/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/model/TagObject.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/model/TagObject.java 2008-08-20 09:17:31 UTC (rev 9809)
+++ workspace/dart/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/model/TagObject.java 2008-08-20 09:58:02 UTC (rev 9810)
@@ -28,23 +28,32 @@
public void setProperties(List<TagPropertyObject> properties) {
this.properties = properties;
}
-
- public void addProperty(TagPropertyObject pro){
+
+ public void addProperty(TagPropertyObject pro) {
this.getProperties().add(pro);
+ if (pro != null)
+ pro.setParent(this);
}
-
- public void removeProperty(TagPropertyObject pro){
+
+ public void removeProperty(TagPropertyObject pro) {
this.getProperties().remove(pro);
+ if (pro != null)
+ pro.setParent(null);
}
-
- public void addChildTag(TagObject tag){
+
+ public void addChildTag(TagObject tag) {
this.getChildren().add(tag);
+ if (tag != null)
+ tag.setParent(this);
}
- public void removeChildTag(TagObject tag){
+
+ public void removeChildTag(TagObject tag) {
this.getChildren().remove(tag);
+ if (tag != null)
+ tag.setParent(null);
}
-
- public String toString(){
+
+ public String toString() {
StringBuffer buffer = new StringBuffer(getName());
buffer.append("\n");
for (Iterator iterator = properties.iterator(); iterator.hasNext();) {
@@ -53,7 +62,7 @@
buffer.append(pro.getName());
buffer.append("\n");
}
-
+
List l = getChildren();
for (Iterator iterator = l.iterator(); iterator.hasNext();) {
TagObject tag = (TagObject) iterator.next();
@@ -63,5 +72,5 @@
}
return buffer.toString();
}
-
+
}
17 years, 8 months
JBoss Tools SVN: r9809 - workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-08-20 05:17:31 -0400 (Wed, 20 Aug 2008)
New Revision: 9809
Modified:
workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java
workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/DomXmlWriter.java
Log:
fix some bugs
Modified: workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java 2008-08-20 09:16:45 UTC (rev 9808)
+++ workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java 2008-08-20 09:17:31 UTC (rev 9809)
@@ -206,7 +206,7 @@
if ("bpmn:Activity".equals(type)) {
String activityType = activity
.attributeValue(B2JMessages.Bpmn_ActivityType_Attribute_Name);
- if (activityType == null) {
+ if (activityType == null || "Task".equals(activityType)) {
element = DomXmlWriter.addElement(processRoot,
B2JMessages.Jpdl_Node_Element_Name);
} else if ("EventStartEmpty".equals(activityType)
Modified: workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/DomXmlWriter.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/DomXmlWriter.java 2008-08-20 09:16:45 UTC (rev 9808)
+++ workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/DomXmlWriter.java 2008-08-20 09:17:31 UTC (rev 9809)
@@ -75,7 +75,7 @@
if (element.elements(elementName) != null
&& element.elements(elementName).size() > location
&& location >= 0) {
- element = DocumentHelper.createElement(elementName);
+ newElement = DocumentHelper.createElement(elementName);
element.elements(elementName).add(location, newElement);
}
return newElement;
17 years, 8 months
JBoss Tools SVN: r9808 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-08-20 05:16:45 -0400 (Wed, 20 Aug 2008)
New Revision: 9808
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2531
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java 2008-08-20 06:49:07 UTC (rev 9807)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java 2008-08-20 09:16:45 UTC (rev 9808)
@@ -41,6 +41,7 @@
ContentAssistHandler handler = null;
boolean hasProposals = false;
+
public JSPDialogCellEditor(Composite parent, Properties context) {
super(parent);
@@ -76,7 +77,7 @@
}
query += nodeName + "@" + attributeName;
RootElement root = (RootElement) valueHelper.getInitalInput(query);
- hasProposals = root != null && root.getChildren().length > 0;
+ hasProposals = (root != null && root.getChildren().length > 0) || attributeName.equals("style");
}
private void checkButtonEnablement() {
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java 2008-08-20 06:49:07 UTC (rev 9807)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java 2008-08-20 09:16:45 UTC (rev 9808)
@@ -157,7 +157,7 @@
} else {
if (namesLow.contains(attrName.toLowerCase())) continue;
}
- if(valueHelper.isAvailable(getQuery(attrName))) {
+ if(valueHelper.isAvailable(getQuery(attrName)) || attrName.equals("style")) {
descriptor = createJSPPropertyDescriptor(d, attrName, false);
} else {
descriptor = createTextPropertyDescriptor(attrName, CATEGORY_ATTRIBUTES, 0);
@@ -744,7 +744,7 @@
private IPropertyDescriptor createEnumeratedPropertyDescriptor(CMAttributeDeclaration attrDecl, CMDataType valuesHelper) {
// the displayName MUST be set
- EnumeratedStringPropertyDescriptor descriptor = new EnumeratedStringPropertyDescriptor(attrDecl.getAttrName(), attrDecl.getAttrName(), _getValidStrings(attrDecl, valuesHelper));
+ EnumeratedStringPropertyDescriptor descriptor = new EnumeratedStringPropertyDescriptor(attrDecl.getAttrName(), attrDecl.getAttrName(), _getValidStrings(attrDecl, valuesHelper));
descriptor.setCategory(getCategory(attrDecl));
descriptor.setDescription(attrDecl.getAttrName());
if (attrDecl.getUsage() != CMAttributeDeclaration.REQUIRED && SET_EXPERT_FILTER)
17 years, 8 months
JBoss Tools SVN: r9807 - in workspace/grid: org.jboss.tools.b2j and 23 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-08-20 02:49:07 -0400 (Wed, 20 Aug 2008)
New Revision: 9807
Added:
workspace/grid/org.jboss.tools.b2j/
workspace/grid/org.jboss.tools.b2j/.classpath
workspace/grid/org.jboss.tools.b2j/.project
workspace/grid/org.jboss.tools.b2j/.settings/
workspace/grid/org.jboss.tools.b2j/.settings/org.eclipse.jdt.core.prefs
workspace/grid/org.jboss.tools.b2j/META-INF/
workspace/grid/org.jboss.tools.b2j/META-INF/MANIFEST.MF
workspace/grid/org.jboss.tools.b2j/bin/
workspace/grid/org.jboss.tools.b2j/bin/org/
workspace/grid/org.jboss.tools.b2j/bin/org/jboss/
workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/
workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/
workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/B2J.class
workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/action/
workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/action/B2JAction.class
workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/messages/
workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/messages/B2J.properties
workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/messages/B2JMessages.class
workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/translate/
workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/translate/BPMN2JPDL.class
workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/translate/JpdlXmlWriter.class
workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/translate/TranslateHelper.class
workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/util/
workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/util/B2JUtil.class
workspace/grid/org.jboss.tools.b2j/build.properties
workspace/grid/org.jboss.tools.b2j/lib/
workspace/grid/org.jboss.tools.b2j/lib/commons-logging.jar
workspace/grid/org.jboss.tools.b2j/lib/dom4j-1.6.1.jar
workspace/grid/org.jboss.tools.b2j/lib/jbpm-jpdl.jar
workspace/grid/org.jboss.tools.b2j/lib/jbpm.cfg.xml
workspace/grid/org.jboss.tools.b2j/lib/org/
workspace/grid/org.jboss.tools.b2j/lib/org/jbpm/
workspace/grid/org.jboss.tools.b2j/lib/org/jbpm/default.jbpm.cfg.xml
workspace/grid/org.jboss.tools.b2j/plugin.properties
workspace/grid/org.jboss.tools.b2j/plugin.xml
workspace/grid/org.jboss.tools.b2j/src/
workspace/grid/org.jboss.tools.b2j/src/org/
workspace/grid/org.jboss.tools.b2j/src/org/jboss/
workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/
workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/
workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/B2J.java
workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/action/
workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/action/B2JAction.java
workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/messages/
workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/messages/B2J.properties
workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/messages/B2JMessages.java
workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/translate/
workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java
workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/translate/JpdlXmlWriter.java
workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/translate/TranslateHelper.java
workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/util/
workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/util/B2JUtil.java
Log:
add the jpdl translator using emf model
Added: workspace/grid/org.jboss.tools.b2j/.classpath
===================================================================
--- workspace/grid/org.jboss.tools.b2j/.classpath (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/.classpath 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry exported="true" kind="lib" path="lib/"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-logging.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/dom4j-1.6.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jbpm-jpdl.jar" sourcepath="D:/sources/jbpm/trunk/modules/jpdl"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: workspace/grid/org.jboss.tools.b2j/.project
===================================================================
--- workspace/grid/org.jboss.tools.b2j/.project (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/.project 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.b2j</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: workspace/grid/org.jboss.tools.b2j/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- workspace/grid/org.jboss.tools.b2j/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/.settings/org.eclipse.jdt.core.prefs 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1,7 @@
+#Wed Jul 23 02:43:33 CST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: workspace/grid/org.jboss.tools.b2j/META-INF/MANIFEST.MF
===================================================================
--- workspace/grid/org.jboss.tools.b2j/META-INF/MANIFEST.MF (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/META-INF/MANIFEST.MF 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: B2j Plug-in
+Bundle-SymbolicName: org.jboss.tools.b2j;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Bundle-Activator: org.jboss.tools.b2j.B2J
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.stp.bpmn;bundle-version="1.0.0",
+ org.jboss.tools.common;bundle-version="2.0.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ClassPath: lib/jbpm-jpdl.jar,
+ .,
+ lib/dom4j-1.6.1.jar,
+ lib/commons-logging.jar,
+ lib/
Added: workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/B2J.class
===================================================================
(Binary files differ)
Property changes on: workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/B2J.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/action/B2JAction.class
===================================================================
(Binary files differ)
Property changes on: workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/action/B2JAction.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/messages/B2J.properties
===================================================================
--- workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/messages/B2J.properties (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/messages/B2J.properties 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1,21 @@
+Loop_Decision=Loop Decition
+Loop_Decision_Description=this decision is for mocking bpmn loop activity
+To=to
+Bpmn_Suffix=bpmn
+Workspace_Prefix=platform:/resource
+Jpdl_Suffix=jpdl
+Jpdl_Process_Definition_Name=processdefinition.xml
+Jpdl_32_Namespace_Url=urn:jbpm.org:jpdl-3.2
+Jpdl_Element_Name=name
+Jpdl_Process_Definition_Element=process-definition
+Jpdl_Transition_Element=transition
+Jpdl_ProcessState_Element_Name=process-state
+Jpdl_SubProcess_Element_Name=sub-process
+Folder_Name_Separator=.
+Translate_Error_JpdlWriter_Null=The JPDL Writer is null.
+Translate_Error_JpdlProcess_Definition_Null=The JPDL process definition is null.
+Translate_Error_JpdlFile_CanNotGenerate=Couldn't write process definition xml:
+Translate_Error_JpdlFile_CanNotWrite=Couldn't write process definition to a jpdl file:
+Translate_Error_BpmnFile_CanNotRead=Couldn't read bpmn file:
+Translate_Error_Bpmn_Element_Name= The bpmn element's name is null or same to another element's name:
+Translate_Warning_Bpmn_Element_Type=The type of this bpmn element is not translated to corresponding jpdl element:
\ No newline at end of file
Added: workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/messages/B2JMessages.class
===================================================================
(Binary files differ)
Property changes on: workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/messages/B2JMessages.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/translate/BPMN2JPDL.class
===================================================================
(Binary files differ)
Property changes on: workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/translate/BPMN2JPDL.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/translate/JpdlXmlWriter.class
===================================================================
(Binary files differ)
Property changes on: workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/translate/JpdlXmlWriter.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/translate/TranslateHelper.class
===================================================================
(Binary files differ)
Property changes on: workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/translate/TranslateHelper.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/util/B2JUtil.class
===================================================================
(Binary files differ)
Property changes on: workspace/grid/org.jboss.tools.b2j/bin/org/jboss/tools/b2j/util/B2JUtil.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/grid/org.jboss.tools.b2j/build.properties
===================================================================
--- workspace/grid/org.jboss.tools.b2j/build.properties (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/build.properties 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ lib/jbpm-jpdl.jar,\
+ lib/dom4j-1.6.1.jar,\
+ lib/commons-logging.jar,\
+ lib/,\
+ plugin.properties
Added: workspace/grid/org.jboss.tools.b2j/lib/commons-logging.jar
===================================================================
(Binary files differ)
Property changes on: workspace/grid/org.jboss.tools.b2j/lib/commons-logging.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/grid/org.jboss.tools.b2j/lib/dom4j-1.6.1.jar
===================================================================
(Binary files differ)
Property changes on: workspace/grid/org.jboss.tools.b2j/lib/dom4j-1.6.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/grid/org.jboss.tools.b2j/lib/jbpm-jpdl.jar
===================================================================
(Binary files differ)
Property changes on: workspace/grid/org.jboss.tools.b2j/lib/jbpm-jpdl.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/grid/org.jboss.tools.b2j/lib/jbpm.cfg.xml
===================================================================
--- workspace/grid/org.jboss.tools.b2j/lib/jbpm.cfg.xml (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/lib/jbpm.cfg.xml 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1,52 @@
+<jbpm-configuration>
+
+ <!--
+ This configuration is used when there is no jbpm.cfg.xml file found in the
+ root of the classpath. It is a very basic configuration without persistence
+ and message services. Only the authorization service installed.
+ You can parse and create processes, but when you try to use one of the
+ unavailable services, you'll get an exception.
+ -->
+
+ <jbpm-context>
+ <service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory" />
+ <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
+ <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
+ <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
+ <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
+ <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
+ </jbpm-context>
+
+ <!-- configuration property used by persistence service impl org.jbpm.persistence.db.DbPersistenceServiceFactory -->
+ <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" />
+
+ <!-- configuration resource files pointing to default configuration files in jbpm-{version}.jar -->
+ <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
+ <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
+ <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
+ <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
+ <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
+ <string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
+ <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
+ <string name="resource.mail.templates" value="jbpm.mail.templates.xml" />
+
+ <int name="jbpm.byte.block.size" value="1024" singleton="true" />
+ <bean name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
+ <bean name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
+ <string name="jbpm.mail.smtp.host" value="localhost" />
+ <bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
+ <string name="jbpm.mail.from.address" value="jbpm@noreply" />
+
+ <bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor">
+ <field name="jbpmConfiguration"><ref bean="jbpmConfiguration" /></field>
+ <field name="name"><string value="JbpmJobExector" /></field>
+ <field name="nbrOfThreads"><int value="1" /></field>
+ <field name="idleInterval"><int value="5000" /></field>
+ <field name="maxIdleInterval"><int value="3600000" /></field> <!-- 1 hour -->
+ <field name="historyMaxSize"><int value="20" /></field>
+ <field name="maxLockTime"><int value="600000" /></field> <!-- 10 minutes -->
+ <field name="lockMonitorInterval"><int value="60000" /></field> <!-- 1 minute -->
+ <field name="lockBufferTime"><int value="5000" /></field> <!-- 5 seconds -->
+ </bean>
+
+</jbpm-configuration>
Added: workspace/grid/org.jboss.tools.b2j/lib/org/jbpm/default.jbpm.cfg.xml
===================================================================
--- workspace/grid/org.jboss.tools.b2j/lib/org/jbpm/default.jbpm.cfg.xml (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/lib/org/jbpm/default.jbpm.cfg.xml 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1,52 @@
+<jbpm-configuration>
+
+ <!--
+ This configuration is used when there is no jbpm.cfg.xml file found in the
+ root of the classpath. It is a very basic configuration without persistence
+ and message services. Only the authorization service installed.
+ You can parse and create processes, but when you try to use one of the
+ unavailable services, you'll get an exception.
+ -->
+
+ <jbpm-context>
+ <service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory" />
+ <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
+ <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
+ <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
+ <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
+ <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
+ </jbpm-context>
+
+ <!-- configuration property used by persistence service impl org.jbpm.persistence.db.DbPersistenceServiceFactory -->
+ <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" />
+
+ <!-- configuration resource files pointing to default configuration files in jbpm-{version}.jar -->
+ <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
+ <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
+ <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
+ <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
+ <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
+ <string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
+ <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
+ <string name="resource.mail.templates" value="jbpm.mail.templates.xml" />
+
+ <int name="jbpm.byte.block.size" value="1024" singleton="true" />
+ <bean name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
+ <bean name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
+ <string name="jbpm.mail.smtp.host" value="localhost" />
+ <bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
+ <string name="jbpm.mail.from.address" value="jbpm@noreply" />
+
+ <bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor">
+ <field name="jbpmConfiguration"><ref bean="jbpmConfiguration" /></field>
+ <field name="name"><string value="JbpmJobExector" /></field>
+ <field name="nbrOfThreads"><int value="1" /></field>
+ <field name="idleInterval"><int value="5000" /></field>
+ <field name="maxIdleInterval"><int value="3600000" /></field> <!-- 1 hour -->
+ <field name="historyMaxSize"><int value="20" /></field>
+ <field name="maxLockTime"><int value="600000" /></field> <!-- 10 minutes -->
+ <field name="lockMonitorInterval"><int value="60000" /></field> <!-- 1 minute -->
+ <field name="lockBufferTime"><int value="5000" /></field> <!-- 5 seconds -->
+ </bean>
+
+</jbpm-configuration>
Added: workspace/grid/org.jboss.tools.b2j/plugin.properties
===================================================================
--- workspace/grid/org.jboss.tools.b2j/plugin.properties (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/plugin.properties 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1 @@
+b2jaction=BPMN -> JPDL
\ No newline at end of file
Added: workspace/grid/org.jboss.tools.b2j/plugin.xml
===================================================================
--- workspace/grid/org.jboss.tools.b2j/plugin.xml (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/plugin.xml 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.popupMenus">
+ <objectContribution
+ id="org.jboss.tools.b2j.objectContribution.bpmnfile"
+ nameFilter="*.bpmn"
+ objectClass="org.eclipse.core.resources.IFile">
+ <action
+ label="%b2jaction"
+ class="org.jboss.tools.b2j.action.B2JAction"
+ menubarPath="additions"
+ enablesFor="1"
+ id="org.jboss.tools.b2j.Bpmn2JpdlAction">
+ </action>
+ </objectContribution>
+ </extension>
+
+</plugin>
Added: workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/B2J.java
===================================================================
--- workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/B2J.java (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/B2J.java 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1,50 @@
+package org.jboss.tools.b2j;
+
+import org.jboss.tools.common.log.BaseUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class B2J extends BaseUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.b2j";
+
+ // The shared instance
+ private static B2J plugin;
+
+ /**
+ * The constructor
+ */
+ public B2J() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static B2J getDefault() {
+ return plugin;
+ }
+
+}
Added: workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/action/B2JAction.java
===================================================================
--- workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/action/B2JAction.java (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/action/B2JAction.java 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1,30 @@
+package org.jboss.tools.b2j.action;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.jboss.tools.b2j.translate.BPMN2JPDL;
+
+public class B2JAction implements IObjectActionDelegate{
+
+ //private IWorkbenchPart myPart;
+ private IFile bpmnFile;
+
+ public void setActivePart(IAction arg0, IWorkbenchPart part) {
+ //myPart = part;
+ }
+
+ public void run(IAction arg0) {
+ BPMN2JPDL translator = new BPMN2JPDL();
+ translator.setBpmnFile(bpmnFile);
+ translator.translateToFiles();
+ }
+
+ public void selectionChanged(IAction arg0, ISelection selection) {
+ bpmnFile = (IFile) ((IStructuredSelection) selection).getFirstElement();
+ }
+
+}
Added: workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/messages/B2J.properties
===================================================================
--- workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/messages/B2J.properties (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/messages/B2J.properties 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1,21 @@
+Loop_Decision=Loop Decition
+Loop_Decision_Description=this decision is for mocking bpmn loop activity
+To=to
+Bpmn_Suffix=bpmn
+Workspace_Prefix=platform:/resource
+Jpdl_Suffix=jpdl
+Jpdl_Process_Definition_Name=processdefinition.xml
+Jpdl_32_Namespace_Url=urn:jbpm.org:jpdl-3.2
+Jpdl_Element_Name=name
+Jpdl_Process_Definition_Element=process-definition
+Jpdl_Transition_Element=transition
+Jpdl_ProcessState_Element_Name=process-state
+Jpdl_SubProcess_Element_Name=sub-process
+Folder_Name_Separator=.
+Translate_Error_JpdlWriter_Null=The JPDL Writer is null.
+Translate_Error_JpdlProcess_Definition_Null=The JPDL process definition is null.
+Translate_Error_JpdlFile_CanNotGenerate=Couldn't write process definition xml:
+Translate_Error_JpdlFile_CanNotWrite=Couldn't write process definition to a jpdl file:
+Translate_Error_BpmnFile_CanNotRead=Couldn't read bpmn file:
+Translate_Error_Bpmn_Element_Name= The bpmn element's name is null or same to another element's name:
+Translate_Warning_Bpmn_Element_Type=The type of this bpmn element is not translated to corresponding jpdl element:
\ No newline at end of file
Added: workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/messages/B2JMessages.java
===================================================================
--- workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/messages/B2JMessages.java (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/messages/B2JMessages.java 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1,39 @@
+package org.jboss.tools.b2j.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public class B2JMessages {
+
+ private static final String BUNDLE_NAME = "org.jboss.tools.b2j.messages.B2J"; //$NON-NLS-1$
+
+ private B2JMessages() {
+ // Do not instantiate
+ }
+
+ public static String Loop_Decision;
+ public static String Loop_Decision_Description;
+ public static String To;
+ public static String Bpmn_Suffix;
+ public static String Workspace_Prefix;
+ public static String Folder_Name_Separator;
+ public static String Jpdl_Suffix;
+ public static String Jpdl_Process_Definition_Name;
+ public static String Jpdl_ProcessState_Element_Name;
+ public static String Jpdl_SubProcess_Element_Name;
+ public static String Jpdl_32_Namespace_Url;
+ public static String Jpdl_Process_Definition_Element;
+ public static String Jpdl_Transition_Element;
+ public static String Jpdl_Element_Name;
+ public static String Translate_Error_JpdlWriter_Null;
+ public static String Translate_Error_JpdlProcess_Definition_Null;
+ public static String Translate_Error_JpdlFile_CanNotWrite;
+ public static String Translate_Error_JpdlFile_CanNotGenerate;
+ public static String Translate_Error_BpmnFile_CanNotRead;
+ public static String Translate_Error_Bpmn_Element_Name;
+ public static String Translate_Warning_Bpmn_Element_Type;
+
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, B2JMessages.class);
+ }
+}
\ No newline at end of file
Added: workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java
===================================================================
--- workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1,334 @@
+package org.jboss.tools.b2j.translate;
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.stp.bpmn.*;
+import org.jboss.tools.b2j.B2J;
+import org.jboss.tools.b2j.messages.B2JMessages;
+import org.jbpm.graph.def.*;
+import org.jbpm.graph.node.*;
+
+public class BPMN2JPDL {
+
+ IFile bpmnFile;
+ IFile[] jpdlFiles;
+ List<ProcessDefinition> processDefs = new LinkedList<ProcessDefinition>();
+ Map<String, String> map = new HashMap<String, String>();
+
+ List<String> warnings = new ArrayList<String>();
+ List<String> errors = new ArrayList<String>();
+
+ public List<String> getErrors() {
+ return errors;
+ }
+
+ public void setErrors(List<String> errors) {
+ this.errors = errors;
+ }
+
+ public List<String> getWarnings() {
+ return warnings;
+ }
+
+ public void setWarnings(List<String> warnings) {
+ this.warnings = warnings;
+ }
+
+ public IFile[] getJpdlFiles() {
+ return jpdlFiles;
+ }
+
+ public IFile getBpmnFile() {
+ return bpmnFile;
+ }
+
+ public void setBpmnFile(IFile bpmnFile) {
+ this.bpmnFile = bpmnFile;
+ }
+
+ public BPMN2JPDL() {
+ }
+
+ public BPMN2JPDL(IFile bpmnFile) {
+ this.bpmnFile = bpmnFile;
+ }
+
+ /*
+ * Translate a bpmn diagram to string[]. Every string is jpdl process
+ * definition
+ */
+ public String[] translateToStrings() {
+ this.translateDiagram(this.bpmnFile);
+ String[] strForProcessDefs = new String[processDefs.size()];
+
+ JpdlXmlWriter writer = new JpdlXmlWriter();
+ int i = 0;
+ for (ProcessDefinition def : processDefs) {
+ writer.setWriter(new StringWriter());
+ writer.setUseNamespace(true);
+ strForProcessDefs[i] = translatetoString(writer, def);
+ this.errors.addAll(writer.getProblems());
+ i++;
+ }
+
+ return strForProcessDefs;
+ }
+
+ /*
+ * Tranlate a jpdl process definition to a string
+ */
+ private String translatetoString(JpdlXmlWriter writer, ProcessDefinition def) {
+ return writer.toString(def);
+ }
+
+ /*
+ * Translate a bpmn diagram to file[]. Every file is a jpdl file
+ */
+ public void translateToFiles() {
+ String[] strForProcessDefs = translateToStrings();
+ String[] jpdlFileNames = new String[processDefs.size()];
+
+ int i = 0;
+ for (ProcessDefinition def : processDefs) {
+ jpdlFileNames[i] = def.getName();
+ i++;
+ }
+
+ try {
+ jpdlFiles = TranslateHelper.createJpdlFiles(this.getBpmnFile(),
+ strForProcessDefs, jpdlFileNames);
+ } catch (CoreException e) {
+ errors.add(B2JMessages.Translate_Error_JpdlFile_CanNotWrite
+ + e.getMessage());
+ }
+
+ if (errors.size() != 0) {
+ for (String str : errors) {
+ B2J.getDefault().logError(str);
+ }
+ }
+
+ if (warnings.size() != 0) {
+ for (String str : warnings) {
+ B2J.getDefault().logWarning(str);
+ }
+ }
+ }
+
+ /*
+ * Translate a bpmn diagram to jpdl process definitions
+ */
+ public void translateDiagram(IFile bpmnFile) {
+ BpmnDiagram bpmnDiagram = null;
+ try {
+ bpmnDiagram = TranslateHelper.getBpmnDiagram(bpmnFile);
+ } catch (IOException e) {
+ errors.add(B2JMessages.Translate_Error_BpmnFile_CanNotRead
+ + e.getMessage());
+ }
+ for (Pool pool : bpmnDiagram.getPools()) {
+ ProcessDefinition processDef = new ProcessDefinition();
+ translateGraph(pool, processDef);
+ }
+
+ }
+
+ /*
+ * Translate a bpmn graph(pool or subprocess) to a jpdl process difinition
+ */
+ private void translateGraph(Graph graph, ProcessDefinition processDef) {
+
+ // if graph is subprocess type, we will check the name when look it as activity not as sub process
+ if (!(graph instanceof SubProcess) && !TranslateHelper.checkElementName((NamedBpmnObject) graph)) {
+ errors.add(B2JMessages.Translate_Error_Bpmn_Element_Name
+ + graph.getID());
+ }
+ processDef.setName(TranslateHelper
+ .generateProcessName((NamedBpmnObject) graph));
+ processDef.setDescription(graph.getDocumentation());
+
+ if (graph instanceof Pool && ((Pool) graph).getLanes().size() != 0) {
+ for (Lane lane : ((Pool) graph).getLanes()) {
+ for (Activity activity : lane.getActivities()) {
+ translateActivity(activity, processDef);
+ }
+ }
+ } else {
+ for (Vertex activity : graph.getVertices()) {
+ if (activity instanceof Activity) {
+ translateActivity((Activity) activity, processDef);
+ }
+ }
+ }
+ translateSequenceFlows(graph, processDef);
+ processDefs.add(processDef);
+
+ }
+
+ /*
+ * Translate a bpmn activity to a jpdl node according to activity type
+ */
+ private void translateActivity(Activity activity,
+ ProcessDefinition processDef) {
+ ActivityType type = activity.getActivityType();
+ Node element = null;
+
+ // According to bpmn activity type, map to different jpdl node
+ // Some type can not be supported by this translation, we give
+ // a warining message for it.
+ if (ActivityType.TASK == type.getValue()) {
+ element = new Node();
+ } else if (ActivityType.SUB_PROCESS == type.getValue()) {
+ element = new ProcessState();
+ translateSubprocess((Graph)activity,
+ (ProcessState) element);
+ } else if (ActivityType.EVENT_START_EMPTY <= type.getValue()
+ && type.getValue() <= ActivityType.EVENT_START_TIMER
+ || ActivityType.EVENT_START_SIGNAL == type.getValue()) {
+ element = new StartState();
+ if (type.getValue() != ActivityType.EVENT_START_EMPTY) {
+ warnings.add(B2JMessages.Translate_Warning_Bpmn_Element_Type
+ + type.getName());
+ }
+ } else if (ActivityType.EVENT_INTERMEDIATE_EMPTY <= type.getValue()
+ && type.getValue() <= ActivityType.EVENT_INTERMEDIATE_CANCEL
+ || ActivityType.EVENT_INTERMEDIATE_SIGNAL == type.getValue()) {
+ element = new State();
+ if (type.getValue() != ActivityType.EVENT_INTERMEDIATE_EMPTY) {
+ warnings.add(B2JMessages.Translate_Warning_Bpmn_Element_Type
+ + type.getName());
+ }
+ } else if (ActivityType.EVENT_END_EMPTY <= type.getValue()
+ && type.getValue() <= ActivityType.EVENT_END_CANCEL
+ || ActivityType.EVENT_END_SIGNAL == type.getValue()) {
+ element = new EndState();
+ if (type.getValue() != ActivityType.EVENT_END_EMPTY) {
+ warnings.add(B2JMessages.Translate_Warning_Bpmn_Element_Type
+ + type.getName());
+ }
+ } else if (ActivityType.GATEWAY_DATA_BASED_EXCLUSIVE <= type.getValue()
+ && type.getValue() <= ActivityType.GATEWAY_EVENT_BASED_EXCLUSIVE
+ || ActivityType.GATEWAY_COMPLEX == type.getValue()) {
+ element = new Decision();
+ if (type.getValue() != ActivityType.GATEWAY_DATA_BASED_EXCLUSIVE) {
+ warnings.add(B2JMessages.Translate_Warning_Bpmn_Element_Type
+ + type.getName());
+ }
+ } else if (ActivityType.GATEWAY_PARALLEL == type.getValue()
+ || ActivityType.GATEWAY_DATA_BASED_INCLUSIVE == type.getValue()) {
+ if (activity.getIncomingEdges().size() <= 1) {
+ element = new Fork();
+ } else {
+ element = new Join();
+ }
+ if (type.getValue() != ActivityType.GATEWAY_PARALLEL) {
+ warnings.add(B2JMessages.Translate_Warning_Bpmn_Element_Type
+ + type.getName());
+ }
+ }
+
+ element.setProcessDefinition(processDef);
+ processDef.addNode(element);
+ if (!TranslateHelper.mapNamedObjToGraphEle((NamedBpmnObject) activity,
+ (GraphElement) element)) {
+ errors.add(B2JMessages.Translate_Error_Bpmn_Element_Name
+ + activity.getID());
+ }
+ map.put(activity.getID(), element.getName());
+
+ // If bpmn activity is loop type, then create a structure to mock it.
+ if (activity.isLooping()) {
+ createMockLoop(activity, element);
+ }
+ }
+
+ /*
+ * Translate a bpmn subprocess to a jpdl processstate and a new jpdl process
+ * difinition
+ */
+ private void translateSubprocess(Graph subProcess,
+ ProcessState element) {
+ ProcessDefinition processDef = new ProcessDefinition();
+ translateGraph(subProcess, processDef);
+ element.setSubProcessDefinition(processDef);
+ }
+
+ /*
+ * Translate bpmn sequenceflows to jpdl transitions
+ */
+ private void translateSequenceFlows(Graph graph,
+ ProcessDefinition processDef) {
+ for (SequenceEdge edge : graph.getSequenceEdges()) {
+ translateSequenceFlow(edge, processDef);
+ }
+ }
+
+ /*
+ * Translate a bpmn sequenceflow to a jpdl transition
+ */
+ private void translateSequenceFlow(SequenceEdge edge,
+ ProcessDefinition processDef) {
+ Transition transition = new Transition();
+ Node element = processDef.getNode(map.get(edge.getSource().getID()));
+ if (!TranslateHelper.mapNamedObjToGraphEle((NamedBpmnObject) edge,
+ (GraphElement) transition)) {
+ errors.add(B2JMessages.Translate_Error_Bpmn_Element_Name
+ + edge.getID());
+ }
+ transition.setProcessDefinition(processDef);
+
+ transition.setFrom(element);
+ transition.setTo(processDef.getNode(map.get(edge.getTarget().getID())));
+ element.addLeavingTransition(transition);
+ if (SequenceFlowConditionType.DEFAULT == edge.getConditionType()
+ .getValue()) {
+ // move default transition to the first of transition list
+ element.reorderLeavingTransition(element.getLeavingTransitions()
+ .size() - 1, 0);
+ } else if (SequenceFlowConditionType.EXPRESSION == edge
+ .getConditionType().getValue()) {
+ transition.setCondition("");
+ }
+ }
+
+ /*
+ * create a jpdl decision structure to map bpmn loop activity
+ */
+ private void createMockLoop(Activity activity, Node element) {
+
+ // create a decision
+ Decision decision = new Decision();
+ String name = activity.getName() + B2JMessages.Loop_Decision;
+ decision.setName(name);
+ decision.setDescription(B2JMessages.Loop_Decision_Description);
+ decision.setProcessDefinition(element.getProcessDefinition());
+ element.getProcessDefinition().addNode(decision);
+ map.put(activity.getID(), name);
+
+ // create a transition from element to decision
+ Transition first = new Transition();
+ first.setName(B2JMessages.To + name);
+ first.setFrom(element);
+ first.setTo(decision);
+ first.setProcessDefinition(element.getProcessDefinition());
+ element.addLeavingTransition(first);
+
+ // create a transition from decision to element
+ Transition second = new Transition();
+ second.setName(B2JMessages.To + element.getName());
+ second.setFrom(decision);
+ second.setTo(element);
+ second.setProcessDefinition(element.getProcessDefinition());
+ decision.addLeavingTransition(second);
+
+ }
+
+}
Added: workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/translate/JpdlXmlWriter.java
===================================================================
--- workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/translate/JpdlXmlWriter.java (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/translate/JpdlXmlWriter.java 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1,211 @@
+/*
+ * 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.tools.b2j.translate;
+
+import java.io.*;
+import java.util.*;
+
+import org.dom4j.*;
+import org.dom4j.io.*;
+import org.jboss.tools.b2j.messages.B2JMessages;
+import org.jbpm.graph.def.*;
+import org.jbpm.graph.node.*;
+
+public class JpdlXmlWriter {
+
+ Namespace jbpmNamespace = new Namespace(null,
+ B2JMessages.Jpdl_32_Namespace_Url);
+ Writer writer;
+ boolean useNamespace = false;
+
+ List<String> errors;
+
+ public List<String> getProblems() {
+ return errors;
+ }
+
+ public void setProblems(List<String> errors) {
+ this.errors = errors;
+ }
+
+ public Namespace getJbpmNamespace() {
+ return jbpmNamespace;
+ }
+
+ public void setJbpmNamespace(Namespace jbpmNamespace) {
+ this.jbpmNamespace = jbpmNamespace;
+ }
+
+ public JpdlXmlWriter() {
+ }
+
+ public void addError(String msg) {
+ errors.add(msg);
+ }
+
+ public String toString(ProcessDefinition processDefinition) {
+ write(processDefinition);
+ return writer.toString();
+ }
+
+ public void setUseNamespace(boolean useNamespace) {
+ this.useNamespace = useNamespace;
+ }
+
+ public void write(ProcessDefinition processDefinition) {
+ errors = new ArrayList<String>();
+ if (writer == null) {
+ addError(B2JMessages.Translate_Error_JpdlWriter_Null);
+ }
+ if (processDefinition == null) {
+ addError(B2JMessages.Translate_Error_JpdlProcess_Definition_Null);
+ }
+ try {
+ // collect the actions of the process definition
+ // we will remove each named event action and the remaining ones
+ // will be written
+ // on the process definition.
+ // create a dom4j dom-tree for the process definition
+ Document document = createDomTree(processDefinition);
+
+ // write the dom-tree to the given writer
+ OutputFormat outputFormat = new OutputFormat(" ", true);
+ // OutputFormat outputFormat = OutputFormat.createPrettyPrint();
+ XMLWriter xmlWriter = new XMLWriter(writer, outputFormat);
+ xmlWriter.write(document);
+ xmlWriter.flush();
+ writer.flush();
+ } catch (IOException e) {
+ addError(B2JMessages.Translate_Error_JpdlFile_CanNotGenerate
+ + e.getMessage());
+ }
+ }
+
+ private Document createDomTree(ProcessDefinition processDefinition) {
+ Document document = DocumentHelper.createDocument();
+ Element root = null;
+
+ if (useNamespace) {
+ root = document.addElement(
+ B2JMessages.Jpdl_Process_Definition_Element, jbpmNamespace
+ .getURI());
+ } else {
+ root = document
+ .addElement(B2JMessages.Jpdl_Process_Definition_Element);
+ }
+ addAttribute(root, B2JMessages.Jpdl_Element_Name, processDefinition
+ .getName());
+
+ // write the start-state
+ if (processDefinition.getStartState() != null) {
+ writeStartNode(root, (StartState) processDefinition.getStartState());
+ }
+
+ // write the nodeMap
+ if ((processDefinition.getNodes() != null)
+ && (processDefinition.getNodes().size() > 0)) {
+ writeNodes(root, processDefinition.getNodes());
+ }
+
+ root.addText(System.getProperty("line.separator"));
+
+ return document;
+ }
+
+ private void writeStartNode(Element element, StartState startState) {
+ if (startState != null) {
+ writeNode(addElement(element, getTypeName(startState)), startState);
+ }
+ }
+
+ private void writeNodes(Element parentElement, Collection<?> nodes) {
+ Iterator<?> iter = nodes.iterator();
+ while (iter.hasNext()) {
+ org.jbpm.graph.def.Node node = (org.jbpm.graph.def.Node) iter
+ .next();
+ if (!(node instanceof StartState)) {
+ Element nodeElement = addElement(parentElement, ProcessFactory
+ .getTypeName(node));
+ node.write(nodeElement);
+ writeNode(nodeElement, node);
+ }
+ }
+ }
+
+ private void writeNode(Element element, org.jbpm.graph.def.Node node) {
+ addAttribute(element, B2JMessages.Jpdl_Element_Name, node.getName());
+
+ if (B2JMessages.Jpdl_ProcessState_Element_Name
+ .equals(getTypeName(node))) {
+ Element ele = addElement(element,
+ B2JMessages.Jpdl_SubProcess_Element_Name);
+ addAttribute(ele, B2JMessages.Jpdl_Element_Name,
+ ((ProcessState) node).getSubProcessDefinition().getName());
+ }
+
+ writeTransitions(element, node);
+ }
+
+ private void writeTransitions(Element element, org.jbpm.graph.def.Node node) {
+ if (node.getLeavingTransitionsMap() != null) {
+ Iterator<?> iter = node.getLeavingTransitionsList().iterator();
+ while (iter.hasNext()) {
+ Transition transition = (Transition) iter.next();
+ writeTransition(element
+ .addElement(B2JMessages.Jpdl_Transition_Element),
+ transition);
+ }
+ }
+ }
+
+ private void writeTransition(Element transitionElement,
+ Transition transition) {
+ if (transition.getTo() != null) {
+ transitionElement.addAttribute(B2JMessages.To, transition.getTo()
+ .getName());
+ }
+ if (transition.getName() != null) {
+ transitionElement.addAttribute(B2JMessages.Jpdl_Element_Name,
+ transition.getName());
+ }
+ }
+
+ private Element addElement(Element element, String elementName) {
+ Element newElement = element.addElement(elementName);
+ return newElement;
+ }
+
+ private void addAttribute(Element e, String attributeName, String value) {
+ if (value != null) {
+ e.addAttribute(attributeName, value);
+ }
+ }
+
+ private String getTypeName(Object o) {
+ return ProcessFactory.getTypeName((org.jbpm.graph.def.Node) o);
+ }
+
+ public void setWriter(Writer writer) {
+ this.writer = writer;
+ }
+
+}
Added: workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/translate/TranslateHelper.java
===================================================================
--- workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/translate/TranslateHelper.java (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/translate/TranslateHelper.java 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1,114 @@
+package org.jboss.tools.b2j.translate;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory;
+import org.eclipse.stp.bpmn.BpmnDiagram;
+import org.eclipse.stp.bpmn.NamedBpmnObject;
+import org.jboss.tools.b2j.messages.B2JMessages;
+import org.jboss.tools.b2j.util.B2JUtil;
+import org.jbpm.graph.def.GraphElement;
+
+public class TranslateHelper {
+
+ static List<String> nameList = new ArrayList<String>();
+
+ /*
+ * get a bpmn diagram from a bpmn file
+ */
+ public static BpmnDiagram getBpmnDiagram(IFile bpmnFile) throws IOException {
+ nameList.clear();
+ GMFResourceFactory RESOURCE_FACTORY = new GMFResourceFactory();
+ ResourceSet resourceSet = new ResourceSetImpl();
+ resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
+ .put(B2JMessages.Bpmn_Suffix, RESOURCE_FACTORY);
+ URI uriBpmn = URI.createURI(B2JMessages.Workspace_Prefix
+ + bpmnFile.getFullPath());
+ Resource resBpmn = resourceSet.createResource(uriBpmn);
+ resBpmn.load(GMFResourceFactory.getDefaultLoadOptions());
+ return (BpmnDiagram) resBpmn.getContents().get(0);
+ }
+
+ /*
+ * map bpmn's NamedBpmnObject to jpdl's GraphElement
+ */
+ public static boolean mapNamedObjToGraphEle(NamedBpmnObject namedObject,
+ GraphElement graphEle) {
+ if (checkElementName(namedObject)) {
+ graphEle.setDescription(namedObject.getDocumentation());
+ graphEle.setName(namedObject.getName());
+ return true;
+ }
+ return false;
+ }
+
+ public static IFile[] createJpdlFiles(IFile bpmnFile,
+ String[] strForProcessDefs, String[] jpdlFileNames)
+ throws CoreException {
+ IFolder jpdlFolder = B2JUtil.createFolder(bpmnFile.getParent(),
+ B2JMessages.Jpdl_Suffix);
+ IFolder diagramFolder = B2JUtil.createFolder(jpdlFolder, bpmnFile
+ .getName());
+
+ IFile[] jpdlFiles = new IFile[strForProcessDefs.length];
+ IFolder processFolder = null;
+ int i = 0;
+ ByteArrayInputStream bytes = null;
+ for (String str : strForProcessDefs) {
+ bytes = new ByteArrayInputStream(str.getBytes());
+ processFolder = B2JUtil.createFolder(diagramFolder,
+ jpdlFileNames[i]);
+ jpdlFiles[i] = B2JUtil.createFile(processFolder,
+ B2JMessages.Jpdl_Process_Definition_Name, bytes);
+ i++;
+ }
+ return jpdlFiles;
+ }
+
+ /*
+ * generate a process definition name. the name is composed of the names
+ * from bpmn diagram to the element
+ */
+ public static String generateProcessName(NamedBpmnObject graph) {
+ if (graph instanceof BpmnDiagram) {
+ return graph.getName();
+ } else {
+ String str = generateProcessName((NamedBpmnObject) graph
+ .eContainer());
+ if (str == null) {
+ return graph.getName();
+ } else {
+ return str + B2JMessages.Folder_Name_Separator
+ + graph.getName();
+ }
+ }
+
+ }
+
+ /*
+ * check the bpmn element name is null or "" or same to another element name
+ */
+ public static boolean checkElementName(NamedBpmnObject graph) {
+ if (graph.getName() == null && "".equals(graph.getName())) {
+ return false;
+ }
+
+ if (nameList.contains(graph.getName())) {
+ return false;
+ }
+ nameList.add(graph.getName());
+ return true;
+
+ }
+
+}
Added: workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/util/B2JUtil.java
===================================================================
--- workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/util/B2JUtil.java (rev 0)
+++ workspace/grid/org.jboss.tools.b2j/src/org/jboss/tools/b2j/util/B2JUtil.java 2008-08-20 06:49:07 UTC (rev 9807)
@@ -0,0 +1,61 @@
+package org.jboss.tools.b2j.util;
+
+import java.io.InputStream;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+
+public class B2JUtil {
+
+ public static IFolder createFolder(IContainer parent, String folderName)
+ throws CoreException {
+ IResource child = parent.findMember(folderName);
+ if (child == null) {
+ IFolder folder = parent.getFolder(new Path(folderName));
+ folder.create(true, true, null);
+ return folder;
+ } else {
+ if (child.getType() == IResource.FOLDER) {
+ return (IFolder) child;
+ } else {
+ return null;
+ }
+ }
+ }
+
+ public static IFile createFile(IContainer parent, String fileName,
+ InputStream inputStream) throws CoreException {
+ IResource child = parent.findMember(fileName);
+
+ if (child != null) {
+ if (child.getType() == IResource.FILE) {
+
+ // We have permission to overwrite so check if file is read-only
+ if (child.getResourceAttributes() != null
+ && child.getResourceAttributes().isReadOnly()) {
+ IFile[] files = new IFile[1];
+ files[0] = (IFile) child;
+ }
+
+ // Change the contents of the existing file.
+ IFile file = parent.getFile(new Path(fileName));
+ file.setContents(inputStream, true, true, null);
+
+ return file;
+
+ } else {
+ return null;
+ }
+ } else {
+ // Create a new file.
+ IFile file = parent.getFile(new Path(fileName));
+ file.create(inputStream, true, null);
+ return file;
+ }
+ }
+
+}
17 years, 8 months
JBoss Tools SVN: r9806 - in workspace/grid/org.jboss.tools.bpmn2jpdl: META-INF and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-08-20 02:47:12 -0400 (Wed, 20 Aug 2008)
New Revision: 9806
Added:
workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/GraphicalFileGenerator.java
Removed:
workspace/grid/org.jboss.tools.bpmn2jpdl/lib/commons-logging.jar
workspace/grid/org.jboss.tools.bpmn2jpdl/lib/jbpm-jpdl.jar
workspace/grid/org.jboss.tools.bpmn2jpdl/lib/jbpm.cfg.xml
workspace/grid/org.jboss.tools.bpmn2jpdl/lib/org/
Modified:
workspace/grid/org.jboss.tools.bpmn2jpdl/.classpath
workspace/grid/org.jboss.tools.bpmn2jpdl/META-INF/MANIFEST.MF
workspace/grid/org.jboss.tools.bpmn2jpdl/build.properties
workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/B2J.java
workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/action/B2JAction.java
workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/messages/B2J.properties
workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/messages/B2JMessages.java
workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java
workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/DomXmlWriter.java
workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/TranslateHelper.java
workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/util/B2JUtil.java
Log:
add graphical jpdl file translator
Modified: workspace/grid/org.jboss.tools.bpmn2jpdl/.classpath
===================================================================
--- workspace/grid/org.jboss.tools.bpmn2jpdl/.classpath 2008-08-19 23:45:02 UTC (rev 9805)
+++ workspace/grid/org.jboss.tools.bpmn2jpdl/.classpath 2008-08-20 06:47:12 UTC (rev 9806)
@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry exported="true" kind="lib" path="lib/"/>
- <classpathentry exported="true" kind="lib" path="lib/commons-logging.jar"/>
<classpathentry exported="true" kind="lib" path="lib/dom4j-1.6.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/jbpm-jpdl.jar" sourcepath="D:/sources/jbpm/trunk/modules/jpdl"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
Modified: workspace/grid/org.jboss.tools.bpmn2jpdl/META-INF/MANIFEST.MF
===================================================================
--- workspace/grid/org.jboss.tools.bpmn2jpdl/META-INF/MANIFEST.MF 2008-08-19 23:45:02 UTC (rev 9805)
+++ workspace/grid/org.jboss.tools.bpmn2jpdl/META-INF/MANIFEST.MF 2008-08-20 06:47:12 UTC (rev 9806)
@@ -7,13 +7,10 @@
Bundle-Activator: org.jboss.tools.b2j.B2J
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.eclipse.stp.bpmn;bundle-version="1.0.0",
org.jboss.tools.common;bundle-version="2.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ClassPath: lib/jbpm-jpdl.jar,
- .,
- lib/dom4j-1.6.1.jar,
- lib/commons-logging.jar,
- lib/
+Bundle-ClassPath: .,
+ lib/dom4j-1.6.1.jar
Bundle-Vendor: %PLUGIN_PROVIDER
+Import-Package: org.eclipse.core.resources
Modified: workspace/grid/org.jboss.tools.bpmn2jpdl/build.properties
===================================================================
--- workspace/grid/org.jboss.tools.bpmn2jpdl/build.properties 2008-08-19 23:45:02 UTC (rev 9805)
+++ workspace/grid/org.jboss.tools.bpmn2jpdl/build.properties 2008-08-20 06:47:12 UTC (rev 9806)
@@ -3,8 +3,5 @@
bin.includes = META-INF/,\
.,\
plugin.xml,\
- lib/jbpm-jpdl.jar,\
- lib/dom4j-1.6.1.jar,\
- lib/commons-logging.jar,\
- lib/,\
- plugin.properties
+ plugin.properties,\
+ lib/dom4j-1.6.1.jar
Deleted: workspace/grid/org.jboss.tools.bpmn2jpdl/lib/commons-logging.jar
===================================================================
(Binary files differ)
Deleted: workspace/grid/org.jboss.tools.bpmn2jpdl/lib/jbpm-jpdl.jar
===================================================================
(Binary files differ)
Deleted: workspace/grid/org.jboss.tools.bpmn2jpdl/lib/jbpm.cfg.xml
===================================================================
--- workspace/grid/org.jboss.tools.bpmn2jpdl/lib/jbpm.cfg.xml 2008-08-19 23:45:02 UTC (rev 9805)
+++ workspace/grid/org.jboss.tools.bpmn2jpdl/lib/jbpm.cfg.xml 2008-08-20 06:47:12 UTC (rev 9806)
@@ -1,52 +0,0 @@
-<jbpm-configuration>
-
- <!--
- This configuration is used when there is no jbpm.cfg.xml file found in the
- root of the classpath. It is a very basic configuration without persistence
- and message services. Only the authorization service installed.
- You can parse and create processes, but when you try to use one of the
- unavailable services, you'll get an exception.
- -->
-
- <jbpm-context>
- <service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory" />
- <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
- <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
- <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
- <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
- <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
- </jbpm-context>
-
- <!-- configuration property used by persistence service impl org.jbpm.persistence.db.DbPersistenceServiceFactory -->
- <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" />
-
- <!-- configuration resource files pointing to default configuration files in jbpm-{version}.jar -->
- <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
- <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
- <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
- <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
- <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
- <string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
- <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
- <string name="resource.mail.templates" value="jbpm.mail.templates.xml" />
-
- <int name="jbpm.byte.block.size" value="1024" singleton="true" />
- <bean name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
- <bean name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
- <string name="jbpm.mail.smtp.host" value="localhost" />
- <bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
- <string name="jbpm.mail.from.address" value="jbpm@noreply" />
-
- <bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor">
- <field name="jbpmConfiguration"><ref bean="jbpmConfiguration" /></field>
- <field name="name"><string value="JbpmJobExector" /></field>
- <field name="nbrOfThreads"><int value="1" /></field>
- <field name="idleInterval"><int value="5000" /></field>
- <field name="maxIdleInterval"><int value="3600000" /></field> <!-- 1 hour -->
- <field name="historyMaxSize"><int value="20" /></field>
- <field name="maxLockTime"><int value="600000" /></field> <!-- 10 minutes -->
- <field name="lockMonitorInterval"><int value="60000" /></field> <!-- 1 minute -->
- <field name="lockBufferTime"><int value="5000" /></field> <!-- 5 seconds -->
- </bean>
-
-</jbpm-configuration>
Modified: workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/B2J.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/B2J.java 2008-08-19 23:45:02 UTC (rev 9805)
+++ workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/B2J.java 2008-08-20 06:47:12 UTC (rev 9806)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.b2j;
import org.jboss.tools.common.log.BaseUIPlugin;
@@ -4,7 +15,9 @@
import org.osgi.framework.BundleContext;
/**
- * The activator class controls the plug-in life cycle
+ * @author Grid Qian
+ *
+ * this a plugin class
*/
public class B2J extends BaseUIPlugin {
Modified: workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/action/B2JAction.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/action/B2JAction.java 2008-08-19 23:45:02 UTC (rev 9805)
+++ workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/action/B2JAction.java 2008-08-20 06:47:12 UTC (rev 9806)
@@ -1,7 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.b2j.action;
-import java.io.InputStreamReader;
-
import org.dom4j.Document;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
@@ -14,32 +23,58 @@
import org.eclipse.ui.IWorkbenchPart;
import org.jboss.tools.b2j.messages.B2JMessages;
import org.jboss.tools.b2j.translate.BPMN2JPDL;
+import org.jboss.tools.b2j.translate.GraphicalFileGenerator;
+import org.jboss.tools.b2j.translate.TranslateHelper;
import org.jboss.tools.b2j.util.B2JUtil;
-import org.xml.sax.InputSource;
-public class B2JAction implements IObjectActionDelegate{
-
- //private IWorkbenchPart myPart;
+/**
+ * @author Grid Qian
+ *
+ * the popup menu action for bpmn ->jpdl
+ */
+public class B2JAction implements IObjectActionDelegate {
+
private IFile bpmnFile;
public void setActivePart(IAction arg0, IWorkbenchPart part) {
- //myPart = part;
+ // myPart = part;
}
public void run(IAction arg0) {
+ String bpmnFileName = bpmnFile.getName();
+ String bpmnFileParentPath = bpmnFile.getParent().getLocation()
+ .toOSString();
Document bpmnDocument = null;
try {
- bpmnDocument = B2JUtil.parse(new InputSource(new InputStreamReader(bpmnFile.getContents())));
- } catch (CoreException e) {
- System.out.println(B2JMessages.Translate_Error_BpmnFile_CanNotRead + e.getMessage());
+ bpmnDocument = B2JUtil.parse(bpmnFileParentPath, bpmnFileName);
} catch (Exception e1) {
- System.out.println(B2JMessages.Translate_Error_BpmnFile_CanNotParse + e1.getMessage());
+ System.out.println(B2JMessages.Translate_Error_BpmnFile_CanNotRead
+ + e1.getMessage());
}
- BPMN2JPDL translator = new BPMN2JPDL(bpmnFile.getName(),bpmnFile.getParent().getLocation().toOSString(),bpmnDocument);
- translator.translateToFiles();
-
+ BPMN2JPDL translator = new BPMN2JPDL(bpmnFileName, bpmnFileParentPath,
+ bpmnDocument);
+ translator.translateToFiles();
+
+ // generate jpdl gpd file from *.bpmn_diagram
+ String bpmnDiagramFileName = TranslateHelper
+ .getBpmnDiagramName(bpmnFileName);
+ Document bpmnDiagramDocument = null;
try {
- ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
+ bpmnDiagramDocument = B2JUtil.parse(bpmnFileParentPath,
+ bpmnDiagramFileName);
+ } catch (Exception e1) {
+ System.out
+ .println(B2JMessages.Translate_Error_BpmnDiagramFile_CanNotRead
+ + e1.getMessage());
+ }
+ GraphicalFileGenerator generator = new GraphicalFileGenerator(
+ bpmnDiagramDocument, translator.getMap(), bpmnFileParentPath,
+ bpmnFileName);
+ generator.translateToFiles();
+
+ try {
+ ResourcesPlugin.getWorkspace().getRoot().refreshLocal(
+ IResource.DEPTH_INFINITE, null);
} catch (CoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Modified: workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/messages/B2J.properties
===================================================================
--- workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/messages/B2J.properties 2008-08-19 23:45:02 UTC (rev 9805)
+++ workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/messages/B2J.properties 2008-08-20 06:47:12 UTC (rev 9806)
@@ -1,22 +1,52 @@
Loop_Decision=Loop_Decition
-Loop_Decision_Description=this decision is for mocking bpmn loop activity
To=to
-Bpmn_Suffix=bpmn
-Workspace_Prefix=platform:/resource
+Space=
+Underline=_
+Folder_Name_Separator=.
+Dom_Element_Name=name
+Dom_Element_ID=id
+Width_Attribute_Name=width
+Height_Attribute_Name=height
+X_Attribute_Name=x
+Y_Attribute_Name=y
+Bpmn_Diagram_Name_Suffix=_diagram
+Bpmn_Pool_Element_Name=pools
+Bpmn_Vertice_Element_Name=vertices
+Bpmn_SequenceFlow_Element_Name=sequenceEdges
+Bpmn_Href_Attribute_Name=href
+Bpmn_XmiType_Attribute_Name=type
+Bpmn_ActivityType_Attribute_Name=activityType
+Bpmn_InFlow_Attribute_Name=incomingEdges
+Bpmn_Looping_Attribute_Name=looping
+Bpmn_FlowSource_Attribute_Name=source
+Bpmn_FlowTarget_Attribute_Name=target
+Bpmn_FlowDefault_Attribute_Name=isDefault
+Bpmn_Element_ID=iD
Jpdl_Suffix=jpdl
Jpdl_Process_Definition_Name=processdefinition.xml
Jpdl_32_Namespace_Url=urn:jbpm.org:jpdl-3.2
-Jpdl_Element_Name=name
-Jpdl_Process_Definition_Element=process-definition
+Jpdl_Process_Definition_Element_Name=process-definition
Jpdl_Transition_Element=transition
Jpdl_ProcessState_Element_Name=process-state
Jpdl_SubProcess_Element_Name=sub-process
-Folder_Name_Separator=.
-Translate_Error_JpdlWriter_Null=The JPDL Writer is null.
+Jpdl_Decision_Element_Name=decision
+Jpdl_Fork_Element_Name=fork
+Jpdl_Join_Element_Name=join
+Jpdl_Start_Element_Name=start-state
+Jpdl_State_Element_Name=state
+Jpdl_End_Element_Name=end-state
+Jpdl_Node_Element_Name=node
+Gpd_Definition_Name=gpd.xml
+Gpd_Layout_Element_Name=layoutConstraint
+Gpd_Element_Name=element
+Gpd_Process_Diagram_Name=process-diagram
+Gpd_Label_Element_Name=label
+Translate_Error_GpdFile_CanNotGenerate=Couldn't write gpd.xml:
+Translate_Error_GpdFile_CanNotWrite=Couldn't write gpd definition to a gpd.xml:
Translate_Error_JpdlProcess_Definition_Null=The JPDL process definition is null.
Translate_Error_JpdlFile_CanNotGenerate=Couldn't write process definition xml:
Translate_Error_JpdlFile_CanNotWrite=Couldn't write process definition to a jpdl file:
-Translate_Error_BpmnFile_CanNotRead=Couldn't read bpmn file:
-Translate_Error_BpmnFile_CanNotParse=Couldn't parse bpmn file to a DOM document:
+Translate_Error_BpmnFile_CanNotRead=Couldn't read or parse bpmn file to a DOM document:
+Translate_Error_BpmnDiagramFile_CanNotRead=Couldn't read or parse bpmn_diagram file to a DOM document:
Translate_Warning_Bpmn_Element_Name= The bpmn element's name is null or same to another element's name:
Translate_Warning_Bpmn_Element_Type=The type of this bpmn element is not translated to corresponding jpdl element:
\ No newline at end of file
Modified: workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/messages/B2JMessages.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/messages/B2JMessages.java 2008-08-19 23:45:02 UTC (rev 9805)
+++ workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/messages/B2JMessages.java 2008-08-20 06:47:12 UTC (rev 9806)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.b2j.messages;
import org.eclipse.osgi.util.NLS;
@@ -2,2 +13,5 @@
+/**
+ * @author Grid Qian
+ */
public class B2JMessages {
@@ -11,29 +25,58 @@
}
public static String Loop_Decision;
- public static String Loop_Decision_Description;
public static String To;
- public static String Bpmn_Suffix;
- public static String Workspace_Prefix;
public static String Folder_Name_Separator;
+ public static String Space;
+ public static String Underline;
+ public static String Bpmn_Diagram_Name_Suffix;
+ public static String Bpmn_Pool_Element_Name;
+ public static String Bpmn_Element_ID;
+ public static String Bpmn_Vertice_Element_Name;
+ public static String Bpmn_SequenceFlow_Element_Name;
+ public static String Bpmn_Looping_Attribute_Name;
+ public static String Bpmn_InFlow_Attribute_Name;
+ public static String Bpmn_XmiType_Attribute_Name;
+ public static String Bpmn_Href_Attribute_Name;
+ public static String Width_Attribute_Name;
+ public static String Height_Attribute_Name;
+ public static String X_Attribute_Name;
+ public static String Y_Attribute_Name;
+ public static String Bpmn_ActivityType_Attribute_Name;
+ public static String Bpmn_FlowSource_Attribute_Name;
+ public static String Bpmn_FlowTarget_Attribute_Name;
+ public static String Bpmn_FlowDefault_Attribute_Name;
public static String Jpdl_Suffix;
public static String Jpdl_Process_Definition_Name;
public static String Jpdl_ProcessState_Element_Name;
public static String Jpdl_SubProcess_Element_Name;
public static String Jpdl_32_Namespace_Url;
- public static String Jpdl_Process_Definition_Element;
+ public static String Jpdl_Process_Definition_Element_Name;
public static String Jpdl_Transition_Element;
- public static String Jpdl_Element_Name;
- public static String Translate_Error_JpdlWriter_Null;
+ public static String Jpdl_Decision_Element_Name;
+ public static String Jpdl_Fork_Element_Name;
+ public static String Jpdl_Join_Element_Name;
+ public static String Jpdl_Start_Element_Name;
+ public static String Jpdl_State_Element_Name;
+ public static String Jpdl_End_Element_Name;
+ public static String Jpdl_Node_Element_Name;
+ public static String Gpd_Definition_Name;
+ public static String Gpd_Layout_Element_Name;
+ public static String Gpd_Element_Name;
+ public static String Gpd_Process_Diagram_Name;
+ public static String Gpd_Label_Element_Name;
+ public static String Dom_Element_Name;
+ public static String Dom_Element_ID;
public static String Translate_Error_JpdlProcess_Definition_Null;
public static String Translate_Error_JpdlFile_CanNotWrite;
public static String Translate_Error_JpdlFile_CanNotGenerate;
+ public static String Translate_Error_GpdFile_CanNotGenerate;
+ public static String Translate_Error_GpdFile_CanNotWrite;
public static String Translate_Error_BpmnFile_CanNotRead;
- public static String Translate_Error_BpmnFile_CanNotParse;
+ public static String Translate_Error_BpmnDiagramFile_CanNotRead;
public static String Translate_Warning_Bpmn_Element_Name;
public static String Translate_Warning_Bpmn_Element_Type;
-
static {
NLS.initializeMessages(BUNDLE_NAME, B2JMessages.class);
}
Modified: workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java 2008-08-19 23:45:02 UTC (rev 9805)
+++ workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java 2008-08-20 06:47:12 UTC (rev 9806)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.b2j.translate;
import java.io.IOException;
@@ -11,12 +22,16 @@
import org.dom4j.Element;
import org.jboss.tools.b2j.B2J;
import org.jboss.tools.b2j.messages.B2JMessages;
-import org.jboss.tools.b2j.util.B2JUtil;
+/**
+ * @author Grid Qian
+ *
+ * this is a translator for bpmn ->jpdl
+ */
public class BPMN2JPDL {
String bpmnFileName;
- String bpmnFilePath;
+ String rootLocation;
Document bpmnDocument;
List<String> poolIDList;
List<Document> processDefs = new LinkedList<Document>();
@@ -44,6 +59,14 @@
this.warnings = warnings;
}
+ public Map<String, Element> getMap() {
+ return map;
+ }
+
+ public void setMap(Map<String, Element> map) {
+ this.map = map;
+ }
+
public BPMN2JPDL() {
}
@@ -55,7 +78,7 @@
public BPMN2JPDL(String bpmnFileName, String bpmnFilePath,
List<String> poolIDList, Document bpmnDocument) {
this.bpmnFileName = bpmnFileName;
- this.bpmnFilePath = bpmnFilePath;
+ this.rootLocation = bpmnFilePath;
this.poolIDList = poolIDList;
this.bpmnDocument = bpmnDocument;
}
@@ -96,8 +119,9 @@
}
try {
- B2JUtil.createJpdlFiles(bpmnFilePath, bpmnFileName,
- strForProcessDefs, jpdlFileNames);
+ TranslateHelper.createFiles(rootLocation, bpmnFileName,
+ strForProcessDefs, jpdlFileNames,
+ B2JMessages.Jpdl_Process_Definition_Name);
} catch (Exception e) {
errors.add(B2JMessages.Translate_Error_JpdlFile_CanNotWrite
+ e.getMessage());
@@ -126,13 +150,15 @@
Element diagram = bpmnDocument.getRootElement();
if (this.poolIDList == null || this.poolIDList.size() == 0) {
- for (Object pool : diagram.elements("pools")) {
+ for (Object pool : diagram
+ .elements(B2JMessages.Bpmn_Pool_Element_Name)) {
translateGraph((Element) pool);
}
} else {
- for (Object pool : diagram.elements("pools")) {
+ for (Object pool : diagram
+ .elements(B2JMessages.Bpmn_Pool_Element_Name)) {
if (this.poolIDList.contains(((Element) pool)
- .attributeValue("iD"))) {
+ .attributeValue(B2JMessages.Bpmn_Element_ID))) {
translateGraph((Element) pool);
}
}
@@ -143,16 +169,20 @@
* Translate a bpmn pool or subprocess to a jpdl process Dom tree
*/
private Element translateGraph(Element graph) {
- Document processDef = DomXmlWriter.createDomTree(true);
+ Document processDef = TranslateHelper.createJpdlDomTree(true);
Element processRoot = processDef.getRootElement();
- DomXmlWriter.addAttribute(processRoot, B2JMessages.Jpdl_Element_Name,
+ DomXmlWriter.addAttribute(processRoot, B2JMessages.Dom_Element_Name,
TranslateHelper.generateProcessName(graph));
processDef.setName(processRoot
- .attributeValue(B2JMessages.Jpdl_Element_Name));
+ .attributeValue(B2JMessages.Dom_Element_Name));
+ map.put(graph.attributeValue(B2JMessages.Dom_Element_ID)
+ + B2JMessages.Bpmn_Pool_Element_Name, processRoot);
+
for (Object activity : graph.elements()) {
- if ("vertices".equals(((Element) activity).getName())) {
+ if (B2JMessages.Bpmn_Vertice_Element_Name
+ .equals(((Element) activity).getName())) {
translateActivity(((Element) activity), processRoot);
}
}
@@ -166,16 +196,19 @@
* Translate a bpmn activity to a jpdl node according to activity type
*/
private void translateActivity(Element activity, Element processRoot) {
- String type = activity.attributeValue("type");
+ String type = activity
+ .attributeValue(B2JMessages.Bpmn_XmiType_Attribute_Name);
Element element = null;
// According to bpmn activity type, map to different jpdl node
// Some type can not be supported by this translation, we give
// a warining message for it.
if ("bpmn:Activity".equals(type)) {
- String activityType = activity.attributeValue("activityType");
+ String activityType = activity
+ .attributeValue(B2JMessages.Bpmn_ActivityType_Attribute_Name);
if (activityType == null) {
- element = DomXmlWriter.addElement(processRoot, "node");
+ element = DomXmlWriter.addElement(processRoot,
+ B2JMessages.Jpdl_Node_Element_Name);
} else if ("EventStartEmpty".equals(activityType)
|| "EventStartMessage".equals(activityType)
|| "EventStartRule".equals(activityType)
@@ -183,7 +216,8 @@
|| "EventStartLink".equals(activityType)
|| "EventStartMultiple".equals(activityType)
|| "EventStartSignal".equals(activityType)) {
- element = DomXmlWriter.addElement(processRoot, "start-state");
+ element = DomXmlWriter.addElement(processRoot,
+ B2JMessages.Jpdl_Start_Element_Name);
if (!"EventStartEmpty".equals(activityType)) {
warnings
.add(B2JMessages.Translate_Warning_Bpmn_Element_Type
@@ -200,7 +234,8 @@
|| "EventIntermediateLink".equals(activityType)
|| "EventIntermediateSignal".equals(activityType)) {
- element = DomXmlWriter.addElement(processRoot, "state");
+ element = DomXmlWriter.addElement(processRoot,
+ B2JMessages.Jpdl_State_Element_Name);
if (!"EventIntermediateEmpty".equals(activityType)) {
warnings
.add(B2JMessages.Translate_Warning_Bpmn_Element_Type
@@ -216,7 +251,8 @@
|| "EventEndCancel".equals(activityType)
|| "EventEndSignal".equals(activityType)) {
- element = DomXmlWriter.addElement(processRoot, "end-state");
+ element = DomXmlWriter.addElement(processRoot,
+ B2JMessages.Jpdl_End_Element_Name);
if (!"EventEndEmpty".equals(activityType)) {
warnings
.add(B2JMessages.Translate_Warning_Bpmn_Element_Type
@@ -225,7 +261,8 @@
} else if ("GatewayDataBasedExclusive".equals(activityType)
|| "GatewayEventBasedExclusive".equals(activityType)
|| "GatewayComplex".equals(activityType)) {
- element = DomXmlWriter.addElement(processRoot, "decision");
+ element = DomXmlWriter.addElement(processRoot,
+ B2JMessages.Jpdl_Decision_Element_Name);
if (!"GatewayDataBasedExclusive".equals(activityType)) {
warnings
.add(B2JMessages.Translate_Warning_Bpmn_Element_Type
@@ -233,12 +270,16 @@
}
} else if ("GatewayParallel".equals(activityType)
|| "GatewayDataBasedInclusive".equals(activityType)) {
- if (activity.attributeValue("incomingEdges") == null
- || activity.attributeValue("incomingEdges").split(" ").length == 1) {
-
- element = DomXmlWriter.addElement(processRoot, "fork");
+ if (activity
+ .attributeValue(B2JMessages.Bpmn_InFlow_Attribute_Name) == null
+ || activity.attributeValue(
+ B2JMessages.Bpmn_InFlow_Attribute_Name).split(
+ B2JMessages.Space).length == 1) {
+ element = DomXmlWriter.addElement(processRoot,
+ B2JMessages.Jpdl_Fork_Element_Name);
} else {
- element = DomXmlWriter.addElement(processRoot, "join");
+ element = DomXmlWriter.addElement(processRoot,
+ B2JMessages.Jpdl_Join_Element_Name);
}
if (!"GatewayDataBasedInclusive".equals(activityType)) {
warnings
@@ -247,18 +288,20 @@
}
}
} else if ("bpmn:SubProcess".equals(type)) {
- element = DomXmlWriter.addElement(processRoot, "process-state");
+ element = DomXmlWriter.addElement(processRoot,
+ B2JMessages.Jpdl_ProcessState_Element_Name);
translateSubprocess(activity, element);
}
if (!TranslateHelper.check_mapElementName(activity, element)) {
warnings.add(B2JMessages.Translate_Warning_Bpmn_Element_Name
- + activity.attributeValue("iD"));
+ + activity.attributeValue(B2JMessages.Bpmn_Element_ID));
}
- map.put(activity.attributeValue("id"), element);
+ map.put(activity.attributeValue(B2JMessages.Dom_Element_ID), element);
// If bpmn activity is loop type, then create a structure to mock it.
- if ("true".equals(activity.attributeValue("looping"))) {
+ if ("true".equals(activity
+ .attributeValue(B2JMessages.Bpmn_Looping_Attribute_Name))) {
createMockLoop(activity, element);
}
}
@@ -271,15 +314,16 @@
Element processRoot = translateGraph(subProcess);
Element ele = DomXmlWriter.addElement(element,
B2JMessages.Jpdl_SubProcess_Element_Name);
- DomXmlWriter.addAttribute(ele, B2JMessages.Jpdl_Element_Name,
- processRoot.attributeValue(B2JMessages.Jpdl_Element_Name));
+ DomXmlWriter.mapAttribute(ele, B2JMessages.Dom_Element_Name,
+ processRoot);
}
/*
* Translate bpmn sequenceflows to jpdl transitions
*/
private void translateSequenceFlows(Element graph, Element processRoot) {
- for (Object edge : graph.elements("sequenceEdges")) {
+ for (Object edge : graph
+ .elements(B2JMessages.Bpmn_SequenceFlow_Element_Name)) {
translateSequenceFlow((Element) edge, processRoot);
}
}
@@ -289,24 +333,33 @@
*/
private void translateSequenceFlow(Element edge, Element processRoot) {
- Element source = map.get(edge.attributeValue("source"));
+ Element source = map.get(edge
+ .attributeValue(B2JMessages.Bpmn_FlowSource_Attribute_Name));
Element transition = null;
- if ("true".equals(edge.attributeValue("isDefault"))
- && source.element("transition") != null) {
+ if ("true".equals(edge
+ .attributeValue(B2JMessages.Bpmn_FlowDefault_Attribute_Name))
+ && source.element(B2JMessages.Jpdl_Transition_Element) != null) {
// move default transition to the first of transition list
- transition = DomXmlWriter.addElement(source, "transition", 0);
+ transition = DomXmlWriter.addElement(source,
+ B2JMessages.Jpdl_Transition_Element, 0);
} else {
- transition = DomXmlWriter.addElement(source, "transition");
+ transition = DomXmlWriter.addElement(source,
+ B2JMessages.Jpdl_Transition_Element);
}
if (!TranslateHelper.check_mapElementName(edge, transition)) {
warnings.add(B2JMessages.Translate_Warning_Bpmn_Element_Name
- + edge.attributeValue("iD"));
+ + edge.attributeValue(B2JMessages.Bpmn_Element_ID));
}
- transition.addAttribute(B2JMessages.To, map.get(
- edge.attributeValue("target")).attributeValue(
- B2JMessages.Jpdl_Element_Name));
+ transition
+ .addAttribute(
+ B2JMessages.To,
+ map
+ .get(
+ edge
+ .attributeValue(B2JMessages.Bpmn_FlowTarget_Attribute_Name))
+ .attributeValue(B2JMessages.Dom_Element_Name));
}
/*
@@ -316,26 +369,33 @@
// create a decision
Element decision = DomXmlWriter.addElement(element.getParent(),
- "decision");
- String name = activity.attributeValue(B2JMessages.Jpdl_Element_Name)
- + "_" + B2JMessages.Loop_Decision;
- DomXmlWriter
- .addAttribute(decision, B2JMessages.Jpdl_Element_Name, name);
- map.put(activity.attributeValue("id"), decision);
+ B2JMessages.Jpdl_Decision_Element_Name);
+ String name = activity.attributeValue(B2JMessages.Dom_Element_Name)
+ + B2JMessages.Underline + B2JMessages.Loop_Decision;
+ DomXmlWriter.addAttribute(decision, B2JMessages.Dom_Element_Name, name);
+ // use the decision to replace the activity in the map
+ map.put(activity.attributeValue(B2JMessages.Dom_Element_ID), decision);
+ // add the activity to map
+ map.put(activity.attributeValue(B2JMessages.Dom_Element_ID)
+ + B2JMessages.Bpmn_Vertice_Element_Name, element);
+
// create a transition from element to decision
- Element first = DomXmlWriter.addElement(element, "transition");
- first.addAttribute(B2JMessages.Jpdl_Element_Name, B2JMessages.To + " "
- + name);
+ Element first = DomXmlWriter.addElement(element,
+ B2JMessages.Jpdl_Transition_Element);
+ first.addAttribute(B2JMessages.Dom_Element_Name, B2JMessages.To
+ + B2JMessages.Space + name);
first.addAttribute(B2JMessages.To, decision
- .attributeValue(B2JMessages.Jpdl_Element_Name));
+ .attributeValue(B2JMessages.Dom_Element_Name));
// create a transition from decision to element
- Element second = DomXmlWriter.addElement(decision, "transition");
- second.addAttribute(B2JMessages.Jpdl_Element_Name, B2JMessages.To + " "
- + element.attributeValue(B2JMessages.Jpdl_Element_Name));
+ Element second = DomXmlWriter.addElement(decision,
+ B2JMessages.Jpdl_Transition_Element);
+ second.addAttribute(B2JMessages.Dom_Element_Name, B2JMessages.To
+ + B2JMessages.Space
+ + element.attributeValue(B2JMessages.Dom_Element_Name));
second.addAttribute(B2JMessages.To, element
- .attributeValue(B2JMessages.Jpdl_Element_Name));
+ .attributeValue(B2JMessages.Dom_Element_Name));
}
Modified: workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/DomXmlWriter.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/DomXmlWriter.java 2008-08-19 23:45:02 UTC (rev 9805)
+++ workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/DomXmlWriter.java 2008-08-20 06:47:12 UTC (rev 9806)
@@ -1,37 +1,33 @@
-/*
- * 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.
- */
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.b2j.translate;
import java.io.*;
-import java.util.*;
+import java.util.LinkedList;
+import java.util.List;
import org.dom4j.*;
import org.dom4j.io.*;
-import org.jboss.tools.b2j.messages.B2JMessages;
-import org.jbpm.graph.def.*;
-import org.jbpm.graph.node.*;
+/**
+ * @author Grid Qian
+ *
+ * this is for generating dom element or attribute
+ */
public class DomXmlWriter {
+ /*
+ * map a dom document to a string
+ */
public static String toString(Document document) throws IOException {
OutputFormat outputFormat = new OutputFormat(" ", true);
Writer writer = new StringWriter();
@@ -42,116 +38,52 @@
return writer.toString();
}
-
- public static Document createDomTree(boolean useNamespace) {
+ /*
+ * create a dom tree
+ */
+ public static Document createDomTree(boolean useNamespace, String url,
+ String rootElementName) {
Document document = DocumentHelper.createDocument();
Element root = null;
if (useNamespace) {
- Namespace jbpmNamespace = new Namespace(null,
- B2JMessages.Jpdl_32_Namespace_Url);
- root = document.addElement(
- B2JMessages.Jpdl_Process_Definition_Element, jbpmNamespace
- .getURI());
+ Namespace jbpmNamespace = new Namespace(null, url);
+ root = document.addElement(rootElementName, jbpmNamespace.getURI());
} else {
- root = document
- .addElement(B2JMessages.Jpdl_Process_Definition_Element);
+ root = document.addElement(rootElementName);
}
- // addAttribute(root, B2JMessages.Jpdl_Element_Name, processDefinition
- // .getName());
- //
- // // write the start-state
- // if (processDefinition.getStartState() != null) {
- // writeStartNode(root, (StartState) processDefinition.getStartState());
- // }
- //
- // // write the nodeMap
- // if ((processDefinition.getNodes() != null)
- // && (processDefinition.getNodes().size() > 0)) {
- // writeNodes(root, processDefinition.getNodes());
- // }
-
root.addText(System.getProperty("line.separator"));
return document;
}
- private void writeStartNode(Element element, StartState startState) {
- if (startState != null) {
- // writeNode(addElement(element, getTypeName(startState)),
- // startState);
- }
- }
-
- private void writeNodes(Element parentElement, Collection<?> nodes) {
- Iterator<?> iter = nodes.iterator();
- while (iter.hasNext()) {
- org.jbpm.graph.def.Node node = (org.jbpm.graph.def.Node) iter
- .next();
- if (!(node instanceof StartState)) {
- Element nodeElement = addElement(parentElement, ProcessFactory
- .getTypeName(node));
- node.write(nodeElement);
- // writeNode(nodeElement, node);
- }
- }
- }
-
- public static void writeNode(Element activity, Element node) {
- addAttribute(node, B2JMessages.Jpdl_Element_Name, activity.getName());
-
- // if
- // (B2JMessages.Jpdl_ProcessState_Element_Name.equals(getTypeName(node
- // ))) {
- // Element ele =
- // addElement(node,B2JMessages.Jpdl_SubProcess_Element_Name);
- // addAttribute(ele, B2JMessages.Jpdl_Element_Name,((ProcessState)
- // node).getSubProcessDefinition().getName());
- // }
- }
-
- private void writeTransitions(Element element, org.jbpm.graph.def.Node node) {
- if (node.getLeavingTransitionsMap() != null) {
- Iterator<?> iter = node.getLeavingTransitionsList().iterator();
- while (iter.hasNext()) {
- Transition transition = (Transition) iter.next();
- writeTransition(element
- .addElement(B2JMessages.Jpdl_Transition_Element),
- transition);
- }
- }
- }
-
- private void writeTransition(Element transitionElement,
- Transition transition) {
- if (transition.getTo() != null) {
- transitionElement.addAttribute(B2JMessages.To, transition.getTo()
- .getName());
- }
- if (transition.getName() != null) {
- transitionElement.addAttribute(B2JMessages.Jpdl_Element_Name,
- transition.getName());
- }
- }
-
+ /*
+ * add a new element to a dom element
+ */
public static Element addElement(Element element, String elementName) {
Element newElement = element.addElement(elementName);
return newElement;
}
+ /*
+ * add a new element to the location of a dom element
+ */
@SuppressWarnings("unchecked")
public static Element addElement(Element element, String elementName,
int location) {
Element newElement = null;
- if (element.elements("transtion") != null
- && element.elements("transtion").size() > location
+ if (element.elements(elementName) != null
+ && element.elements(elementName).size() > location
&& location >= 0) {
element = DocumentHelper.createElement(elementName);
- element.elements("transtion").add(location, newElement);
+ element.elements(elementName).add(location, newElement);
}
return newElement;
}
+ /*
+ * add a attribute to a dom element
+ */
public static void addAttribute(Element e, String attributeName,
String value) {
if (value != null) {
@@ -159,4 +91,25 @@
}
}
+ /*
+ * get a named element from a element (any depth)
+ */
+ public static List<Element> getElementsByName(Element element, String name) {
+ List<Element> list = new LinkedList<Element>();
+ for (Object ele : element.elements()) {
+ if (name.equals(((Element) ele).getName())) {
+ list.add((Element) ele);
+ }
+ list.addAll(getElementsByName((Element) ele, name));
+ }
+ return list;
+ }
+
+ /*
+ * set a element attribute using a same name attribute of other element
+ */
+ public static void mapAttribute(Element ele, String attrName, Element sourceEle){
+ DomXmlWriter.addAttribute(ele, attrName,sourceEle.attributeValue(attrName));
+ }
+
}
Added: workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/GraphicalFileGenerator.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/GraphicalFileGenerator.java (rev 0)
+++ workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/GraphicalFileGenerator.java 2008-08-20 06:47:12 UTC (rev 9806)
@@ -0,0 +1,233 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.b2j.translate;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.dom4j.Document;
+import org.dom4j.Element;
+import org.jboss.tools.b2j.B2J;
+import org.jboss.tools.b2j.messages.B2JMessages;
+
+/**
+ * @author Grid Qian
+ *
+ * this is a translator for bpmn_diagram to gpd of jpdl
+ */
+public class GraphicalFileGenerator {
+
+ String rootLocation;
+ String bpmnFileName;
+ Document document;
+
+ // gpd.xml documents list
+ List<Document> gpdDefs = new LinkedList<Document>();
+ // the pool of gpd.xml name
+ List<String> gpdPoolNames = new LinkedList<String>();
+ Map<String, Element> map = new HashMap<String, Element>();
+
+ // the warning messages when translate
+ List<String> warnings = new ArrayList<String>();
+
+ // the error messages when translate
+ List<String> errors = new ArrayList<String>();
+
+ public List<String> getErrors() {
+ return errors;
+ }
+
+ public void setErrors(List<String> errors) {
+ this.errors = errors;
+ }
+
+ public List<String> getWarnings() {
+ return warnings;
+ }
+
+ public void setWarnings(List<String> warnings) {
+ this.warnings = warnings;
+ }
+
+ public GraphicalFileGenerator(Document bpmnDiagramDocument,
+ Map<String, Element> map, String rootLocation, String bpmnFileName) {
+ this.rootLocation = rootLocation;
+ this.bpmnFileName = bpmnFileName;
+ this.document = bpmnDiagramDocument;
+ this.map = map;
+ }
+
+ /*
+ * translate a bpmn_diagram document to a gpd document string
+ */
+ public String[] translateToStrings() {
+ this.translateDiagram(this.document);
+ String[] strForProcessDefs = new String[gpdDefs.size()];
+ int i = 0;
+ for (Document def : gpdDefs) {
+ try {
+ strForProcessDefs[i] = DomXmlWriter.toString(def);
+ } catch (IOException e) {
+ this.errors
+ .add(B2JMessages.Translate_Error_GpdFile_CanNotGenerate
+ + e.getMessage());
+ }
+ i++;
+ }
+ return strForProcessDefs;
+ }
+
+ /*
+ * translate every gpd document string to a gpd file
+ */
+ public void translateToFiles() {
+ String[] strForGpdDefs = translateToStrings();
+ String[] gpdFileNames = new String[gpdDefs.size()];
+ int i = 0;
+ for (Document def : gpdDefs) {
+ gpdFileNames[i] = def.getRootElement().attributeValue(
+ B2JMessages.Dom_Element_Name);
+ i++;
+ }
+
+ try {
+ TranslateHelper.createFiles(rootLocation, bpmnFileName,
+ strForGpdDefs, gpdFileNames,
+ B2JMessages.Gpd_Definition_Name);
+ } catch (Exception e) {
+ errors.add(B2JMessages.Translate_Error_GpdFile_CanNotWrite
+ + e.getMessage());
+ }
+
+ if (errors.size() != 0) {
+ for (String str : errors) {
+ B2J.getDefault().logError(str);
+ }
+ }
+
+ if (warnings.size() != 0) {
+ for (String str : warnings) {
+ B2J.getDefault().logWarning(str);
+ }
+ }
+ }
+
+ /*
+ * translate the graphical bpmn_diagram document
+ */
+ private void translateDiagram(Document diagramDocument) {
+ Element rootElement = diagramDocument.getRootElement();
+ List<Element> eleList = DomXmlWriter.getElementsByName(rootElement,
+ B2JMessages.Gpd_Element_Name);
+
+ for (String bpmnID : map.keySet()) {
+ if (bpmnID != null) {
+ // when translate bpmn loop activity, we create a mock
+ // structure.
+ // For this reason, we need to give a (x,y) increment to avoid
+ // two element overlap
+ int xIncre = 0;
+ int yIncre = 0;
+ Element bpmnGpdEle = TranslateHelper.getDiagramLayoutElement(
+ bpmnID, eleList);
+ if (bpmnGpdEle == null
+ && bpmnID
+ .endsWith(B2JMessages.Bpmn_Vertice_Element_Name)) {
+ bpmnGpdEle = TranslateHelper.getDiagramLayoutElement(
+ TranslateHelper.getPureBpmnID(bpmnID,
+ B2JMessages.Bpmn_Vertice_Element_Name),
+ eleList);
+ xIncre = 50;
+ yIncre = 50;
+ }
+ if (bpmnGpdEle == null) {
+ continue;
+ }
+ translateGraphicalElement(TranslateHelper.getXY(bpmnGpdEle,
+ xIncre, yIncre), map.get(bpmnID), eleList);
+ }
+ }
+
+ }
+
+ private void translateGraphicalElement(String[] xy, Element jpdlEle,
+ List<Element> eleList) {
+ if (jpdlEle == null) {
+ return;
+ }
+
+ // if not translate, then translate the pool of the element
+ if (!gpdPoolNames.contains(jpdlEle.getParent().attributeValue(
+ B2JMessages.Dom_Element_Name))
+ && B2JMessages.Jpdl_Process_Definition_Element_Name
+ .equals(jpdlEle.getParent().getName())) {
+ translatePool(eleList, jpdlEle);
+ }
+
+ // translate the bpmn graphical element
+ Element poolEle = null;
+ for (Document doc : gpdDefs) {
+ if (doc.getRootElement().attributeValue(
+ B2JMessages.Dom_Element_Name).equals(
+ jpdlEle.getParent().attributeValue(
+ B2JMessages.Dom_Element_Name))) {
+ poolEle = doc.getRootElement();
+ }
+ }
+ Element pgdEle = TranslateHelper.createNode(poolEle,
+ B2JMessages.Jpdl_Node_Element_Name, jpdlEle);
+
+ TranslateHelper.mapXY(pgdEle, xy[0], xy[1]);
+
+ // translate the sequence flow of the element
+ for (Object ele : jpdlEle.elements(B2JMessages.Jpdl_Transition_Element)) {
+ TranslateHelper.createTransition(pgdEle,
+ B2JMessages.Jpdl_Transition_Element, (Element) ele);
+ }
+ }
+
+ private void translatePool(List<Element> eleList, Element jpdlEle) {
+ // get the bpmn pool id
+ String poolBpmnID = null;
+ for (String id : map.keySet()) {
+ if (map.get(id) == jpdlEle.getParent()) {
+ poolBpmnID = TranslateHelper.getPureBpmnID(id,
+ B2JMessages.Bpmn_Pool_Element_Name);
+ break;
+ }
+ }
+ // get the bpmn pool graphical element
+ if (poolBpmnID != null) {
+ Element poolBpmnGpdEle = TranslateHelper.getDiagramLayoutElement(
+ poolBpmnID, eleList);
+ Document processDiagramDef = DomXmlWriter.createDomTree(false,
+ null, B2JMessages.Gpd_Process_Diagram_Name);
+ Element poolEle = processDiagramDef.getRootElement();
+ DomXmlWriter.mapAttribute(poolEle, B2JMessages.Dom_Element_Name,
+ jpdlEle.getParent());
+ DomXmlWriter.mapAttribute(poolEle,
+ B2JMessages.Width_Attribute_Name, poolBpmnGpdEle);
+ DomXmlWriter.mapAttribute(poolEle,
+ B2JMessages.Height_Attribute_Name, poolBpmnGpdEle);
+
+ gpdDefs.add(processDiagramDef);
+ gpdPoolNames.add(poolEle
+ .attributeValue(B2JMessages.Dom_Element_Name));
+ }
+
+ }
+
+}
Modified: workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/TranslateHelper.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/TranslateHelper.java 2008-08-19 23:45:02 UTC (rev 9805)
+++ workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/translate/TranslateHelper.java 2008-08-20 06:47:12 UTC (rev 9806)
@@ -1,35 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.b2j.translate;
+import java.io.File;
+import java.io.IOException;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
+import org.dom4j.Document;
import org.dom4j.Element;
import org.jboss.tools.b2j.messages.B2JMessages;
+import org.jboss.tools.b2j.util.B2JUtil;
+/**
+ * @author Grid Qian
+ *
+ * this is a helper class for bpmn ->jpdl
+ */
public class TranslateHelper {
+ // the map for the bpmn element id : the corresponding generated element
static Map<String, Integer> nameMap = new HashMap<String, Integer>();
-
-
public static void setNameMap(Map<String, Integer> nameMap) {
TranslateHelper.nameMap = nameMap;
}
/*
+ * get the bpmn_diagram file name
+ */
+ public static String getBpmnDiagramName(String bpmnFileName) {
+ return bpmnFileName + B2JMessages.Bpmn_Diagram_Name_Suffix;
+ }
+
+ /*
+ * create a jpdl dom tree
+ */
+ public static Document createJpdlDomTree(boolean useNamespace) {
+ return DomXmlWriter.createDomTree(useNamespace,
+ B2JMessages.Jpdl_32_Namespace_Url,
+ B2JMessages.Jpdl_Process_Definition_Element_Name);
+
+ }
+
+ /*
+ * create translated files from dom strings
+ */
+ public static File[] createFiles(String parentFolder, String bpmnFileName,
+ String[] strsForGenerate, String[] fileFolders, String fileName)
+ throws IOException {
+ File jpdlFolder = B2JUtil.createFile(parentFolder,
+ B2JMessages.Jpdl_Suffix, null);
+ File diagramFolder = B2JUtil.createFile(jpdlFolder.getAbsolutePath(),
+ bpmnFileName, null);
+
+ File[] files = new File[strsForGenerate.length];
+ File processFolder = null;
+ int i = 0;
+ for (String str : strsForGenerate) {
+ processFolder = B2JUtil.createFile(diagramFolder.getAbsolutePath(),
+ fileFolders[i], null);
+ files[i] = B2JUtil.createFile(processFolder.getAbsolutePath(),
+ fileName, str);
+ i++;
+ }
+ return files;
+ }
+
+ /*
* generate a process definition name. the name is composed of the names
* from bpmn diagram to the element
*/
public static String generateProcessName(Element graph) {
if ("BpmnDiagram".equals(graph.getName())) {
- return graph.attributeValue("name");
+ return graph.attributeValue(B2JMessages.Dom_Element_Name);
} else {
String str = generateProcessName(graph.getParent());
if (str == null) {
- return graph.attributeValue("name");
+ return graph.attributeValue(B2JMessages.Dom_Element_Name);
} else {
return str + B2JMessages.Folder_Name_Separator
- + graph.attributeValue("name");
+ + graph.attributeValue(B2JMessages.Dom_Element_Name);
}
}
@@ -42,18 +103,20 @@
public static boolean check_mapElementName(Element graph, Element graphEle) {
boolean isOk = true;
- String name = graph.attributeValue(B2JMessages.Jpdl_Element_Name);
-
+ String name = graph.attributeValue(B2JMessages.Dom_Element_Name);
+
if (name == null || "".equals(name)) {
name = "jboss_autogen";
isOk = false;
}
Integer i = nameMap.get(name);
if (i == null) {
- DomXmlWriter.addAttribute(graphEle,B2JMessages.Jpdl_Element_Name, name);
+ DomXmlWriter.addAttribute(graphEle, B2JMessages.Dom_Element_Name,
+ name);
nameMap.put(name, new Integer("1"));
} else {
- DomXmlWriter.addAttribute(graphEle,B2JMessages.Jpdl_Element_Name, name + "_" + i);
+ DomXmlWriter.addAttribute(graphEle, B2JMessages.Dom_Element_Name,
+ name + "_" + i);
nameMap.put(name, ++i);
isOk = false;
}
@@ -62,4 +125,99 @@
}
+ /*
+ * get the layout element from bpmn_diagram file by id
+ */
+ public static Element getDiagramLayoutElement(String bpmnID,
+ List<Element> eleList) {
+ Element element = null;
+ for (Element ele : eleList) {
+ String str = ele
+ .attributeValue(B2JMessages.Bpmn_Href_Attribute_Name);
+ if (str != null && str.contains(bpmnID)) {
+ element = ele;
+ break;
+ }
+ }
+
+ if (element != null
+ && element.getParent().element(
+ B2JMessages.Gpd_Layout_Element_Name) != null) {
+ return element.getParent().element(
+ B2JMessages.Gpd_Layout_Element_Name);
+ }
+
+ return null;
+ }
+
+ /*
+ * create a graphical jpdl transition
+ */
+ public static Element createTransition(Element parentEle, String name,
+ Element jpdlEle) {
+ Element ele = DomXmlWriter.addElement(parentEle, name);
+ DomXmlWriter.mapAttribute(ele, B2JMessages.Dom_Element_Name, jpdlEle);
+
+ Element label = DomXmlWriter.addElement(ele,
+ B2JMessages.Gpd_Label_Element_Name);
+ TranslateHelper.mapXY(label, "5", "-10");
+ return ele;
+ }
+
+ /*
+ * create graphical jpdl element
+ */
+ private static Element createElement(Element parentEle, String name,
+ String width, String height) {
+ Element ele = DomXmlWriter.addElement(parentEle, name);
+ DomXmlWriter.addAttribute(ele, B2JMessages.Width_Attribute_Name, width);
+ DomXmlWriter.addAttribute(ele, B2JMessages.Height_Attribute_Name, height);
+ return ele;
+ }
+
+ /*
+ * create graphical jpdl node
+ */
+ public static Element createNode(Element rootEle, String name,
+ Element jpdlEle) {
+ Element ele = TranslateHelper.createElement(rootEle, name, "100", "40");
+ DomXmlWriter.mapAttribute(ele, B2JMessages.Dom_Element_Name, jpdlEle);
+ return ele;
+ }
+
+ /*
+ * map bpmn x,y attribute to jpdl graphical element
+ */
+ public static void mapXY(Element pgdEle, String x, String y) {
+ DomXmlWriter.addAttribute(pgdEle, B2JMessages.X_Attribute_Name,
+ x == null ? "0" : x);
+ DomXmlWriter.addAttribute(pgdEle, B2JMessages.Y_Attribute_Name,
+ y == null ? "0" : y);
+
+ }
+
+ /*
+ * get a bpmn element id from a given string by subtract suffix for example
+ * bpmn pool has pools suffix a bpmn loop activity has vertices suffix
+ */
+ public static String getPureBpmnID(String bpmnID, String suffix) {
+ return bpmnID.substring(0, bpmnID.length() - suffix.length());
+ }
+
+ /*
+ * get (x,y) from a graphical element and add increments
+ */
+ public static String[] getXY(Element bpmnGpdEle, int xIncre, int yIncre) {
+ String xy[] = new String[2];
+ xy[0] = String.valueOf(Integer.parseInt(bpmnGpdEle
+ .attributeValue(B2JMessages.X_Attribute_Name) == null ? "0"
+ : bpmnGpdEle.attributeValue(B2JMessages.X_Attribute_Name))
+ + xIncre);
+ xy[1] = String.valueOf(Integer.parseInt(bpmnGpdEle
+ .attributeValue(B2JMessages.Y_Attribute_Name) == null ? "0"
+ : bpmnGpdEle.attributeValue(B2JMessages.Y_Attribute_Name))
+ + yIncre);
+ return xy;
+ }
+
}
Modified: workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/util/B2JUtil.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/util/B2JUtil.java 2008-08-19 23:45:02 UTC (rev 9805)
+++ workspace/grid/org.jboss.tools.bpmn2jpdl/src/org/jboss/tools/b2j/util/B2JUtil.java 2008-08-20 06:47:12 UTC (rev 9806)
@@ -1,10 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.b2j.util;
import java.io.File;
+import java.io.FileInputStream;
import java.io.FileNotFoundException;
-import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
+import java.io.InputStream;
import java.io.PrintWriter;
import javax.xml.parsers.SAXParser;
@@ -12,13 +24,19 @@
import org.dom4j.Document;
import org.dom4j.io.SAXReader;
-import org.jboss.tools.b2j.messages.B2JMessages;
import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
+/**
+ * @author Grid Qian
+ *
+ * this a util class
+ */
public class B2JUtil {
+ /*
+ * create a file
+ */
public static File createFile(String parentFolder, String fileName,
String inputStr) throws IOException {
File child = new File(parentFolder, fileName);
@@ -40,73 +58,68 @@
return child;
}
- public static File[] createJpdlFiles(String parentFolder,
- String bpmnFileName, String[] strForProcessDefs,
- String[] jpdlFileNames) throws IOException {
- File jpdlFolder = B2JUtil.createFile(parentFolder,
- B2JMessages.Jpdl_Suffix, null);
- File diagramFolder = B2JUtil.createFile(jpdlFolder.getAbsolutePath(),
- bpmnFileName, null);
+ /*
+ * get a sax input source
+ */
+ public static InputSource getInputSource(String parentFolder,
+ String fileName) throws FileNotFoundException {
+ return new InputSource(B2JUtil.getInputStream(parentFolder, fileName));
- File[] jpdlFiles = new File[strForProcessDefs.length];
- File processFolder = null;
- int i = 0;
- for (String str : strForProcessDefs) {
- processFolder = B2JUtil.createFile(diagramFolder.getAbsolutePath(),
- jpdlFileNames[i], null);
- jpdlFiles[i] = B2JUtil.createFile(processFolder.getAbsolutePath(),
- B2JMessages.Jpdl_Process_Definition_Name, str);
- i++;
- }
- return jpdlFiles;
}
- public static InputSource getInpuSource(String path, String name)
- throws FileNotFoundException {
- File file = new File(path, name);
- return new InputSource(new FileReader(file));
+ /*
+ * get a input stream
+ */
+ public static InputStream getInputStream(String parentFolder,
+ String fileName) throws FileNotFoundException {
+ File file = new File(parentFolder, fileName);
+ InputStream input = new FileInputStream(file);
+ return input;
}
- public static Document parse(InputSource inputSource) throws Exception {
+ /*
+ * parse a file to a dom document
+ */
+ public static Document parse(String parentFolder, String fileName)
+ throws Exception {
Document document = null;
SAXReader saxReader = createSaxReader();
- document = saxReader.read(inputSource);
+ document = saxReader.read(B2JUtil
+ .getInputSource(parentFolder, fileName));
return document;
}
+ /*
+ * create a sax reader
+ */
public static SAXReader createSaxReader() throws Exception {
XMLReader xmlReader = createXmlReader();
SAXReader saxReader = new SAXReader(xmlReader);
return saxReader;
}
+ /*
+ * create a sax xml reader
+ */
public static XMLReader createXmlReader() throws Exception {
SAXParser saxParser = createSaxParserFactory().newSAXParser();
XMLReader xmlReader = saxParser.getXMLReader();
- try {
- saxParser.setProperty(
- "http://java.sun.com/xml/jaxp/properties/schemaLanguage",
- "http://www.w3.org/2001/XMLSchema");
- } catch (SAXException e) {
- // log.warn(
- // "couldn't set xml parser property 'http://java.sun.com/xml/jaxp/properties/schemaLanguage' to 'http://www.w3.org/2001/XMLSchema'"
- // , e);
- }
+ saxParser.setProperty(
+ "http://java.sun.com/xml/jaxp/properties/schemaLanguage",
+ "http://www.w3.org/2001/XMLSchema");
- try {
- xmlReader.setFeature(
- "http://apache.org/xml/features/validation/dynamic", true);
- } catch (SAXException e) {
- // log.warn(
- // "couldn't set xml parser feature 'http://apache.org/xml/features/validation/dynamic'"
- // , e);
- }
+ xmlReader.setFeature(
+ "http://apache.org/xml/features/validation/dynamic", true);
+
return xmlReader;
}
+ /*
+ * create a sax parser factory
+ */
private static SAXParserFactory createSaxParserFactory() {
SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
saxParserFactory.setValidating(true);
17 years, 8 months
JBoss Tools SVN: r9805 - trunk/documentation/whatsnew/portlet.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-08-19 19:45:02 -0400 (Tue, 19 Aug 2008)
New Revision: 9805
Removed:
trunk/documentation/whatsnew/portlet/portlet-news-1.0.0.alpha1.html
Log:
finishing up new and noteworthy
Deleted: trunk/documentation/whatsnew/portlet/portlet-news-1.0.0.alpha1.html
===================================================================
--- trunk/documentation/whatsnew/portlet/portlet-news-1.0.0.alpha1.html 2008-08-19 23:44:52 UTC (rev 9804)
+++ trunk/documentation/whatsnew/portlet/portlet-news-1.0.0.alpha1.html 2008-08-19 23:45:02 UTC (rev 9805)
@@ -1,136 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Language" content="en-us" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<link rel="stylesheet" href="../whatsnew.css"/>
-<title>JBoss Tools Portlet</title>
-</head>
-<body>
-<h1>JBoss Tools Portlet 3.0.0.alpha1 - New and Noteworthy</h1>
-<p>Last revised August 10, 2008</p>
-
-<table border="0" cellpadding="10" cellspacing="0" width="80%">
- <tr>
- <td colspan="2">
- <hr/>
- <h3>JBoss Tools Portlet</h3>
- <hr/>
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p><b>JBoss Portlet Support</b></p>
- </td>
- <td valign="top">
- <p>
- The JBoss Portlet feature is available as part of JBoss Tools 3.0.0.
- JBoss Tools supports the <a href="http://www.jcp.org/en/jsr/detail?id=168">JSR-168 Portlet Specification (Portlet 1.0)</a>,
- <a href="http://www.jcp.org/en/jsr/detail?id=286">JSR-286
- Portlet Specification (Portlet 2.0)</a> and works
- with <a href="http://www.jboss.org/portletbridge/">PortletBridge</a>
- for supporting Portlets in JSF/Seam applications. To
- enable these features, you need to add the JBoss Portlet
- facet to a new or an existing web project.
- </p>
-
- </td>
- </tr>
- <tr>
- <td colspan="2"><hr />
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p><b>JBoss Portlet facet</b></p>
- </td>
- <td valign="top">
- <p>
- The JBoss Portlet feature provides the Java, JSF and Seam Portlet facets.</p>
- <p><img src="images/portletnews1.png" alt="The JBoss Portlet Facet" /></p>
-
- </td>
- </tr>
- <tr>
- <td colspan="2"><hr />
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p><b>Java Portlet</b></p>
- </td>
- <td width="70%" valign="top">
- <p>
- This wizard enables creating a JSR-186/JSR-286 compliant portlet. </p>
- <p><img src="images/portletnews2.png" alt="The JBoss Portlet Wizard" /></p>
- <p><img src="images/portletnews3.png" alt="The JBoss Portlet Wizard" /></p>
- <p><img src="images/portletnews4.png" alt="The JBoss Portlet Wizard" /></p>
- <p><img src="images/portletnews5.png" alt="The JBoss Portlet Wizard" /></p>
- <p>
- You can optionally configure JBoss portal specific deployment descriptors.</p>
- <p><img src="images/portletnews6.png" alt="The JBoss Portlet Wizard" /></p>
-
- </td>
- </tr>
- <tr>
- <td colspan="2"><hr />
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p><b>JSF/Seam Portlet</b></p>
- </td>
- <td width="70%" valign="top">
- <p>
- The JSF and Seam Portlet wizards create a JSF/Seam portlet that uses <a href="http://www.jboss.org/portletbridge/">JBoss Portlet Bridge</a>
- </p>
- <p><img src="images/portletnews7.png" alt="The JBoss Portlet Wizard" /></p>
- <p><img src="images/portletnews8.png" alt="The JBoss Portlet Wizard" /></p>
- <p><img src="images/portletnews9.png" alt="The JBoss Portlet Wizard" /></p>
-
- </td>
- </tr>
- <tr>
- <td colspan="2"><hr />
- </td>
- </tr>
- <tr>
- <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>Deployment</b></td>
- <td valign="top">
- <p>
- You can deploy portlet projects to <a href="http://www.jboss.org/jbossportal/">JBoss Portal</a> as any other web project.
-
- </p>
- </td>
- </tr>
- <tr>
- <td colspan="2"><hr />
- </td>
- </tr>
-
-<tr>
- <td valign="top" align="left"><a name="itemname4" id="itemname4"></a><b></b></td>
- <td valign="top">
- <p>
- More detail is available at
- <a href="https://jira.jboss.org/jira/browse/JBIDE-2233">JBIDE-2233</a>,
- <a href="https://jira.jboss.org/jira/browse/JBIDE-2234">JBIDE-2234</a> and
- <a href="https://jira.jboss.org/jira/browse/JBIDE-2574">JBIDE-2574</a>.
- </p>
- </td>
- </tr>
- <tr>
- <td colspan="2"><hr />
- </td>
- </tr>
-
-
-</table>
-
-</body>
-
-</html>
-
-
17 years, 8 months
JBoss Tools SVN: r9804 - trunk/documentation/whatsnew/birt.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-08-19 19:44:52 -0400 (Tue, 19 Aug 2008)
New Revision: 9804
Removed:
trunk/documentation/whatsnew/birt/birt-news-1.0.0.alpha1.html
Log:
finishing up new and noteworthy
Deleted: trunk/documentation/whatsnew/birt/birt-news-1.0.0.alpha1.html
===================================================================
--- trunk/documentation/whatsnew/birt/birt-news-1.0.0.alpha1.html 2008-08-19 23:43:10 UTC (rev 9803)
+++ trunk/documentation/whatsnew/birt/birt-news-1.0.0.alpha1.html 2008-08-19 23:44:52 UTC (rev 9804)
@@ -1,138 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Language" content="en-us" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<link rel="stylesheet" href="../whatsnew.css"/>
-<title>JBoss BIRT Integration</title>
-</head>
-<body>
-<h1>JBoss BIRT Integration 3.0.0.alpha1 - New and Noteworthy</h1>
-<p>Last revised August 8, 2008</p>
-
-<table border="0" cellpadding="10" cellspacing="0" width="80%">
- <tr>
- <td colspan="2">
- <hr/>
- <h3>JBoss BIRT Integration</h3>
- <hr/>
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p><b>Hibernate Data Source</b></p>
- </td>
- <td valign="top">
- <p>
- The Hibernate Data Source enables a user to specify a Hibernate Configuration or JNDI URL.
- </p>
- <p>
- <img src="images/HbDataSource1.png" alt="The Hibernate Data Source" />
- </p>
- <p>
- <img src="images/HbDataSource2.png" alt="The Hibernate Data Source" />
- </p>
- </td>
- </tr>
- <tr>
- <td colspan="2"><hr />
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p><b>Hibernate Data Set</b></p>
- </td>
- <td valign="top">
- <p>
- When the Hibernate Data Source is set up, the user can create a Hibernate Data Set
- using a HQL query in the way in which the JDBC driver creates a SQL query.
- </p>
- <p><img src="images/HbDataSet.png" alt="The Hibernate Data Set" /></p>
-
- </td>
- </tr>
- <tr>
- <td colspan="2"><hr />
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p><b>Integration with Seam</b></p>
- </td>
- <td width="70%" valign="top">
- <p>
- The JBoss BIRT Integration feature contains the "birt" tag that allows the user to add a BIRT report to an .xhtml file.
- </p>
-
- <p><img src="images/birttag1.png" alt="JBoss Test Report" /> </p>
-
- </td>
- </tr>
- <tr>
- <td colspan="2"><hr />
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p><b>Deployment</b></p>
- </td>
- <td valign="top">
- <p>
- A Seam project that includes the BIRT facet can be deployed as any project.
- If you define the Hibernate ODA driver, the JBoss BIRT engine will use JNDI URL
- that has to be bind to either Hibernate Session Factory or Hibernate Entity Manager Factory.
- </p>
-
-<p>Any Seam project with the BIRT facet that
-uses the Hibernate ODA driver has to bind a Hibernate session factory
-or an Hibernate entity manager factory. It doesn't matter which of
-these two factories the user binds because the Hibernate ODA driver
-will recognize the type of the object.</p>
-
-<p>
-When creating a Seam EAR project, Hibernate Entity Manager Factory is
-bound to java:/{projectName}EntityManagerFactory. All the user needs
-to do is using the Hibernate Configuration created automatically. The
-user can use default values for the Hibernate Configuration and JNDI
-URL within the BIRT Hibernate Data Source.</p>
-
-<p>
-When using a Seam WAR project, neither HSF nor HEMF aren't binded to JNDI by default.
-The user has to do this manually.
-For instance,
-HSF can be bound to JNDI adding the following property to the persistence.xml file:</p>
-
-<code><property name="hibernate.session_factory_name" value="java:/projectname"/></code>
-
-<p>the user can use 'java:/projectname' as the JNDI URL property when creating a BIRT Hibernate Data Source.</p>
-
- </td>
- </tr>
- <tr>
- <td colspan="2"><hr />
- </td>
- </tr>
-
-<tr>
- <td valign="top" align="left">
- </td>
- <td valign="top"> <p>
- For more details, see <a href="https://jira.jboss.org/jira/browse/JBIDE-2220">JBIDE-2220</a>.
- </p>
- </td>
- </tr>
- <tr>
- <td colspan="2"><hr />
- </td>
- </tr>
-
-
-</table>
-
-</body>
-
-</html>
-
-
17 years, 8 months
JBoss Tools SVN: r9803 - in trunk/documentation/whatsnew: birt and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-08-19 19:43:10 -0400 (Tue, 19 Aug 2008)
New Revision: 9803
Added:
trunk/documentation/whatsnew/birt/images/examplereport.png
trunk/documentation/whatsnew/images/archivescustomvariablesupport.png
trunk/documentation/whatsnew/images/projectarchivesinprojextexplorer.png
Removed:
trunk/documentation/whatsnew/ws/ws-news-1.0.0.alpha1.html
Modified:
trunk/documentation/whatsnew/as/as-news-2.0.0.Alpha1.html
trunk/documentation/whatsnew/birt/birt-news-1.0.0.Alpha1.html
trunk/documentation/whatsnew/core/core-news-3.0.0.Alpha1.html
trunk/documentation/whatsnew/hibernate/hibernate-news-3.2.4.Alpha1.html
trunk/documentation/whatsnew/portlet/portlet-news-1.0.0.Alpha1.html
trunk/documentation/whatsnew/seam/seam-news-2.0.0.Alpha1.html
trunk/documentation/whatsnew/vpe/vpe-news-3.0.0.Alpha1.html
Log:
finishing up new and noteworthy
Modified: trunk/documentation/whatsnew/as/as-news-2.0.0.Alpha1.html
===================================================================
--- trunk/documentation/whatsnew/as/as-news-2.0.0.Alpha1.html 2008-08-19 20:39:49 UTC (rev 9802)
+++ trunk/documentation/whatsnew/as/as-news-2.0.0.Alpha1.html 2008-08-19 23:43:10 UTC (rev 9803)
@@ -9,7 +9,7 @@
<h1>JBoss AS Tools 2.0.0.Alpha1 - New and Noteworthy</h1>
-<p align="right"><a href="../index.html">< Main Index</a> <a href="../seam/seam-news-1.1.0.beta1.html">Seam Tools News ></a></p>
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../portlet/portlet-news-1.0.0.Alpha1.html">Portlet Tools News ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
<tr>
Modified: trunk/documentation/whatsnew/birt/birt-news-1.0.0.Alpha1.html
===================================================================
--- trunk/documentation/whatsnew/birt/birt-news-1.0.0.Alpha1.html 2008-08-19 20:39:49 UTC (rev 9802)
+++ trunk/documentation/whatsnew/birt/birt-news-1.0.0.Alpha1.html 2008-08-19 23:43:10 UTC (rev 9803)
@@ -9,9 +9,9 @@
<title>JBoss BIRT Integration</title>
</head>
<body>
-<h1>JBoss BIRT Integration 3.0.0.alpha1 - New and Noteworthy</h1>
-<p>Last revised August 8, 2008</p>
+<h1>JBoss BIRT Integration 1.0.0.alpha1 - New and Noteworthy</h1>
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../vpe/vpe-news-3.0.0.Alpha1.html">Visual Page Editor News ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
<tr>
<td colspan="2">
@@ -79,6 +79,12 @@
<p><b>Deployment</b></p>
</td>
<td valign="top">
+
+<p>Basic understanding on BIRT is required to use the integration, see <a href="http://www.eclipse.org/birt/phoenix/">BIRT homepage</a> for details.</p>
+<p>Below we describe the current needed configuration - these might change before GA.</p>
+<p>In any case when configured correctly you will be able to view/render the designed reports in your Seam (or any other Web application)</p>
+<p><img src="images/examplereport.png"/></p>
+
<p>
A Seam project that includes the BIRT facet can be deployed as any project.
If you define the Hibernate ODA driver, the JBoss BIRT engine will use JNDI URL
@@ -108,6 +114,7 @@
<p>the user can use 'java:/projectname' as the JNDI URL property when creating a BIRT Hibernate Data Source.</p>
+
</td>
</tr>
<tr>
Added: trunk/documentation/whatsnew/birt/images/examplereport.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/birt/images/examplereport.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/whatsnew/core/core-news-3.0.0.Alpha1.html
===================================================================
--- trunk/documentation/whatsnew/core/core-news-3.0.0.Alpha1.html 2008-08-19 20:39:49 UTC (rev 9802)
+++ trunk/documentation/whatsnew/core/core-news-3.0.0.Alpha1.html 2008-08-19 23:43:10 UTC (rev 9803)
@@ -11,7 +11,7 @@
<body>
<h1>Core 3.0.0.Alpha1 What's New</h1>
-<p align="right"><a href="../index.html">< Main Index</a> <a href="../vpe/vpe-news-2.1.0.CR1.html">Visual Page Editor News ></a></p>
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../seam/seam-news-2.0.0.Alpha1.html">Seam News ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
@@ -39,7 +39,7 @@
</tr>
<tr>
<td valign="top" align="right">
- <a name="itemname3" id="itemname3"></a><b>Relative paths</b>
+ <a name="itemname3" id="itemname3"></a><b>Common Navigator Views</b>
</td>
<td valign="top">
@@ -48,6 +48,8 @@
archive view, but also makes "Project Archives" node available in
Project Explorer for even easier access.</p>
+ <p><img src="../images/projectarchivesinprojextexplorer.png"/></p>
+
</tr>
<tr>
<td colspan="2"><hr />
@@ -55,12 +57,22 @@
</tr>
<tr>
<td valign="top" align="right">
- <a name="itemname3" id="itemname3"></a><b>Variable support</b>
+ <a name="itemname3" id="itemname3"></a><b>Variable and relative path support</b>
</td>
<td valign="top">
-<p>Archives can now use Eclipse variables to specify destination paths.</p>
+ <p>Archives can now use Eclipse variables to specify destination paths and paths are now relative to the location of the .packages file.</p>
+ <p>These two features allow teams to more easily share .packages files because it allows for more flexibile/dynamic archive specification</p>
+
+<p>Example 1: Because we no longer require absolute paths including the project name you can now have /projectA-1.0 and /projectA-2.3 and not having to change the .packages file to reflect the change in version numbers. Instead of using /projectA-1.0 or /projectA-2.3 as path you just use "" (blank) or ".".</p>
+
+<p>Example 2: By using Eclipse variables you can setup a system specific location but just refer to it via an eclipse variable. e.g. the following screenshots shows how usage of a custom defined variable (${hudson_loc}).</p>
+
+<img src="../images/archivescustomvariablesupport.png"/>
+
+<p>Variables can be selected and configured via the "Variables" button.</p>
+
</tr>
<tr>
<td colspan="2"><hr />
@@ -72,17 +84,34 @@
</td>
<td valign="top">
-<p>The Archives view is now implemented with the
+<p>The Project Archives view is now implemented with the
"Common Navigator" API which allow us to have a more customizable
archive view, but also makes "Project Archives" node available in
Project Explorer for even easier access.</p>
+ <p><img src="../images/projectarchivesinprojextexplorer.png"/></p>
+
+<p>Note: this feature is only available on Project Archives created with this version. See below.</p>
</tr>
<tr>
<td colspan="2"><hr />
</td>
</tr>
+ <tr>
+ <td valign="top" align="right">
+ <a name="itemname3" id="itemname3"></a><b>New .packages format</b>
+ </td>
+ <td valign="top">
+ <p>To accomdate the new features the .packages file format has
+ changed slightly. Old files will still work, but new ones will
+ have version="1.2" in the first element and should not be used
+ with old JBoss Tools versions.</p>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
</table>
Modified: trunk/documentation/whatsnew/hibernate/hibernate-news-3.2.4.Alpha1.html
===================================================================
--- trunk/documentation/whatsnew/hibernate/hibernate-news-3.2.4.Alpha1.html 2008-08-19 20:39:49 UTC (rev 9802)
+++ trunk/documentation/whatsnew/hibernate/hibernate-news-3.2.4.Alpha1.html 2008-08-19 23:43:10 UTC (rev 9803)
@@ -9,9 +9,9 @@
<title>Hibernate tools 3.2.4.Alpha1 What's New</title>
</head>
<body>
-<h1>Hibernate tools 3.2.4.Beta1 What's New</h1>
+<h1>Hibernate tools 3.2.4.Alpha1 What's New</h1>
-<p align="right"><a href="../index.html">< Main Index</a> <a href="../vpe/vpe-news-2.1.0.beta1.html">Visual Page Editor News ></a></p>
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../as/as-news-2.0.0.Alpha1.html">JBoss AS Tools News ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
Added: trunk/documentation/whatsnew/images/archivescustomvariablesupport.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/archivescustomvariablesupport.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/projectarchivesinprojextexplorer.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/projectarchivesinprojextexplorer.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/whatsnew/portlet/portlet-news-1.0.0.Alpha1.html
===================================================================
--- trunk/documentation/whatsnew/portlet/portlet-news-1.0.0.Alpha1.html 2008-08-19 20:39:49 UTC (rev 9802)
+++ trunk/documentation/whatsnew/portlet/portlet-news-1.0.0.Alpha1.html 2008-08-19 23:43:10 UTC (rev 9803)
@@ -12,6 +12,8 @@
<h1>JBoss Tools Portlet 3.0.0.alpha1 - New and Noteworthy</h1>
<p>Last revised August 10, 2008</p>
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../ws/ws-news-1.0.0.Alpha1.html">Web Services News ></a></p>
+
<table border="0" cellpadding="10" cellspacing="0" width="80%">
<tr>
<td colspan="2">
Modified: trunk/documentation/whatsnew/seam/seam-news-2.0.0.Alpha1.html
===================================================================
--- trunk/documentation/whatsnew/seam/seam-news-2.0.0.Alpha1.html 2008-08-19 20:39:49 UTC (rev 9802)
+++ trunk/documentation/whatsnew/seam/seam-news-2.0.0.Alpha1.html 2008-08-19 23:43:10 UTC (rev 9803)
@@ -11,7 +11,7 @@
<body>
<h1>Seam tools 2.0.0.Alpha1 What's New</h1>
-<p align="right"><a href="../index.html">< Main Index</a> <a href="../vpe/vpe-news-2.1.0.CR1.html">Visual Page Editor News ></a></p>
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../hibernate/hibernate-news-3.2.4.Alpha1.html">Hibernate News ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
Modified: trunk/documentation/whatsnew/vpe/vpe-news-3.0.0.Alpha1.html
===================================================================
--- trunk/documentation/whatsnew/vpe/vpe-news-3.0.0.Alpha1.html 2008-08-19 20:39:49 UTC (rev 9802)
+++ trunk/documentation/whatsnew/vpe/vpe-news-3.0.0.Alpha1.html 2008-08-19 23:43:10 UTC (rev 9803)
@@ -11,6 +11,8 @@
<body>
<h1>What's New Visual Page Editor</h1>
<p>Last revised August 8, 2008</p>
+
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../core/core-news-3.0.0.Alpha1.html">Core News ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
<tr>
<td colspan="2">
Deleted: trunk/documentation/whatsnew/ws/ws-news-1.0.0.alpha1.html
===================================================================
--- trunk/documentation/whatsnew/ws/ws-news-1.0.0.alpha1.html 2008-08-19 20:39:49 UTC (rev 9802)
+++ trunk/documentation/whatsnew/ws/ws-news-1.0.0.alpha1.html 2008-08-19 23:43:10 UTC (rev 9803)
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Language" content="en-us" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<link rel="stylesheet" href="../whatsnew.css"/>
-<title>Web Services 1.0.0.Alpha What's New</title>
-</head>
-<body>
-<h1>Web Services 1.0.0.Alpha What's New</h1>
-
-<p align="right"><a href="../index.html">< Main Index</a> <a href="../vpe/vpe-news-2.0.0.cr1.html">Visual Page Editor News ></a></p>
-<table border="0" cellpadding="10" cellspacing="0" width="80%">
- <tr>
- <td colspan="2">
- <hr/>
- <h3>General</h3>
- <hr/>
- </td>
- </tr>
- <tr>
- <td valign="top" align="right">
- <a name="itemname3" id="itemname3"></a><b>JBossWS WTP Support</b>
- </td>
- <td valign="top">JBossWS support have been added, meaning you can now use WTP WebServices support with JBossWS.
- <p><img src="../images/jbossws_facet.png"/></p>
- </td>
-
- </tr>
- <tr>
- <td colspan="2"><hr />
- </td>
- </tr>
- <tr>
- <td valign="top" align="right">
- <a name="itemname3" id="itemname3"></a><b>Wizards</b>
- </td>
- <td valign="top">JBossWS WTP support integrates into the existing WebServices wizards (Web Service and Web Service Client) in Eclipse. See the JBossWS tools documentation for details
- <p><img src="../images/webservice_client_wizard.png"/></p>
- </td>
-
- </tr>
-
-</table>
-
-</body>
-
-</html>
-
-
17 years, 8 months
JBoss Tools SVN: r9802 - in trunk/documentation/whatsnew: birt and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-08-19 16:39:49 -0400 (Tue, 19 Aug 2008)
New Revision: 9802
Added:
trunk/documentation/whatsnew/birt/birt-news-1.0.0.Alpha1.html
trunk/documentation/whatsnew/portlet/portlet-news-1.0.0.Alpha1.html
trunk/documentation/whatsnew/ws/ws-news-1.0.0.Alpha1.html
Modified:
trunk/documentation/whatsnew/index.html
Log:
fixing mixed casing of filenames.
Added: trunk/documentation/whatsnew/birt/birt-news-1.0.0.Alpha1.html
===================================================================
--- trunk/documentation/whatsnew/birt/birt-news-1.0.0.Alpha1.html (rev 0)
+++ trunk/documentation/whatsnew/birt/birt-news-1.0.0.Alpha1.html 2008-08-19 20:39:49 UTC (rev 9802)
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css"/>
+<title>JBoss BIRT Integration</title>
+</head>
+<body>
+<h1>JBoss BIRT Integration 3.0.0.alpha1 - New and Noteworthy</h1>
+<p>Last revised August 8, 2008</p>
+
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+ <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>JBoss BIRT Integration</h3>
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p><b>Hibernate Data Source</b></p>
+ </td>
+ <td valign="top">
+ <p>
+ The Hibernate Data Source enables a user to specify a Hibernate Configuration or JNDI URL.
+ </p>
+ <p>
+ <img src="images/HbDataSource1.png" alt="The Hibernate Data Source" />
+ </p>
+ <p>
+ <img src="images/HbDataSource2.png" alt="The Hibernate Data Source" />
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p><b>Hibernate Data Set</b></p>
+ </td>
+ <td valign="top">
+ <p>
+ When the Hibernate Data Source is set up, the user can create a Hibernate Data Set
+ using a HQL query in the way in which the JDBC driver creates a SQL query.
+ </p>
+ <p><img src="images/HbDataSet.png" alt="The Hibernate Data Set" /></p>
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p><b>Integration with Seam</b></p>
+ </td>
+ <td width="70%" valign="top">
+ <p>
+ The JBoss BIRT Integration feature contains the "birt" tag that allows the user to add a BIRT report to an .xhtml file.
+ </p>
+
+ <p><img src="images/birttag1.png" alt="JBoss Test Report" /> </p>
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p><b>Deployment</b></p>
+ </td>
+ <td valign="top">
+ <p>
+ A Seam project that includes the BIRT facet can be deployed as any project.
+ If you define the Hibernate ODA driver, the JBoss BIRT engine will use JNDI URL
+ that has to be bind to either Hibernate Session Factory or Hibernate Entity Manager Factory.
+ </p>
+
+<p>Any Seam project with the BIRT facet that
+uses the Hibernate ODA driver has to bind a Hibernate session factory
+or an Hibernate entity manager factory. It doesn't matter which of
+these two factories the user binds because the Hibernate ODA driver
+will recognize the type of the object.</p>
+
+<p>
+When creating a Seam EAR project, Hibernate Entity Manager Factory is
+bound to java:/{projectName}EntityManagerFactory. All the user needs
+to do is using the Hibernate Configuration created automatically. The
+user can use default values for the Hibernate Configuration and JNDI
+URL within the BIRT Hibernate Data Source.</p>
+
+<p>
+When using a Seam WAR project, neither HSF nor HEMF aren't binded to JNDI by default.
+The user has to do this manually.
+For instance,
+HSF can be bound to JNDI adding the following property to the persistence.xml file:</p>
+
+<code><property name="hibernate.session_factory_name" value="java:/projectname"/></code>
+
+<p>the user can use 'java:/projectname' as the JNDI URL property when creating a BIRT Hibernate Data Source.</p>
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+
+<tr>
+ <td valign="top" align="left">
+ </td>
+ <td valign="top"> <p>
+ For more details, see <a href="https://jira.jboss.org/jira/browse/JBIDE-2220">JBIDE-2220</a>.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+
+
+</table>
+
+</body>
+
+</html>
+
+
Modified: trunk/documentation/whatsnew/index.html
===================================================================
--- trunk/documentation/whatsnew/index.html 2008-08-19 19:57:00 UTC (rev 9801)
+++ trunk/documentation/whatsnew/index.html 2008-08-19 20:39:49 UTC (rev 9802)
@@ -23,14 +23,14 @@
<td valign="top" align="left">
<p align="right"><b>3.0.0.Alpha1</b>
<td valign="top">
- <p><a href="core/core-news-3.0.0.alpha1.html">Core/General</a></p>
+ <p><a href="core/core-news-3.0.0.Alpha1.html">Core/General</a></p>
<p><a href="seam/seam-news-2.0.0.Alpha1.html">Seam Tools</a></p>
<p><a href="hibernate/hibernate-news-3.2.4.Alpha1.html">Hibernate Tools</a></p>
<p><a href="as/as-news-2.0.0.Alpha1.html">JBoss AS Tools</a></p>
- <p><a href="portlet/portlet-news-1.0.0.alpha1.html">Portal Tools</a></p>
+ <p><a href="portlet/portlet-news-1.0.0.Alpha1.html">Portal Tools</a></p>
- <p><a href="ws/ws-news-1.0.0.alpha1.html">Web Services</a></p>
- <p><a href="birt/birt-news-1.0.0.alpha1.html">Birt Tools</a></p>
+ <p><a href="ws/ws-news-1.0.0.Alpha1.html">Web Services</a></p>
+ <p><a href="birt/birt-news-1.0.0.Alpha1.html">Birt Tools</a></p>
<p><a href="vpe/vpe-news-3.0.0.Alpha1.html">Visual Page Editor</a></p>
Added: trunk/documentation/whatsnew/portlet/portlet-news-1.0.0.Alpha1.html
===================================================================
--- trunk/documentation/whatsnew/portlet/portlet-news-1.0.0.Alpha1.html (rev 0)
+++ trunk/documentation/whatsnew/portlet/portlet-news-1.0.0.Alpha1.html 2008-08-19 20:39:49 UTC (rev 9802)
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css"/>
+<title>JBoss Tools Portlet</title>
+</head>
+<body>
+<h1>JBoss Tools Portlet 3.0.0.alpha1 - New and Noteworthy</h1>
+<p>Last revised August 10, 2008</p>
+
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+ <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>JBoss Tools Portlet</h3>
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p><b>JBoss Portlet Support</b></p>
+ </td>
+ <td valign="top">
+ <p>
+ The JBoss Portlet feature is available as part of JBoss Tools 3.0.0.
+ JBoss Tools supports the <a href="http://www.jcp.org/en/jsr/detail?id=168">JSR-168 Portlet Specification (Portlet 1.0)</a>,
+ <a href="http://www.jcp.org/en/jsr/detail?id=286">JSR-286
+ Portlet Specification (Portlet 2.0)</a> and works
+ with <a href="http://www.jboss.org/portletbridge/">PortletBridge</a>
+ for supporting Portlets in JSF/Seam applications. To
+ enable these features, you need to add the JBoss Portlet
+ facet to a new or an existing web project.
+ </p>
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p><b>JBoss Portlet facet</b></p>
+ </td>
+ <td valign="top">
+ <p>
+ The JBoss Portlet feature provides the Java, JSF and Seam Portlet facets.</p>
+ <p><img src="images/portletnews1.png" alt="The JBoss Portlet Facet" /></p>
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p><b>Java Portlet</b></p>
+ </td>
+ <td width="70%" valign="top">
+ <p>
+ This wizard enables creating a JSR-186/JSR-286 compliant portlet. </p>
+ <p><img src="images/portletnews2.png" alt="The JBoss Portlet Wizard" /></p>
+ <p><img src="images/portletnews3.png" alt="The JBoss Portlet Wizard" /></p>
+ <p><img src="images/portletnews4.png" alt="The JBoss Portlet Wizard" /></p>
+ <p><img src="images/portletnews5.png" alt="The JBoss Portlet Wizard" /></p>
+ <p>
+ You can optionally configure JBoss portal specific deployment descriptors.</p>
+ <p><img src="images/portletnews6.png" alt="The JBoss Portlet Wizard" /></p>
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p><b>JSF/Seam Portlet</b></p>
+ </td>
+ <td width="70%" valign="top">
+ <p>
+ The JSF and Seam Portlet wizards create a JSF/Seam portlet that uses <a href="http://www.jboss.org/portletbridge/">JBoss Portlet Bridge</a>
+ </p>
+ <p><img src="images/portletnews7.png" alt="The JBoss Portlet Wizard" /></p>
+ <p><img src="images/portletnews8.png" alt="The JBoss Portlet Wizard" /></p>
+ <p><img src="images/portletnews9.png" alt="The JBoss Portlet Wizard" /></p>
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>Deployment</b></td>
+ <td valign="top">
+ <p>
+ You can deploy portlet projects to <a href="http://www.jboss.org/jbossportal/">JBoss Portal</a> as any other web project.
+
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+
+<tr>
+ <td valign="top" align="left"><a name="itemname4" id="itemname4"></a><b></b></td>
+ <td valign="top">
+ <p>
+ More detail is available at
+ <a href="https://jira.jboss.org/jira/browse/JBIDE-2233">JBIDE-2233</a>,
+ <a href="https://jira.jboss.org/jira/browse/JBIDE-2234">JBIDE-2234</a> and
+ <a href="https://jira.jboss.org/jira/browse/JBIDE-2574">JBIDE-2574</a>.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+
+
+</table>
+
+</body>
+
+</html>
+
+
Added: trunk/documentation/whatsnew/ws/ws-news-1.0.0.Alpha1.html
===================================================================
--- trunk/documentation/whatsnew/ws/ws-news-1.0.0.Alpha1.html (rev 0)
+++ trunk/documentation/whatsnew/ws/ws-news-1.0.0.Alpha1.html 2008-08-19 20:39:49 UTC (rev 9802)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css"/>
+<title>Web Services 1.0.0.Alpha What's New</title>
+</head>
+<body>
+<h1>Web Services 1.0.0.Alpha What's New</h1>
+
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../vpe/vpe-news-2.0.0.cr1.html">Visual Page Editor News ></a></p>
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+ <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>General</h3>
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right">
+ <a name="itemname3" id="itemname3"></a><b>JBossWS WTP Support</b>
+ </td>
+ <td valign="top">JBossWS support have been added, meaning you can now use WTP WebServices support with JBossWS.
+ <p><img src="../images/jbossws_facet.png"/></p>
+ </td>
+
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right">
+ <a name="itemname3" id="itemname3"></a><b>Wizards</b>
+ </td>
+ <td valign="top">JBossWS WTP support integrates into the existing WebServices wizards (Web Service and Web Service Client) in Eclipse. See the JBossWS tools documentation for details
+ <p><img src="../images/webservice_client_wizard.png"/></p>
+ </td>
+
+ </tr>
+
+</table>
+
+</body>
+
+</html>
+
+
17 years, 8 months