Author: scabanovich
Date: 2010-04-21 11:02:20 -0400 (Wed, 21 Apr 2010)
New Revision: 21592
Added:
branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java
Modified:
branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/plugin.xml
branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
Log:
https://jira.jboss.org/jira/browse/JBIDE-6118
Modified: branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/plugin.xml
===================================================================
--- branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/plugin.xml 2010-04-21
14:47:45 UTC (rev 21591)
+++ branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/plugin.xml 2010-04-21
15:02:20 UTC (rev 21592)
@@ -40,6 +40,8 @@
class="org.jboss.tools.esb.core.model.impl.FTPMessageFilterImpl"/>
<xclass id="org.jboss.tools.esb.core.model.impl.ContentBasedRouter"
class="org.jboss.tools.esb.core.model.impl.ContentBasedRouter"/>
+ <xclass id="org.jboss.tools.esb.core.model.impl.BusinessRulesProcessor"
+ class="org.jboss.tools.esb.core.model.impl.BusinessRulesProcessor"/>
<xclass id="org.jboss.tools.esb.core.model.handlers.AddProviderSupport"
class="org.jboss.tools.esb.core.model.handlers.AddProviderSupport"/>
Modified:
branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
===================================================================
---
branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2010-04-21
14:47:45 UTC (rev 21591)
+++
branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2010-04-21
15:02:20 UTC (rev 21592)
@@ -198,7 +198,7 @@
<Editor name="ListString"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="pre=true;category=general"
- name="process definition name" xmlname="processdefinition"/>
+ name="process definition name"
xmlname="process-definition-name"/>
<XModelAttribute PROPERTIES="pre=true;category=general"
name="process definition id"
xmlname="process-definition-id"/>
<XModelAttribute PROPERTIES="pre=true;category=general"
name="actor" xmlname="actor"/>
@@ -244,7 +244,8 @@
</XActionItem>
<XDependencies/>
</XModelEntity>
- <XModelEntity ImplementingClass="%ESB%"
+ <XModelEntity
+
ImplementingClass="org.jboss.tools.esb.core.model.impl.BusinessRulesProcessor"
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;children=%EntityOrdered%"
XMLSUBPATH="action"
name="ESBPreActionBusinessRulesProcessor101">
<XChildrenEntities>
@@ -272,7 +273,7 @@
name="rule set" xmlname="ruleSet">
<Constraint loader="Tree">
<value name="ESBResourceTree"/>
- <value name="extensions=drl"/>
+ <value name="extensions=drl,dslr"/>
<value name="linkAction=OpenRuleSet"/>
</Constraint>
<Editor name="TreeChooser"/>
@@ -280,6 +281,24 @@
<XModelAttribute PROPERTIES="category=general;pre=true"
name="rule language" xmlname="ruleLanguage"/>
<XModelAttribute PROPERTIES="pre=true;category=general"
+ name="rule agent properties" xmlname="ruleAgentProperties">
+ <Constraint loader="Tree">
+ <value name="ESBResourceTree"/>
+ <value name="extensions=properties"/>
+ <value name="linkAction=OpenRuleAgent"/>
+ </Constraint>
+ <Editor name="TreeChooser"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=general"
+ name="decision table" xmlname="decisionTable">
+ <Constraint loader="Tree">
+ <value name="ESBResourceTree"/>
+ <value name="extensions=xls"/>
+ <value name="linkAction=OpenDecisionTable"/>
+ </Constraint>
+ <Editor name="TreeChooser"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=general"
default="Default(false)" name="rule reload"
xmlname="ruleReload">
<Constraint loader="ListString">
<value name="Default(false)"/>
@@ -313,6 +332,16 @@
HandlerClassName="org.jboss.tools.esb.core.model.handlers.OpenESBResourceHandler"
ICON="action.empty" PROPERTIES="actionpath=Open;attribute=rule
set"
displayName="Open Rule Set" kind="action"
name="OpenRuleSet"/>
+ <XActionItem
+
HandlerClassName="org.jboss.tools.esb.core.model.handlers.OpenESBResourceHandler"
+ ICON="action.empty"
+ PROPERTIES="actionpath=Open;attribute=decision table"
+ displayName="Open Decision Table" kind="action"
name="OpenDecisionTable"/>
+ <XActionItem
+
HandlerClassName="org.jboss.tools.esb.core.model.handlers.OpenESBResourceHandler"
+ ICON="action.empty"
+ PROPERTIES="actionpath=Open;attribute=rule agent properties"
+ displayName="Open Rule Agent Properties" kind="action"
name="OpenRuleAgent"/>
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
PROPERTIES="validator.add=true" WizardClassName="%Default%"
@@ -1019,6 +1048,8 @@
default="org.jboss.soa.esb.actions.routing.JMSRouter"
name="class" xmlname="class">
<Editor name="Uneditable"/>
</XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=general;save=always"
+ name="jndi name" xmlname="jndiName"/>
<XModelAttribute PROPERTIES="pre=true;category=general"
name="jndi context factory" xmlname="jndi-context-factory">
<Editor name="AccessibleJava"/>
@@ -1054,7 +1085,7 @@
<XModelAttribute PROPERTIES="pre=true;category=advanced"
name="security principal" xmlname="security-principal"/>
<XModelAttribute PROPERTIES="pre=true;category=advanced"
- name="security credentials" xmlname="security-credentials"/>
+ name="security credential" xmlname="security-credential"/>
<XModelAttribute PROPERTIES="pre=true;category=advanced"
name="property strategy" xmlname="property-strategy"/>
<XModelAttribute PROPERTIES="pre=true;category=advanced"
@@ -3426,7 +3457,8 @@
<EntityData EntityName="ESBPreActionBusinessRulesProcessor101">
<AttributeData AttributeName="name"/>
<AttributeData AttributeName="process" Mandatory="no"/>
- <AttributeData AttributeName="rule set"/>
+ <AttributeData AttributeName="rule set"
Mandatory="no"/>
+ <AttributeData AttributeName="rule agent properties"
Mandatory="no"/>
</EntityData>
</XActionItem>
</XActionItem>
Added:
branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java
===================================================================
---
branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java
(rev 0)
+++
branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java 2010-04-21
15:02:20 UTC (rev 21592)
@@ -0,0 +1,40 @@
+package org.jboss.tools.esb.core.model.impl;
+
+import org.jboss.tools.esb.core.model.ESBCustomizedObjectImpl;
+
+public class BusinessRulesProcessor extends ESBCustomizedObjectImpl {
+ private static final long serialVersionUID = 1L;
+ public static String ATTR_RULE_AGENT_PROPERTIES = "rule agent properties";
+ public static String ATTR_DECISION_TABLE = "decision table";
+
+ static int RULE_SET_BASED = 0;
+ static int RULE_AGENT_BASED = 1;
+ static int DECISION_TABLE_BASED = 2;
+
+ public BusinessRulesProcessor() {}
+
+ @Override
+ public boolean isAttributeEditable(String name) {
+ if(ContentBasedRouter.ATTR_RULE_SET.equals(name)) {
+ int kind = getKind();
+ return kind < 0 || kind == RULE_SET_BASED;
+ } else if(ATTR_RULE_AGENT_PROPERTIES.equals(name)) {
+ int kind = getKind();
+ return kind < 0 || kind == RULE_AGENT_BASED;
+ } else if(ATTR_DECISION_TABLE.equals(name)) {
+ int kind = getKind();
+ return kind < 0 || kind == DECISION_TABLE_BASED;
+ }
+ return super.isAttributeEditable(name);
+ }
+
+ int getKind() {
+ String ruleSet = getAttributeValue(ContentBasedRouter.ATTR_RULE_SET);
+ if(ruleSet != null && ruleSet.length() > 0) return RULE_SET_BASED;
+ String ruleAgent = getAttributeValue(ATTR_RULE_AGENT_PROPERTIES);
+ if(ruleAgent != null && ruleAgent.length() > 0) return RULE_AGENT_BASED;
+ String decisionTable = getAttributeValue(ATTR_DECISION_TABLE);
+ if(decisionTable != null && decisionTable.length() > 0) return
DECISION_TABLE_BASED;
+ return -1;
+ }
+}
Property changes on:
branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain