[jbosstools-commits] JBoss Tools SVN: r13061 - in trunk/esb/plugins/org.jboss.tools.esb.core: schemas and 1 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Jan 15 10:15:48 EST 2009


Author: scabanovich
Date: 2009-01-15 10:15:48 -0500 (Thu, 15 Jan 2009)
New Revision: 13061

Added:
   trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBOrderedServiceChildren.java
Modified:
   trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta
   trunk/esb/plugins/org.jboss.tools.esb.core/schemas/jbossesb-1.0.1.xsd
   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/ESBCustomizedObjectImpl.java
Log:
JBIDE-3556

Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta	2009-01-15 14:37:24 UTC (rev 13060)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta	2009-01-15 15:15:48 UTC (rev 13061)
@@ -42,6 +42,7 @@
     <ICON name="provider" path="plugin:org.jboss.tools.esb.core:images/esb/provider.gif"/>
     <ICON name="providers" path="images/file/closed_folder.gif"/>
     <ICON name="schedule" path="plugin:org.jboss.tools.esb.core:images/esb/schedule.gif"/>
+    <ICON name="security" path="images/webxml/security_role.gif"/>
     <ICON name="service" path="plugin:org.jboss.tools.esb.core:images/esb/service.gif"/>
     <ICON name="services" path="images/file/closed_folder.gif"/>
    </GROUP>
@@ -119,6 +120,48 @@
     </Constraint>
     <Editor name="ListString"/>
    </XModelAttribute>
+   <XModelAttribute PROPERTIES="category=general" name="in xsd"
+    visibility="false" xmlname="inXsd">
+    <Constraint loader="ListString">
+     <value name="RequestResponse"/>
+     <value name="OneWay"/>
+    </Constraint>
+    <Editor name="ListString"/>
+   </XModelAttribute>
+   <XModelAttribute PROPERTIES="category=general" name="out xsd"
+    visibility="false" xmlname="outXsd">
+    <Constraint loader="ListString">
+     <value name="RequestResponse"/>
+     <value name="OneWay"/>
+    </Constraint>
+    <Editor name="ListString"/>
+   </XModelAttribute>
+   <XModelAttribute PROPERTIES="category=general" name="fault xsd"
+    visibility="false" xmlname="faultXsd">
+    <Constraint loader="ListString">
+     <value name="RequestResponse"/>
+     <value name="OneWay"/>
+    </Constraint>
+    <Editor name="ListString"/>
+   </XModelAttribute>
+   <XModelAttribute PROPERTIES="category=advanced" name="webservice"
+    visibility="false" xmlname="webservice">
+    <Constraint loader="ListString">
+     <value/>
+     <value name="true"/>
+     <value name="false"/>
+    </Constraint>
+    <Editor name="ListString"/>
+   </XModelAttribute>
+   <XModelAttribute PROPERTIES="category=advanced" name="validate"
+    visibility="false" xmlname="validate">
+    <Constraint loader="ListString">
+     <value/>
+     <value name="true"/>
+     <value name="false"/>
+    </Constraint>
+    <Editor name="ListString"/>
+   </XModelAttribute>
    <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
     <Editor name="Note"/>
    </XModelAttribute>
@@ -2005,9 +2048,49 @@
   <XDependencies/>
  </XModelEntity>
  <XModelEntity ImplementingClass="%ESB%"
-  PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;children=%ESBOrdered%"
+  PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData"
+  XMLSUBPATH="security" name="ESBSecurity101P">
+  <XChildrenEntities>
+   <XChildEntity name="ESBProperty"/>
+  </XChildrenEntities>
+  <XEntityRenderer>
+   <ICONS>
+    <ICON info="main.esb.security" type="main"/>
+   </ICONS>
+  </XEntityRenderer>
+  <XModelAttributes>
+   <XModelAttribute default="security" loader="ElementType" name="element type">
+    <Editor name="Uneditable"/>
+   </XModelAttribute>
+   <XModelAttribute PROPERTIES="category=general;id=true"
+    name="module name" xmlname="moduleName"/>
+   <XModelAttribute PROPERTIES="category=general" name="run as" xmlname="runAs"/>
+   <XModelAttribute PROPERTIES="category=general" name="roles allowed" xmlname="rolesAllowed"/>
+   <XModelAttribute PROPERTIES="category=general"
+    name="use caller identity" xmlname="useCallerIdentity"/>
+   <XModelAttribute PROPERTIES="category=general"
+    name="callback handler" xmlname="callbackHandler"/>
+   <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+    <Editor name="Note"/>
+   </XModelAttribute>
+  </XModelAttributes>
+  <XActionItem kind="list">
+   <XActionItem kind="list" name="CreateActions">
+    <XActionItemReference entity="ESBAction101" name="AddProperty" path="CreateActions/AddProperty"/>
+   </XActionItem>
+   <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;children=%ESBOrderedService%"
   XMLSUBPATH="service" name="ESBService101">
   <XChildrenEntities>
+   <XChildEntity maxCount="1" name="ESBSecurity101P"/>
    <XChildEntity name="ESBProperty"/>
    <XChildEntity maxCount="1" name="ESBListeners101" required="yes"/>
    <XChildEntity maxCount="1" name="ESBActions101" required="yes"/>
@@ -2034,12 +2117,23 @@
     </Constraint>
     <Editor name="ListString"/>
    </XModelAttribute>
+   <XModelAttribute PROPERTIES="category=advanced"
+    name="invm transacted" xmlname="invmTransacted">
+    <Constraint loader="ListString">
+     <value/>
+     <value name="true"/>
+     <value name="false"/>
+    </Constraint>
+    <Editor name="ListString"/>
+   </XModelAttribute>
    <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
     <Editor name="Note"/>
    </XModelAttribute>
   </XModelAttributes>
   <XActionItem kind="list">
-   <XActionItem kind="list" name="CreateActions"/>
+   <XActionItem kind="list" name="CreateActions">
+    <XActionItemReference entity="ESBAction101" name="AddProperty" path="CreateActions/AddProperty"/>
+   </XActionItem>
    <XActionItem ICON="action.empty" displayName="Create" kind="list" name="EditActions"/>
    <XActionItem ICON="action.copy" displayName="Copy" kind="list" name="CopyActions">
     <XActionItem BaseActionName="Copy" HandlerClassName="%Copy%"

Modified: trunk/esb/plugins/org.jboss.tools.esb.core/schemas/jbossesb-1.0.1.xsd
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/schemas/jbossesb-1.0.1.xsd	2009-01-15 14:37:24 UTC (rev 13060)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/schemas/jbossesb-1.0.1.xsd	2009-01-15 15:15:48 UTC (rev 13061)
@@ -198,7 +198,7 @@
                             <xsd:documentation xml:lang="en">Schedule frequency time units.</xsd:documentation>
                         </xsd:annotation>
                     </xsd:attribute>
-					<xsd:attribute default="-1" name="execCount" type="jesb:int" use="optional">
+					<xsd:attribute default="-1" name="execCount" type="xsd:int" use="optional">
 						<xsd:annotation>
 							<xsd:documentation xml:lang="en">
 								Schedule execution count. -1 to execute indefinitely.
@@ -261,6 +261,7 @@
 		</xsd:annotation>
 		<xsd:complexType>
 			<xsd:sequence>
+				<xsd:element maxOccurs="1" minOccurs="0" ref="jesb:security" />
                 <xsd:element maxOccurs="unbounded" minOccurs="0"
                     ref="jesb:property" />
 				<xsd:element maxOccurs="1" minOccurs="0"
@@ -268,7 +269,7 @@
 				<xsd:element maxOccurs="1" minOccurs="0"
 					ref="jesb:actions" />
 			</xsd:sequence>
-			<xsd:attribute name="category" type="xsd:string"
+			<xsd:attribute name="category"
 				use="required">
 				<xsd:annotation>
 					<xsd:documentation xml:lang="en">
@@ -276,8 +277,13 @@
 						a reference to this service in the registry.
 					</xsd:documentation>
 				</xsd:annotation>
+                                <xsd:simpleType>
+                                        <xsd:restriction base="xsd:string">
+                                                <xsd:maxLength value="255"/>
+                                        </xsd:restriction>
+				</xsd:simpleType>
 			</xsd:attribute>
-			<xsd:attribute name="name" type="xsd:string"
+			<xsd:attribute name="name"
 				use="required">
 				<xsd:annotation>
 					<xsd:documentation xml:lang="en">
@@ -285,8 +291,13 @@
 						reference to this service in the registry.
 					</xsd:documentation>
 				</xsd:annotation>
+                                <xsd:simpleType>
+                                        <xsd:restriction base="xsd:string">
+                                                <xsd:maxLength value="255"/>
+                                        </xsd:restriction>
+                                </xsd:simpleType>
 			</xsd:attribute>
-			<xsd:attribute name="description" type="xsd:string"
+			<xsd:attribute name="description"
 				use="required">
 				<xsd:annotation>
 					<xsd:documentation xml:lang="en">
@@ -295,6 +306,11 @@
 						this service can be understood by a human.
 					</xsd:documentation>
 				</xsd:annotation>
+                                <xsd:simpleType>
+                                        <xsd:restriction base="xsd:string">
+                                                <xsd:maxLength value="255"/>
+                                        </xsd:restriction>
+                                </xsd:simpleType>
 			</xsd:attribute>
             <xsd:attribute name="invmScope" type="jesb:invmScope" use="optional">
                 <xsd:annotation>
@@ -306,6 +322,13 @@
                     </xsd:documentation>
                 </xsd:annotation>
             </xsd:attribute>
+            <xsd:attribute name="invmTransacted" type="xsd:boolean">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">
+                        Should the InVM listener execute in a transacted environment?
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
 		</xsd:complexType>
 	</xsd:element>
 
@@ -341,6 +364,11 @@
 					ref="jesb:action" />
 			</xsd:sequence>
 			<xsd:attribute name="mep" type="jesb:mepType" />
+                        <xsd:attribute name="inXsd" type="xsd:string" />
+                        <xsd:attribute name="outXsd" type="xsd:string" />
+                        <xsd:attribute name="faultXsd" type="xsd:string" />
+                        <xsd:attribute name="webservice" type="xsd:boolean" default="true"/>
+                        <xsd:attribute name="validate" type="xsd:boolean" default="false"/>
 		</xsd:complexType>
 	</xsd:element>
 	<xsd:element name="action">
@@ -386,6 +414,55 @@
 		</xsd:complexType>
 	</xsd:element>
 
+	<xsd:element name="security">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element maxOccurs="unbounded" minOccurs="0" ref="jesb:property" />
+			</xsd:sequence>
+			<xsd:attribute name="runAs" type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+					 Is used to specify that a specific security role given by the role-name value should be used 
+					 as the security identity for this service.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="rolesAllowed" type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+					Specifies one or more logical roles that are allowed to acccess the service.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="moduleName" type="xsd:string" use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="useCallerIdentity" type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+					Is used to indicate that the current caller's identity should be propagated as the security identity
+					this service.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="callbackHandler" type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+					CallbackHandler implementation class. This will override the global callbackhandler 
+					which can be specified in jbossesb-properties.xml
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+
 	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
 		Listener base types.
 		88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
@@ -431,7 +508,7 @@
 				</xsd:documentation>
 			</xsd:annotation>
 		</xsd:attribute>
-		<xsd:attribute default="1" name="maxThreads" type="jesb:int"
+		<xsd:attribute default="1" name="maxThreads" type="xsd:int"
 			use="optional">
 			<xsd:annotation>
 				<xsd:documentation xml:lang="en">
@@ -463,7 +540,7 @@
 		<xsd:complexContent>
 			<xsd:extension base="jesb:listener">
 				<xsd:attribute default="-1"
-					name="poll-frequency-seconds" type="jesb:int" use="optional">
+					name="poll-frequency-seconds" type="xsd:int" use="optional">
 <!-- Purposely defaults to -1 -->
 					<xsd:annotation>
 						<xsd:documentation xml:lang="en">
@@ -475,7 +552,7 @@
 					</xsd:annotation>
 				</xsd:attribute>
 				<xsd:attribute default="-1" name="schedule-frequency"
-					type="jesb:int" use="optional">
+					type="xsd:int" use="optional">
 <!-- Purposely defaults to -1 -->
 					<xsd:annotation>
 						<xsd:documentation xml:lang="en">
@@ -1532,7 +1609,7 @@
 		<xsd:complexType>
 			<xsd:complexContent>
 				<xsd:extension base="jesb:bus">
-					<xsd:attribute name="port" type="jesb:int"
+					<xsd:attribute name="port" type="xsd:int"
 						use="required">
 						<xsd:annotation>
 							<xsd:documentation xml:lang="en">
@@ -1624,25 +1701,4 @@
 		</xsd:complexType>
 	</xsd:element>
 
-    <xsd:simpleType name="elType1">
-        <xsd:restriction base="xsd:string">
-            <xsd:pattern value="\#\{.+\}"/>
-        </xsd:restriction>
-    </xsd:simpleType>
-
-    <xsd:simpleType name="elType2">
-        <xsd:restriction base="xsd:string">
-            <xsd:pattern value="\$\{.+\}"/>
-        </xsd:restriction>
-    </xsd:simpleType>
-
-    <xsd:simpleType name="expressionType">
-        <xsd:union memberTypes="jesb:elType1 jesb:elType2"/>
-    </xsd:simpleType>
-    
-    <xsd:simpleType name="int">
-        <xsd:union memberTypes="xsd:int jesb:expressionType"/>
-    </xsd:simpleType>
-   
-
 </xsd:schema>

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-01-15 14:37:24 UTC (rev 13060)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBConstants.java	2009-01-15 15:15:48 UTC (rev 13061)
@@ -25,6 +25,7 @@
 	
 	public String ENT_ESB_PROVIDERS = "ESBProviders101"; //$NON-NLS-1$
 
+	public String ENT_ESB_SECURITY = "ESBSecurity101P"; //$NON-NLS-1$
 	public String ENT_ESB_PROVIDER = "ESBBusProvider101"; //$NON-NLS-1$
 	public String ENT_ESB_JBR_PROVIDER = "ESBJBRProvider101"; //$NON-NLS-1$
 	public String ENT_ESB_SCHEDULE_PROVIDER = "ESBScheduleProvider101"; //$NON-NLS-1$

Modified: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBCustomizedObjectImpl.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBCustomizedObjectImpl.java	2009-01-15 14:37:24 UTC (rev 13060)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBCustomizedObjectImpl.java	2009-01-15 15:15:48 UTC (rev 13061)
@@ -23,6 +23,9 @@
 	
     protected RegularChildren createChildren() {
     	String children = getModelEntity().getProperty("children");
+    	if(children != null && "%ESBOrderedService%".equals(children)) {
+    		return new ESBOrderedServiceChildren();
+    	}
     	if(children != null && children.equals("%ESBOrdered%")) {
     		return new ESBOrderedChildren();
     	}

Added: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBOrderedServiceChildren.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBOrderedServiceChildren.java	                        (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBOrderedServiceChildren.java	2009-01-15 15:15:48 UTC (rev 13061)
@@ -0,0 +1,37 @@
+/******************************************************************************* 
+ * Copyright (c) 2007 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.esb.core.model;
+
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.impl.GroupOrderedChildren;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class ESBOrderedServiceChildren extends GroupOrderedChildren {
+
+    protected int getGroupCount() {
+        return 3;
+    }
+
+    protected int getGroup(XModelObject o) {
+    	if(o == null) return 0;
+    	String entity = o.getModelEntity().getName();
+    	if(ESBConstants.ENT_ESB_SECURITY.equals(entity)) {
+    		return 0;
+    	}
+    	if(ESBConstants.ENT_ESB_PROPERTY.equals(entity)) {
+    		return 1;
+    	}
+        return 2;
+    }
+
+}




More information about the jbosstools-commits mailing list