Author: scabanovich
Date: 2009-11-17 09:41:29 -0500 (Tue, 17 Nov 2009)
New Revision: 18711
Added:
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/handlers/OpenESBResourceHandler.java
Removed:
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/handlers/OpenSmooksConfigHandler.java
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/plugin.xml
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb12.meta
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBConstants.java
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBLoaderUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5199
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/plugin.xml 2009-11-16 22:50:05 UTC (rev
18710)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/plugin.xml 2009-11-17 14:41:29 UTC (rev
18711)
@@ -35,8 +35,8 @@
class="org.jboss.tools.esb.core.model.handlers.AddProviderSupport"/>
<xclass
id="org.jboss.tools.esb.core.model.handlers.AddGenericActionSupport"
class="org.jboss.tools.esb.core.model.handlers.AddGenericActionSupport"/>
- <xclass
id="org.jboss.tools.esb.core.model.handlers.OpenSmooksConfigHandler"
- class="org.jboss.tools.esb.core.model.handlers.OpenSmooksConfigHandler"/>
+ <xclass
id="org.jboss.tools.esb.core.model.handlers.OpenESBResourceHandler"
+ class="org.jboss.tools.esb.core.model.handlers.OpenESBResourceHandler"/>
</extension>
@@ -55,6 +55,9 @@
name="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/...
uri="platform:/plugin/org.jboss.tools.esb.core/schemas/jbossesb-1.1.0.xsd"/>
+ <uri
+
name="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/...
+
uri="platform:/plugin/org.jboss.tools.esb.core/schemas/jbossesb-1.2.0.xsd"/>
</catalogContribution>
</extension>
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2009-11-16
22:50:05 UTC (rev 18710)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2009-11-17
14:41:29 UTC (rev 18711)
@@ -778,8 +778,9 @@
</XModelAttributes>
<XActionItem kind="list">
<XActionItem
-
HandlerClassName="org.jboss.tools.esb.core.model.handlers.OpenSmooksConfigHandler"
- ICON="action.empty" PROPERTIES="actionpath=Open"
+
HandlerClassName="org.jboss.tools.esb.core.model.handlers.OpenESBResourceHandler"
+ ICON="action.empty"
+ PROPERTIES="actionpath=Open;attribute=smooks config"
displayName="Open Config" kind="action"
name="OpenConfig"/>
<XActionItem kind="list" name="CreateActions"/>
<XActionItemReference entity="ESBProperty"
name="CopyActions"/>
@@ -1555,4 +1556,43 @@
</XActionItem>
</XActionItem>
</XEntityExtension>
+ <XEntityExtension name="ESBActions120">
+ <XChildrenEntities>
+ <XChildEntity name="ESBPreActionByteArrayToString101"/>
+ <XChildEntity name="ESBPreActionLongToDateConverter101"/>
+ <XChildEntity name="ESBPreActionObjectInvoke101"/>
+ <XChildEntity name="ESBPreActionObjectToCSVString101"/>
+ <XChildEntity name="ESBPreActionObjectToXStream101"/>
+ <XChildEntity name="ESBPreActionSmooksAction101"/>
+ <XChildEntity name="ESBPreActionSmooksTransformer101"/>
+ <XChildEntity name="ESBPreActionMessagePersister101"/>
+ <XChildEntity name="ESBPreActionXStreamToObject101"/>
+ <XChildEntity name="ESBPreActionCommandInterpreter101"/>
+ <XChildEntity name="ESBPreActionGroovyProcessor101"/>
+ <XChildEntity name="ESBPreActionAggregator101"/>
+ <XChildEntity name="ESBPreActionContentBasedRouter101"/>
+ <XChildEntity name="ESBPreActionStaticRouter101"/>
+ <XChildEntity name="ESBPreActionStaticWiretap101"/>
+ <XChildEntity name="ESBPreActionSOAPProcessor101"/>
+ <XChildEntity name="ESBPreActionSOAPClient101"/>
+ <XChildEntity name="ESBPreActionSystemPrintln101"/>
+ <XChildEntity name="ESBPreActionNotifier101"/>
+ <XChildEntity name="ESBPreActionBusinessRulesProcessor101"/>
+ </XChildrenEntities>
+ <XActionItem kind="list">
+ <XActionItem ICON="action.empty" displayName="New"
group="1"
+ kind="list" name="CreateActions">
+ <XActionItem displayName="Add Pre-Packed Action" kind="list"
name="PrePackedAction">
+ <XActionItemReference entity="ESBActions101"
name="AddObjectInvoke"/>
+ <XActionItemReference entity="ESBActions101"
name="Converters"/>
+ <XActionItemReference entity="ESBActions101"
name="AddCommandInterpreter"/>
+ <XActionItemReference entity="ESBActions101"
name="AddGroovyProcessor"/>
+ <XActionItemReference entity="ESBActions101"
name="Routers"/>
+ <XActionItemReference entity="ESBActions101"
name="SOAP"/>
+ <XActionItemReference entity="ESBActions101"
name="AddSystemPrintln"/>
+ <XActionItemReference entity="ESBActions101"
name="AddBusinessRulesProcessor"/>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ </XEntityExtension>
</XModelEntityGroup>
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb12.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb12.meta 2009-11-16
22:50:05 UTC (rev 18710)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb12.meta 2009-11-17
14:41:29 UTC (rev 18711)
@@ -126,6 +126,166 @@
</XActionItem>
<XDependencies/>
</XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData"
+ XMLSUBPATH="role" name="ESBAllowedRole120">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.esb.action" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="role" loader="ElementType"
name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general;id=true;save=always"
+ name="name" xmlname="name"/>
+ <XModelAttribute TRIM="no" name="comment"
visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions"/>
+ <XActionItem ICON="action.empty" displayName="Create"
kind="list" name="EditActions"/>
+ <XActionItemReference entity="ESBProperty"
name="CopyActions"/>
+ <XActionItemReference entity="ESBProperty"
name="DeleteActions"/>
+ <XActionItemReference entity="ESBProperty"
name="Properties"/>
+ <XActionItemReference entity="ESBProperty"
name="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;saveDefault=false"
+ XMLSUBPATH="allowed-roles" name="ESBAllowedRoles120">
+ <XChildrenEntities>
+ <XChildEntity name="ESBAllowedRole120"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.esb.providers" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="allowed roles" loader="ElementType"
name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general;id=true"
+ default="Allowed Roles" name="name"
visibility="false">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute TRIM="no" name="comment"
visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem displayName="New" group="1" kind="list"
name="CreateActions">
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Role..." kind="action"
name="AddRole">
+ <EntityData EntityName="ESBAllowedRole120">
+ <AttributeData AttributeName="name"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItemReference entity="ESBProviders101"
name="DeleteActions" path="DeleteActions"/>
+ <XActionItemReference entity="ESBProperty"
name="Properties"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;saveDefault=false"
+ XMLSUBPATH="asyncResponse" name="ESBAsyncResponse120">
+ <XChildrenEntities>
+ <XChildEntity name="ESBPayload120"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.esb.providers" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="async response" loader="ElementType"
name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general;id=true"
+ default="Async Response" name="name"
visibility="false">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="status
code" xmlname="statusCode"/>
+ <XModelAttribute TRIM="no" name="comment"
visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem displayName="New" group="1" kind="list"
name="CreateActions">
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Payload..." kind="action"
name="AddPayload">
+ <EntityData EntityName="ESBPayload120">
+ <AttributeData AttributeName="classpath resource"/>
+ <AttributeData AttributeName="content type"/>
+ <AttributeData AttributeName="character encoding"
Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItemReference entity="ESBProviders101"
name="DeleteActions" path="DeleteActions"/>
+ <XActionItemReference entity="ESBProperty"
name="Properties"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;saveDefault=false"
+ XMLSUBPATH="exception" name="ESBException120">
+ <XChildrenEntities>
+ <XChildEntity name="ESBMapping120"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.esb.providers" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="exception" loader="ElementType"
name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general;id=true"
+ default="Exception" name="name" visibility="false">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="mappings
file" xmlname="mappingsFile">
+ <Constraint loader="Tree">
+ <value name="ESBResourceTree"/>
+ <value name="extensions=properties"/>
+ <value name="linkAction=OpenMapping"/>
+ </Constraint>
+ <Editor name="TreeChooser"/>
+ </XModelAttribute>
+ <XModelAttribute TRIM="no" name="comment"
visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem
+
HandlerClassName="org.jboss.tools.esb.core.model.handlers.OpenESBResourceHandler"
+ ICON="action.empty"
+ PROPERTIES="actionpath=Open;attribute=mappings file"
+ displayName="Open Mapping File" kind="action"
name="OpenMapping"/>
+ <XActionItem displayName="New" group="1" kind="list"
name="CreateActions">
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Mapping..." kind="action"
name="AddMapping">
+ <EntityData EntityName="ESBMapping120">
+ <AttributeData AttributeName="class"/>
+ <AttributeData AttributeName="status"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItemReference entity="ESBProviders101"
name="DeleteActions" path="DeleteActions"/>
+ <XActionItemReference entity="ESBProperty"
name="Properties"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
<XModelEntity ImplementingClass="%ESB%"
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;saveDefault=false"
XMLSUBPATH="globals" name="ESBGlobals120">
@@ -160,6 +320,7 @@
XMLSUBPATH="http-bus" name="ESBHTTPBus120">
<XChildrenEntities>
<XChildEntity name="ESBProperty"/>
+ <XChildEntity maxCount="1" name="ESBAllowedRoles120"
required="yes"/>
</XChildrenEntities>
<XEntityRenderer>
<ICONS>
@@ -172,8 +333,27 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
name="id" xmlname="busid"/>
- <XModelAttribute PROPERTIES="category=general;save=always"
- name="context" xmlname="context"/>
+ <XModelAttribute PROPERTIES="category=general;separator=comma"
+ name="protected methods" xmlname="protected-methods">
+ <Constraint loader="ListString">
+ <value name="GET"/>
+ <value name="POST"/>
+ <value name="PUT"/>
+ <value name="DELETE"/>
+ <value name="HEAD"/>
+ </Constraint>
+ <Editor name="ListAdd"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general"
+ name="transport guarantee" xmlname="transportGuarantee">
+ <Constraint loader="ListString">
+ <value/>
+ <value name="NONE"/>
+ <value name="INTEGRAL"/>
+ <value name="CONFIDENTIAL"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
<XModelAttribute TRIM="no" name="comment"
visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -195,6 +375,8 @@
XMLSUBPATH="http-gateway" name="ESBHTTPGateway120">
<XChildrenEntities>
<XChildEntity name="ESBProperty"/>
+ <XChildEntity maxCount="1" name="ESBException120"
required="yes"/>
+ <XChildEntity maxCount="1" name="ESBAsyncResponse120"
required="yes"/>
</XChildrenEntities>
<XEntityRenderer>
<ICONS>
@@ -202,12 +384,20 @@
</ICONS>
</XEntityRenderer>
<XModelAttributes>
- <XModelAttribute default="http listener" loader="ElementType"
name="element type">
+ <XModelAttribute default="http gateway" loader="ElementType"
name="element type">
<Editor name="Uneditable"/>
</XModelAttribute>
- <XModelAttributeReference
- attributes="name,channel id ref,max threads,is gateway"
+ <XModelAttributeReference attributes="name,channel id ref"
entity="ESBListener101" name="listener"/>
+ <XModelAttribute PROPERTIES="category=general" name="url
pattern" xmlname="urlPattern"/>
+ <XModelAttribute PROPERTIES="category=general" name="payload
as" xmlname="payloadAs">
+ <Constraint loader="ListString">
+ <value/>
+ <value name="STRING"/>
+ <value name="BYTES"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
<XModelAttribute TRIM="no" name="comment"
visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -230,7 +420,8 @@
<XChildrenEntities>
<XChildEntity name="ESBProperty"/>
<XChildEntity name="ESBBus"/>
- <XChildEntity name="ESBHTTPBus110"/>
+ <XChildEntity name="ESBHTTPBus120"/>
+ <XChildEntity maxCount="1" name="ESBException120"
required="yes"/>
</XChildrenEntities>
<XEntityRenderer>
<ICONS>
@@ -243,12 +434,6 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
name="name" xmlname="name"/>
- <XModelAttribute PROPERTIES="category=general;save=always"
- name="host" xmlname="host"/>
- <XModelAttribute PROPERTIES="category=general;save=always"
- name="port" xmlname="port">
- <Constraint loader="%IntEL%"/>
- </XModelAttribute>
<XModelAttribute TRIM="no" name="comment"
visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -260,7 +445,7 @@
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
PROPERTIES="validator.add=true" WizardClassName="%Default%"
displayName="HTTP Bus..." kind="action"
name="AddBus">
- <EntityData EntityName="ESBHTTPBus110">
+ <EntityData EntityName="ESBHTTPBus120">
<AttributeData AttributeName="id"/>
</EntityData>
</XActionItem>
@@ -397,40 +582,54 @@
<XActionItem kind="list">
<XActionItem ICON="action.empty" displayName="New"
group="1"
kind="list" name="CreateActions">
- <XActionItemReference entity="ESBListeners101"
name="AddListener" path="CreateActions/AddListener"/>
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Listener..." kind="action"
name="AddListener">
+ <EntityData EntityName="ESBListener120">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="channel id ref"
Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
<XActionItemReference entity="ESBListeners101"
name="AddScheduledListener"
path="CreateActions/AddScheduledListener"/>
- <XActionItemReference entity="ESBListeners101"
name="AddJCAGateway" path="CreateActions/AddJCAGateway"/>
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="JCA Gateway..." kind="action"
name="AddJCAGateway">
+ <EntityData EntityName="ESBJCAGateway120">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="adapter"/>
+ <AttributeData AttributeName="endpoint class"/>
+ </EntityData>
+ </XActionItem>
<XActionItemReference entity="ESBListeners101"
name="AddJMSListener" path="CreateActions/AddJMSListener"/>
<XActionItemReference entity="ESBListeners101"
name="AddFSListener" path="CreateActions/AddFSListener"/>
<XActionItemReference entity="ESBListeners101"
name="AddFTPListener" path="CreateActions/AddFTPListener"/>
- <XActionItemReference entity="ESBListeners101"
name="AddSQLListener" path="CreateActions/AddSQLListener"/>
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="SQL Listener..." kind="action"
name="AddSQLListener">
+ <EntityData EntityName="ESBSQLListener120">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="channel id ref"
Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
<XActionItemReference entity="ESBListeners101"
name="AddHibernateListener"
path="CreateActions/AddHibernateListener"/>
<XActionItemReference entity="ESBListeners101"
name="AddJBRListener" path="CreateActions/AddJBRListener"/>
<XActionItemReference entity="ESBListeners101"
name="AddGroovyListener"
path="CreateActions/AddGroovyListener"/>
- <XActionItem HIDE="always"
-
HandlerClassName="org.jboss.tools.common.meta.action.impl.handlers.ShowMenuHandler"
- PROPERTIES="actionList=CreateActions" displayName="Listener..."
- kind="action" name="AddAnyListener"/>
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
PROPERTIES="validator.add=true" WizardClassName="%Default%"
- displayName="HTTP Listener..." kind="action"
name="AddHTTPListener">
+ displayName="HTTP Gateway..." kind="action"
name="AddHTTPGateway">
<EntityData EntityName="ESBHTTPGateway120">
<AttributeData AttributeName="name"/>
<AttributeData AttributeName="channel id ref"
Mandatory="no"/>
</EntityData>
</XActionItem>
- <XActionItem HandlerClassName="%Create%" ICON="action.empty"
- PROPERTIES="validator.add=true" WizardClassName="%Default%"
- displayName="UDP Listener..." kind="action"
name="AddUDPListener">
- <EntityData EntityName="ESBUDPListener110">
- <AttributeData AttributeName="name"/>
- <AttributeData AttributeName="host"/>
- <AttributeData AttributeName="port"/>
- </EntityData>
- </XActionItem>
+ <XActionItemReference entity="ESBListeners110"
name="AddUDPListener" path="CreateActions/AddUDPListener"/>
+ <XActionItem HIDE="always"
+
HandlerClassName="org.jboss.tools.common.meta.action.impl.handlers.ShowMenuHandler"
+ PROPERTIES="actionList=CreateActions" displayName="Listener..."
+ kind="action" name="AddAnyListener"/>
</XActionItem>
<XActionItemReference entity="ESBListeners101"
name="CopyActions"/>
<XActionItemReference entity="ESBListeners101"
name="DeleteActions"/>
@@ -438,6 +637,72 @@
</XActionItem>
<XDependencies/>
</XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData"
+ XMLSUBPATH="mapping" name="ESBMapping120">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.esb.action" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="role" loader="ElementType"
name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general;id=true;save=always"
+ name="class" xmlname="class">
+ <Editor name="AccessibleJava"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general;save=always"
+ name="status" xmlname="status"/>
+ <XModelAttribute TRIM="no" name="comment"
visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem ICON="action.empty" displayName="Create"
kind="list" name="EditActions"/>
+ <XActionItemReference entity="ESBProperty"
name="CopyActions"/>
+ <XActionItemReference entity="ESBProperty"
name="DeleteActions"/>
+ <XActionItemReference entity="ESBProperty"
name="Properties"/>
+ <XActionItemReference entity="ESBProperty"
name="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData"
+ XMLSUBPATH="payload" name="ESBPayload120">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.esb.action" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="role" loader="ElementType"
name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general;id=true;save=always"
+ name="classpath resource" xmlname="classpathResource">
+ <Editor name="AccessibleJava"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general;save=always"
+ name="content type" xmlname="contentType"/>
+ <XModelAttribute PROPERTIES="category=general"
+ name="character encoding" xmlname="characterEncoding"/>
+ <XModelAttribute TRIM="no" name="comment"
visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem ICON="action.empty" displayName="Create"
kind="list" name="EditActions"/>
+ <XActionItemReference entity="ESBProperty"
name="CopyActions"/>
+ <XActionItemReference entity="ESBProperty"
name="DeleteActions"/>
+ <XActionItemReference entity="ESBProperty"
name="Properties"/>
+ <XActionItemReference entity="ESBProperty"
name="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
<XModelEntity ImplementingClass="%ESB%"
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;saveDefault=false;children=%Ordered%"
XMLSUBPATH="providers" name="ESBProviders120">
@@ -451,7 +716,7 @@
<XChildEntity name="ESBFTPProvider101"/>
<XChildEntity name="ESBSQLProvider101"/>
<XChildEntity name="ESBHibernateProvider101"/>
- <XChildEntity name="ESBHTTPProvider110"/>
+ <XChildEntity name="ESBHTTPProvider120"/>
</XChildrenEntities>
<XEntityRenderer>
<ICONS>
@@ -485,12 +750,10 @@
<XActionItemReference entity="ESBProviders101"
name="AddHibernateProvider"
path="CreateActions/AddHibernateProvider"/>
<XActionItem HandlerClassName="%SpecialWizard%"
ICON="action.empty"
-
PROPERTIES="validator.add=true;support=org.jboss.tools.esb.core.model.handlers.AddProviderSupport;busEntity=ESBHTTPBus110"
+
PROPERTIES="validator.add=true;support=org.jboss.tools.esb.core.model.handlers.AddProviderSupport;busEntity=ESBHTTPBus120"
displayName="HTTP Provider..." kind="action"
name="AddHTTPProvider">
- <EntityData EntityName="ESBHTTPProvider110">
+ <EntityData EntityName="ESBHTTPProvider120">
<AttributeData AttributeName="name"/>
- <AttributeData AttributeName="host"/>
- <AttributeData AttributeName="port"/>
</EntityData>
<EntityData EntityName="ESBBusCreator">
<AttributeData AttributeName="id"/>
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBConstants.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBConstants.java 2009-11-16
22:50:05 UTC (rev 18710)
+++
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBConstants.java 2009-11-17
14:41:29 UTC (rev 18711)
@@ -48,6 +48,7 @@
public String ENT_ESB_SQL_PROVIDER = "ESBSQLProvider101"; //$NON-NLS-1$
public String ENT_ESB_HIBERNATE_PROVIDER = "ESBHibernateProvider101";
//$NON-NLS-1$
public String ENT_ESB_HTTP_PROVIDER = "ESBHTTPProvider110"; //$NON-NLS-1$
+ public String ENT_ESB_HTTP_PROVIDER_120 = "ESBHTTPProvider120"; //$NON-NLS-1$
static String PREACTION_PREFIX = "ESBPreAction"; //$NON-NLS-1$
@@ -62,6 +63,7 @@
ENT_ESB_SQL_PROVIDER,
ENT_ESB_HIBERNATE_PROVIDER,
ENT_ESB_HTTP_PROVIDER,
+ ENT_ESB_HTTP_PROVIDER_120,
};
@@ -73,6 +75,7 @@
public String ENT_ESB_HIBERNATE_BUS = "ESBHibernateBus101"; //$NON-NLS-1$
public String ENT_ESB_SQL_BUS = "ESBSQLBus101"; //$NON-NLS-1$
public String ENT_ESB_HTTP_BUS = "ESBHTTPBus110"; //$NON-NLS-1$
+ public String ENT_ESB_HTTP_BUS_120 = "ESBHTTPBus120"; //$NON-NLS-1$
public String[] BUSES_101 = {
ENT_ESB_BUS,
@@ -83,6 +86,7 @@
ENT_ESB_HIBERNATE_BUS,
ENT_ESB_SQL_BUS,
ENT_ESB_HTTP_BUS,
+ ENT_ESB_HTTP_BUS_120,
};
//prefix
@@ -128,6 +132,7 @@
public String ENT_ESB_ACTIONS = "ESBActions"; //$NON-NLS-1$
public String ENT_ESB_ACTIONS_101 = ENT_ESB_ACTIONS + SUFF_101;
public String ENT_ESB_ACTIONS_110 = ENT_ESB_ACTIONS + SUFF_110;
+ public String ENT_ESB_ACTIONS_120 = ENT_ESB_ACTIONS + SUFF_120;
public String ENT_ESB_ACTION = "ESBAction101"; //$NON-NLS-1$
public String ENT_ESB_ACTION_120 = "ESBAction120"; //$NON-NLS-1$
@@ -143,4 +148,5 @@
public String ATTR_BUS_ID = "id"; //$NON-NLS-1$
public String ATTR_BUS_ID_REF = "channel id ref"; //$NON-NLS-1$
+ public String XML_ATTR_PROTECTED_METHODS = "protected-methods"; //$NON-NLS-1$
}
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBLoaderUtil.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBLoaderUtil.java 2009-11-16
22:50:05 UTC (rev 18710)
+++
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBLoaderUtil.java 2009-11-17
14:41:29 UTC (rev 18711)
@@ -10,11 +10,17 @@
******************************************************************************/
package org.jboss.tools.esb.core.model;
+import java.util.Set;
+import java.util.StringTokenizer;
+
import org.jboss.tools.common.meta.XAttribute;
import org.jboss.tools.common.meta.XModelEntity;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.util.XModelObjectLoaderUtil;
+import org.jboss.tools.common.xml.XMLUtilities;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
/**
* @author Viacheslav Kabanovich
@@ -86,4 +92,73 @@
return false;
}
+ public void saveAttribute(Element element, String xmlname, String value) {
+ if(ESBConstants.XML_ATTR_PROTECTED_METHODS.equals(xmlname)) {
+ StringTokenizer st = new StringTokenizer(value, ",");
+ Element c = XMLUtilities.createElement(element, xmlname);
+ while(st.hasMoreTokens()) {
+ String t = st.nextToken();
+ Element m = XMLUtilities.createElement(c, "method");
+ m.setAttribute("name", t);
+ }
+ } else {
+ super.saveAttribute(element, xmlname, value);
+ }
+ }
+
+ public String getAttribute(Element element, String xmlname, XAttribute attr) {
+ if(ESBConstants.XML_ATTR_PROTECTED_METHODS.equals(xmlname)) {
+ Element c = XMLUtilities.getUniqueChild(element, xmlname);
+ if(c == null) return "";
+ Element[] ms = XMLUtilities.getChildren(c, "method");
+ StringBuffer sb = new StringBuffer();
+ for (Element m: ms) {
+ if(sb.length() > 0) sb.append(',');
+ sb.append("" + m.getAttribute("name"));
+ }
+ return sb.toString();
+ } else {
+ return super.getAttribute(element, xmlname, attr);
+ }
+ }
+
+ protected Set<String> getAllowedChildren(XModelEntity entity) {
+ Set<String> children = super.getAllowedChildren(entity);
+
+ return children;
+ }
+
+ public boolean saveChildren(Element element, XModelObject o) {
+ boolean b = super.saveChildren(element, o);
+ if(o.getModelEntity().getName().equals("ESBHTTPBus120")) {
+ checkHTTPBusDTD(element);
+ }
+ return b;
+ }
+
+ private void checkHTTPBusDTD(Element element) {
+ Element pm = XMLUtilities.getUniqueChild(element, "protected-methods");
+ if(pm == null) return;
+ NodeList list = element.getChildNodes();
+ Element reference = null;
+ boolean hasProperties = false;
+ for (int i = 0; i < list.getLength(); i++) {
+ Node n = list.item(i);
+ if(n instanceof Element) {
+ Element e = (Element)n;
+ if("property".equals(e.getNodeName())) {
+ hasProperties = true;
+ reference = null;
+ } else if(hasProperties) {
+ reference = e;
+ hasProperties = false;
+ }
+ }
+ }
+ if(reference != null) {
+ element.insertBefore(pm, reference);
+ } else if(hasProperties) {
+ element.appendChild(pm);
+ }
+ }
}
Added:
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/handlers/OpenESBResourceHandler.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/handlers/OpenESBResourceHandler.java
(rev 0)
+++
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/handlers/OpenESBResourceHandler.java 2009-11-17
14:41:29 UTC (rev 18711)
@@ -0,0 +1,20 @@
+package org.jboss.tools.esb.core.model.handlers;
+
+import org.jboss.tools.common.meta.action.impl.handlers.DefaultRedirectHandler;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
+
+public class OpenESBResourceHandler extends DefaultRedirectHandler {
+
+ protected XModelObject getTrueSource(XModelObject source) {
+ String attr = action.getProperty("attribute");
+ String path = source.getAttributeValue(attr);
+ if(path == null || path.length() == 0) return null;
+ XModelObject o = source.getModel().getByPath(path);
+ if(o != null) return o;
+ XModelObject r = FileSystemsHelper.getWebRoot(source.getModel());
+ if(r == null) return null;
+ return r.getChildByPath(path);
+ }
+
+}
Property changes on:
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/handlers/OpenESBResourceHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted:
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/handlers/OpenSmooksConfigHandler.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/handlers/OpenSmooksConfigHandler.java 2009-11-16
22:50:05 UTC (rev 18710)
+++
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/handlers/OpenSmooksConfigHandler.java 2009-11-17
14:41:29 UTC (rev 18711)
@@ -1,20 +0,0 @@
-package org.jboss.tools.esb.core.model.handlers;
-
-import org.jboss.tools.common.meta.action.impl.handlers.DefaultRedirectHandler;
-import org.jboss.tools.common.model.XModelObject;
-import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
-
-public class OpenSmooksConfigHandler extends DefaultRedirectHandler {
- static String ATTR_SMOOKS_CONFIG = "smooks config";
-
- protected XModelObject getTrueSource(XModelObject source) {
- String path = source.getAttributeValue(ATTR_SMOOKS_CONFIG);
- if(path == null || path.length() == 0) return null;
- XModelObject o = source.getModel().getByPath(path);
- if(o != null) return o;
- XModelObject r = FileSystemsHelper.getWebRoot(source.getModel());
- if(r == null) return null;
- return r.getChildByPath(path);
- }
-
-}