Modified: ofbiz/site/dtds/simple-methods.xsd
URL: http://svn.apache.org/viewvc/ofbiz/site/dtds/simple-methods.xsd?rev=1737086&r1=1737085&r2=1737086&view=diff ============================================================================== --- ofbiz/site/dtds/simple-methods.xsd (original) +++ ofbiz/site/dtds/simple-methods.xsd Wed Mar 30 09:12:32 2016 @@ -25,7 +25,8 @@ under the License. (see further down for the Simple Map Processor Section) --> - <!-- Reusable artifacts (abstract elements, groups, attributeGroups --> + <!-- Abstract elements and element groups --> + <xs:element name="CallOperations" abstract="true"/> <xs:element name="EventOperations" abstract="true"/> <xs:element name="ServiceOperations" abstract="true"/> @@ -39,7 +40,8 @@ under the License. <xs:element name="IfBasicOperations" abstract="true"/> <xs:element name="IfOtherOperations" abstract="true"/> <xs:element name="OtherOperations" abstract="true"/> - <xs:group name="AllOperations"> <!-- Any simple-method operation can be nested under an if-* tag. --> + + <xs:group name="AllOperations"> <xs:choice> <xs:element ref="CallOperations"/> <xs:element ref="EventOperations"/> @@ -57,4810 +59,4741 @@ under the License. </xs:choice> </xs:group> - <xs:attributeGroup name="attlist.propertyInfoOptional"> - <xs:attribute type="xs:string" name="resource"/> - <xs:attribute type="xs:string" name="property"/> - </xs:attributeGroup> - <xs:attributeGroup name="attlist.typeDefaultString"> - <xs:attribute name="type" default="String"> + <xs:group name="IfConditions"> + <xs:choice> + <xs:element ref="IfCombineConditions"/> + <xs:element ref="IfBasicOperations"/> + </xs:choice> + </xs:group> + + <xs:element name="IfCombineConditions" abstract="true"/> + + <!-- Reusable types --> + + <xs:simpleType name="booleanConst"> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="booleanExpr"> + <xs:restriction base="xs:string"> + <xs:pattern value="\$\{.+\}|true|false" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="javaClassName"> + <xs:restriction base="xs:token"> + <xs:pattern value="[a-zA-Z_]{1}[a-zA-Z0-9_$.]+" /> + </xs:restriction> + </xs:simpleType> + + <!-- Reusable attributes and attribute groups --> + + <xs:attribute name="field"> + <xs:annotation> + <xs:documentation> + The name of the field to set. The target of the assignment. + + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:minLength value="1" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + + <xs:attribute name="error-list-name" type="xs:string"> + <xs:annotation> + <xs:documentation> + The name of the error message list. It will be created if it does not exist. + Defaults to "error_list". + + Optional. Attribute types: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="type" type="javaClassName"> + <xs:annotation> + <xs:documentation> + The Java data type. + + Optional. Attribute type: constant. Attribute must contain a valid Java class name. + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attributeGroup name="attlist.operatorRequired"> + <xs:attribute name="operator" use="required"> + <xs:annotation> + <xs:documentation> + The comparison operator. The operator describes the l-value compared to the r-value. + + The "contains" operator returns true if the l-value contains the r-value. + This operator does not perform type conversions. + The l-value must be a collection type or a String. A null l-value evaluates to false. + + Required. Attribute type: constant. + </xs:documentation> + </xs:annotation> <xs:simpleType> <xs:restriction base="xs:token"> - <xs:enumeration value="PlainString"/> - <xs:enumeration value="String"/> - <xs:enumeration value="BigDecimal"/> - <xs:enumeration value="Double"/> - <xs:enumeration value="Float"/> - <xs:enumeration value="Long"/> - <xs:enumeration value="Integer"/> - <xs:enumeration value="Date"/> - <xs:enumeration value="Time"/> - <xs:enumeration value="Timestamp"/> - <xs:enumeration value="Boolean"/> - <xs:enumeration value="Object"/> + <xs:enumeration value="equals"/> + <xs:enumeration value="not-equals"/> + <xs:enumeration value="less"/> + <xs:enumeration value="less-equals"/> + <xs:enumeration value="greater"/> + <xs:enumeration value="greater-equals"/> + <xs:enumeration value="contains"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:attributeGroup> - <xs:attributeGroup name="attlist.operatorRequired"> + + <xs:attributeGroup name="attlist.operatorOptionalRvalue"> <xs:attribute name="operator" use="required"> + <xs:annotation> + <xs:documentation> + The comparison operator. The operator describes the l-value compared to the r-value. + + The "contains" operator returns true if the l-value contains the r-value. + This operator does not perform type conversions. + The l-value must be a collection type or a String. A null l-value evaluates to false. + + The "is-null", "is-not-null", and "is-empty" operators + do not require an r-value. Any r-values will be ignored. + + Required. Attribute type: constant. + </xs:documentation> + </xs:annotation> <xs:simpleType> <xs:restriction base="xs:token"> + <xs:enumeration value="equals"/> + <xs:enumeration value="not-equals"/> <xs:enumeration value="less"/> - <xs:enumeration value="greater"/> <xs:enumeration value="less-equals"/> + <xs:enumeration value="greater"/> <xs:enumeration value="greater-equals"/> - <xs:enumeration value="equals"/> - <xs:enumeration value="not-equals"/> <xs:enumeration value="contains"/> + <xs:enumeration value="is-null"/> + <xs:enumeration value="is-not-null"/> + <xs:enumeration value="is-empty"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:attributeGroup> - <!-- ELEMENTS start here --> - <xs:element name="field"> + <xs:attributeGroup name="attlist.check-permission"> + <xs:attribute name="permission" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + The name of the permission. + The user must belong to a security group that includes this permission. + + Required. Attribute types: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="action" type="xs:string"> + <xs:annotation> + <xs:documentation> + If an action is specified the user can have one of two permissions: the permission + "_ADMIN" or permission + action. + Examples of actions include "_CREATE", "_VIEW", etc. + + Optional. Attribute types: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:attributeGroup> + + <xs:attribute name="delegator-name" type="xs:string"> <xs:annotation> <xs:documentation> - Used to specify a field to be passed as an argument to the method call. - The field can be in a map in the environment or if no map-name is specified - then the field will come directly from the environment. + An alternate delegator name. When specified, the entity operation will use the + alternate delegator instead of the current delegator. + + Optional. Attribute types: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + +<!-- + ============================= + ===== The Root Elements ===== + ============================= +--> - With the "." Syntax, the map-name is typically no longer necessary because - you can do map-name.field-name in the field-name attribute, but those are still there for legacy purposes. + <xs:element name="simple-methods"> + <xs:annotation> + <xs:documentation> + The document-level element of Mini-language files. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.field"/> + <xs:sequence> + <xs:element ref="simple-method" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.field"> - <xs:attribute type="xs:string" name="field" use="required"> - <xs:annotation><xs:documentation>Name of the field to put value in.</xs:documentation></xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="type"> - <xs:annotation> - <xs:documentation> - Type of the value put in the field. - If this is a method call or object creation and the type in the method signature being called is for a parent class or interface, - then it should be the type in that parent class or interface and not the type of the object being passed in. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="string"> + + <xs:element name="simple-method"> <xs:annotation> <xs:documentation> - String of type java.lang.String. Inserts the value of the inline string where specified. + Contains a block of Mini-language code. + + A simple method can be called in either an event context from the Control + Servlet (or another event) or in a service context through the Service + Engine, or any other component that has access to a service + dispatcher. </xs:documentation> </xs:annotation> - <xs:complexType mixed="true"> - <xs:attributeGroup ref="attlist.string"/> + <xs:complexType> + <xs:group ref="AllOperations" minOccurs="0" maxOccurs="unbounded" /> + <xs:attribute name="method-name" type="javaClassName" use="required"> + <xs:annotation> + <xs:documentation> + A name (preferably a legal Java identifier) for this method. + This name must be unique for the XML file it is in as it will be used to reference this method externally. + + Required. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="short-description" type="xs:string"> + <xs:annotation> + <xs:documentation> + A short description of the method - used for documentation. + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="login-required" type="booleanConst"> + <xs:annotation> + <xs:documentation> + Require a user login to run this method. Defaults to "true". + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="use-transaction" type="booleanConst"> + <xs:annotation> + <xs:documentation> + Create a transaction if none exists for this thread. Defaults to "true". + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="default-error-code" type="xs:string"> + <xs:annotation> + <xs:documentation> + The default error return code. Defaults to "error". + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="default-success-code" type="xs:string"> + <xs:annotation> + <xs:documentation> + The default success return code. Defaults to "success". + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="event-request-object-name" type="xs:string"> + <xs:annotation> + <xs:documentation> + The name of the field containing the javax.servlet.ServletRequest object. Defaults to "request". + + Used when the simple method is invoked as an event, it is ignored otherwise. + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="event-response-object-name" type="xs:string"> + <xs:annotation> + <xs:documentation> + The name of the field containing the javax.servlet.ServletResponse object. Defaults to "response". + + Used when the simple method is invoked as an event, it is ignored otherwise. + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="event-session-object-name" type="xs:string"> + <xs:annotation> + <xs:documentation> + The name of the field containing the javax.servlet.http.HttpSession object. Defaults to "session". + + Used when the simple method is invoked as an event, it is ignored otherwise. + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="event-response-code-name" type="xs:string"> + <xs:annotation> + <xs:documentation> + The name of the field containing the event response code. Defaults to "_response_code_". + + Used when the simple method is invoked as an event, it is ignored otherwise. + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="event-error-message-name" type="xs:string"> + <xs:annotation> + <xs:documentation> + The name of the field containing the event error message. Defaults to "_error_message_". + + Used when the simple method is invoked as an event, it is ignored otherwise. + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="event-error-message-list-name" type="xs:string"> + <xs:annotation> + <xs:documentation> + The name of the field containing the event error message list. Defaults to "_error_message_list_". + + Used when the simple method is invoked as an event, it is ignored otherwise. + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="event-event-message-name" type="xs:string"> + <xs:annotation> + <xs:documentation> + The name of the field containing the event message. Defaults to "_event_message_". + + Used when the simple method is invoked as an event, it is ignored otherwise. + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="event-event-message-list-name" type="xs:string"> + <xs:annotation> + <xs:documentation> + The name of the field containing the event message list. Defaults to "_event_message_list_". + + Used when the simple method is invoked as an event, it is ignored otherwise. + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="service-response-message-name" type="xs:string"> + <xs:annotation> + <xs:documentation> + The name of the field containing the service response message. Defaults to "responseMessage". + + Used when the simple method is invoked as a service, it is ignored otherwise. + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="service-error-message-name" type="xs:string"> + <xs:annotation> + <xs:documentation> + The name of the field containing the service error message. Defaults to "errorMessage". + + Used when the simple method is invoked as a service, it is ignored otherwise. + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="service-error-message-list-name" type="xs:string"> + <xs:annotation> + <xs:documentation> + The name of the field containing the service error message list. Defaults to "errorMessageList". + + Used when the simple method is invoked as a service, it is ignored otherwise. + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="service-error-message-map-name" type="xs:string"> + <xs:annotation> + <xs:documentation> + The name of the field containing the service error message map. Defaults to "errorMessageMap". + + Used when the simple method is invoked as a service, it is ignored otherwise. + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="service-success-message-name" type="xs:string"> + <xs:annotation> + <xs:documentation> + The name of the field containing the service success message. Defaults to "successMessage". + + Used when the simple method is invoked as a service, it is ignored otherwise. + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="service-success-message-list-name" type="xs:string"> + <xs:annotation> + <xs:documentation> + The name of the field containing the service success message list. Defaults to "successMessageList". + + Used when the simple method is invoked as a service, it is ignored otherwise. + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.string"> - <xs:attribute type="xs:string" name="value"/> - </xs:attributeGroup> - <xs:element name="simple-methods"> + +<!-- + ================================= + ===== Assignment Operations ===== + ================================= +--> + + <xs:element name="add-error" substitutionGroup="ControlOperations"> + <xs:annotation> + <xs:documentation> + Adds an error message to an error message list. + </xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:choice> + <xs:element ref="fail-message" /> + <xs:element ref="fail-property" /> + </xs:choice> + <xs:attribute ref="error-list-name"/> + </xs:complexType> + </xs:element> + + <xs:element name="assert" substitutionGroup="EnvOperations"> + <xs:annotation> + <xs:documentation> + Adds an error message to the error message list for each condition that evaluates to false. + </xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:group maxOccurs="unbounded" ref="IfConditions" /> + <xs:attribute type="xs:string" name="title"> + <xs:annotation> + <xs:documentation> + The title of the assert operation. The title is used in test reports. + + Optional. Attribute types: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute ref="error-list-name"/> + </xs:complexType> + </xs:element> + + <xs:element name="check-id" substitutionGroup="EnvOperations"> + <xs:annotation> + <xs:documentation> + Evaluates the specified field, and adds an error message to the error message list if the field's value is not a valid database ID value. + + <![CDATA[Valid IDs can be any sequence of characters or digits but must not contain the following characters: + space [ ], double quote ["], single quote ['], ampersand [&], question mark [?], + less-than sign [<], greater-than sign [>], forward-slash [/], back-slash [\].]]> + </xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:choice minOccurs="0"> + <xs:element ref="fail-message" /> + <xs:element ref="fail-property" /> + </xs:choice> + <xs:attribute type="xs:string" name="field" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field that contains the ID value to check. + + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute ref="error-list-name" /> + </xs:complexType> + </xs:element> + + <xs:element name="check-permission" substitutionGroup="IfOtherOperations"> <xs:annotation> <xs:documentation> - Opening tag of simple-method files. + Checks to see if the current user has the specified permission. + If the user does not have the specified permission or if there is no user associated with the context + then the failure message from fail-message or fail-property will be added to the + specified error list. + + Note that this element must be followed by the check-errors element for it to do anything meaningful. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> - <xs:element maxOccurs="unbounded" ref="simple-method"> + <xs:element name="alt-permission" minOccurs="0" maxOccurs="unbounded"> <xs:annotation> <xs:documentation> - Opening tag of a simple-method definition. + Declares an alternate permission. Alternate permissions are checked when the primary permission check fails. </xs:documentation> </xs:annotation> + <xs:complexType> + <xs:attributeGroup ref="attlist.check-permission" /> + </xs:complexType> </xs:element> + <xs:choice> + <xs:element ref="fail-message" /> + <xs:element ref="fail-property" /> + </xs:choice> </xs:sequence> + <xs:attributeGroup ref="attlist.check-permission" /> + <xs:attribute ref="error-list-name" /> </xs:complexType> </xs:element> - <xs:element name="simple-method"> + + <xs:element name="clear-field" substitutionGroup="EnvOperations"> <xs:annotation> <xs:documentation> - A simple method can be called in either an event context from the Control - Servlet (or another event) or in a service context through the Service - Engine, or any other component that has access to a service dispatcher. + Sets the value of the specified field to null. + </xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:attribute ref="field" use="required" /> + </xs:complexType> + </xs:element> - The field-to-request and field-to-session elements will be IGNORED when - called in a service context. So, they are ONLY used when called in an event context. + <xs:element name="create-object" substitutionGroup="EnvOperations"> + <xs:annotation> + <xs:documentation> + Creates an instance of the specified class. + The string and field sub-elements are passed to the constructor method as arguments in the order they are specified. + A runtime exception will be thrown if the sub-elements do not match the constructor method arguments. + + Deprecated - use the script element. + </xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="field" /> + <xs:element ref="string" /> + </xs:choice> + <xs:attribute ref="field" use="required" /> + <xs:attribute name="class-name" type="javaClassName" use="required"> + <xs:annotation> + <xs:documentation> + The name of the class to construct an instance of. + + Required. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> - The field-to-result elements will be ignored in an event context, ie only used in a service. + <xs:element name="fail-message"> + <xs:annotation> + <xs:documentation> + Declares an error message. + </xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:attribute type="xs:string" name="message" use="required"> + <xs:annotation> + <xs:documentation> + The error message text. + + Required. Attribute type: constant+expr + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> - The parameter-map-name env entry will contain the HttpRequest parameters for - running in an event context and and the input context when running in a service. + <xs:element name="fail-property"> + <xs:annotation> + <xs:documentation> + Declares an error message found in a properties file. + Typically used for internationalized messages. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllOperations"/> - <xs:attributeGroup ref="attlist.simple-method"/> + <xs:attribute type="xs:string" name="resource" use="required"> + <xs:annotation> + <xs:documentation> + The name of a properties file on the classpath. + + Required. Attribute type: constant + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="property" use="required"> + <xs:annotation> + <xs:documentation> + The property key. + + Required. Attribute type: constant + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.simple-method"> - <xs:attribute type="xs:string" name="method-name" use="required"> - <xs:annotation> - <xs:documentation> - A name (preferably a legal Java identifier) for this method. - This name must be unique for the XML file it is in as it will be used to reference this method externally. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="short-description" use="required"> - <xs:annotation> - <xs:documentation> - A short description of the method for certain system error messages. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="login-required" default="true"> - <xs:annotation> - <xs:documentation> - Is a logged in user (UserLogin object, or login.username and login.password Strings) required to run this method? - "true" or "false" (defaults to "true") - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true"/> - <xs:enumeration value="false"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="use-transaction" default="true"> - <xs:annotation> - <xs:documentation> - Create a transaction if none exists for this thread? - "true" or "false" (defaults to "true") - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true"/> - <xs:enumeration value="false"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute type="xs:string" name="default-error-code" default="error"> - <xs:annotation> - <xs:documentation> - The default error return code. (defaults to "error") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="default-success-code" default="success"> - <xs:annotation> - <xs:documentation> - The default success return code. (defaults to "success") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="parameter-map-name" default="parameters"> - <xs:annotation> - <xs:documentation> - As event: copy of request parameters. - As service: incoming context. - (defaults to "parameters") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="event-request-object-name" default="request"> - <xs:annotation> - <xs:documentation> - As event only (defaults to "request") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="event-response-object-name" default="response"> - <xs:annotation> - <xs:documentation> - As event only (defaults to "response") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="event-response-code-name" default="_response_code_"> - <xs:annotation> - <xs:documentation> - As event only (defaults to "_response_code") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="event-error-message-name" default="_error_message_"> - <xs:annotation> - <xs:documentation> - As event only (defaults to "_error_message_") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="event-event-message-name" default="_event_message_"> - <xs:annotation> - <xs:documentation> - As event only (defaults to "_event_message_") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="service-response-message-name" default="responseMessage"> - <xs:annotation> - <xs:documentation> - As service only (defaults to "responseMessage") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="service-error-message-name" default="errorMessage"> - <xs:annotation> - <xs:documentation> - As service only (defaults to "errorMessage") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="service-error-message-list-name" default="errorMessageList"> - <xs:annotation> - <xs:documentation> - As service only (defaults to "errorMessageList") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="service-error-message-map-name" default="errorMessageMap"> - <xs:annotation> - <xs:documentation> - As service only (defaults to "errorMessageMap") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="service-success-message-name" default="successMessage"> - <xs:annotation> - <xs:documentation> - As service only (defaults to "successMessage") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="service-success-message-list-name" default="successMessageList"> - <xs:annotation> - <xs:documentation> - As service only (defaults to "successMessageList") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="locale-name" default="locale"> - <xs:annotation> - <xs:documentation> - Name of locale variable (defaults to "locale") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="delegator-name" default="delegator"> - <xs:annotation> - <xs:documentation> - A GenericDelegator object to use in the method (defaults to "delegator") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="security-name" default="security"> - <xs:annotation> - <xs:documentation> - A Security object to use in the method (defaults to "security") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="dispatcher-name" default="dispatcher"> - <xs:annotation> - <xs:documentation> - A LocalDispatcher object to use in the method (defaults to "dispatcher") - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="user-login-name" default="userLogin"> - <xs:annotation> - <xs:documentation> - Name of user login variable (defaults to "userLogin") - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="call-map-processor" substitutionGroup="CallOperations"> - <xs:annotation> - <xs:documentation> - The call-map-processor tag invokes a simple map processor from an existing map, creating a new map or adding to an existing one - if the named out-map already exists. Resulting messages are added to the named list, and a new list is created if a list with - the given name does not yet exist. Note that all lists and maps exist in the same context and must have unique names. - - An inline simple-map-processor can be used by putting a simple-map-processor tag under the call-map-processor tag. - If both an external and an inline map-processor are specified, the external - one will be called first, allowing the inline one to override its behavior. - </xs:documentation> - </xs:annotation> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" ref="simple-map-processor"> - <xs:annotation> - <xs:documentation> - Uses the same definition as the simple-map-processor in the context of a simple-map-processors XML file. - Allows for an inlined simple-map-processor. - </xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - <xs:attributeGroup ref="attlist.call-map-processor"/> - </xs:complexType> - </xs:element> - <xs:attributeGroup name="attlist.call-map-processor"> - <xs:attribute type="xs:string" name="xml-resource"> - <xs:annotation> - <xs:documentation> - The full path and filename on the classpath of the XML file which contains an external map processor to execute. - This is only required if an external map processor is desired. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="processor-name"> - <xs:annotation> - <xs:documentation> - The name of the external map processor to execute in the specified xml-resource. - This is only required if an external map processor is desired. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="in-map-name" use="required"> - <xs:annotation> - <xs:documentation> - The name of a map in the method environment to use as the input map. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="out-map-name" use="required"> - <xs:annotation> - <xs:documentation> - The name of a map in the method environment to use as the output map. - Will be created if it does not exist already. - If already exists will be added to in place. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="error-list-name" default="error_list"> - <xs:annotation> - <xs:documentation> - The name of a list in the method environment that the error messages will be added to. - Will be created if it does not exist. - Defaults to "error_list". - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="set-service-fields" substitutionGroup="CallOperations"> + <xs:element name="field"> <xs:annotation> <xs:documentation> - Take all the incoming files for this service, or all the incoming service attributes, - and look for fields with the same name in the incoming map and copy those onto the outgoing map. + Declares an environment field to be passed as an argument to an object method call. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.set-service-fields"/> + <xs:attribute type="xs:string" name="field" use="required"> + <xs:annotation> + <xs:documentation> + The name of the environment field to use. + + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute ref="type"> + <xs:annotation> + <xs:documentation> + The Java class of the argument. Defaults to "java.lang.String". + It should be the type specified in the method signature, not the type of the object being + passed in. + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.set-service-fields"> - <xs:attribute type="xs:string" name="service-name" use="required"> - <xs:annotation><xs:documentation>Name of the service to get all the incoming attributes (parameters) from.</xs:documentation></xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="map" use="required"> - <xs:annotation><xs:documentation>Incoming map to copy fields from.</xs:documentation></xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="to-map" use="required"> - <xs:annotation><xs:documentation>Map to copy to fields to.</xs:documentation></xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="error-list-name" default="error_list"> - <xs:annotation> - <xs:documentation> - The name of a list in the method environment that the error messages will be added to. - Will be created if it does not exist. - Defaults to "error_list". - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="call-service" substitutionGroup="CallOperations"> + + <xs:element name="field-to-list" substitutionGroup="EnvOperations"> <xs:annotation> <xs:documentation> - The call-service tag invokes a service through the Service Engine. - If the specified error code is returned from the service, - the event is aborted and the transaction in the current thread is rolled back. - Otherwise, the remaining operations are invoked. - - The result-to-request and result-to-session elements will be IGNORED when - called in a service context. So, they are ONLY used when called in an event context. + Appends an object to the specified list. + + Deprecated - use the set element. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" ref="error-prefix"/> - <xs:element minOccurs="0" ref="error-suffix"/> - <xs:element minOccurs="0" ref="success-prefix"/> - <xs:element minOccurs="0" ref="success-suffix"/> - <xs:element minOccurs="0" ref="message-prefix"/> - <xs:element minOccurs="0" ref="message-suffix"/> - <xs:element minOccurs="0" ref="default-message"/> - <xs:choice minOccurs="0" maxOccurs="unbounded"> - <xs:element ref="results-to-map"/> - <xs:element ref="result-to-field"/> - <xs:element ref="result-to-request"/> - <xs:element ref="result-to-session"/> - <xs:element ref="result-to-result"/> - </xs:choice> - </xs:sequence> - <xs:attributeGroup ref="attlist.call-service"/> - </xs:complexType> - </xs:element> - <xs:attributeGroup name="attlist.call-service"> - <xs:attribute type="xs:string" name="service-name" use="required"> - <xs:annotation> - <xs:documentation> - Name of the service to call. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="in-map-name"> - <xs:annotation> - <xs:documentation> - Optional name of a map in the method environment to use as the input map. - If you're not going to pass any parameters to the service than you can just - leave off the in-map name, although typically in a service tag you will see - a service-name and the in-mapname passed in. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="include-user-login" default="true"> - <xs:annotation> - <xs:documentation> - Include-user-login by default will include the user login - so if there is a user login for the current simple-method - it will pass that in to the service. If you don't want it to - pass that in you can just set this to false. - Defaults to "true". - </xs:documentation> - </xs:annotation> - <xs:simpleType> + <xs:attribute type="xs:string" name="field" use="required"> <xs:annotation> + <xs:documentation> + The field name of the object to append. The operation does nothing if the field does not exist. + + Required. Attribute type: expression. + </xs:documentation> </xs:annotation> - <xs:restriction base="xs:token"> - <xs:enumeration value="true"/> - <xs:enumeration value="false"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="break-on-error" default="true"> - <xs:annotation> - <xs:documentation> - If there's an error in the service by default - it will stop the current simple-method and return an - error message that came from the service it called. If - you don't want it to when there's an error you can just - set that to false. - Defaults to "true". - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true"/> - <xs:enumeration value="false"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute type="xs:string" name="error-code" default="error"> - <xs:annotation> - <xs:documentation> - Defaults to "error". - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="success-code" default="success"> - <xs:annotation> - <xs:documentation> - Defaults to "success". - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="require-new-transaction" default="false"> - <xs:annotation> - <xs:documentation> - Defines if the simple-method requires a new transaction or not. - Defaults to "false". - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true"/> - <xs:enumeration value="false"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute type="xs:string" name="transaction-timeout"> - <xs:annotation> - <xs:documentation> - Defines the timeout for the transaction, in seconds. - Defaults to the value set in the service definition which in turn defaults to the setting - in the TransactionFactory being used (typically 60 seconds). - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="error-prefix"> - <xs:annotation> - <xs:documentation> - Specify a resource and a property to prepend to the error message. - </xs:documentation> - </xs:annotation> - <xs:complexType mixed="true"> - <xs:attributeGroup ref="attlist.propertyInfoOptional"/> - </xs:complexType> - </xs:element> - <xs:element name="error-suffix"> - <xs:annotation> - <xs:documentation> - Specify a resource and a property to append to the error message. - </xs:documentation> - </xs:annotation> - <xs:complexType mixed="true"> - <xs:attributeGroup ref="attlist.propertyInfoOptional"/> - </xs:complexType> - </xs:element> - <xs:element name="success-prefix"> - <xs:annotation> - <xs:documentation> - Specify a resource and a property to prepend to the success message. - </xs:documentation> - </xs:annotation> - <xs:complexType mixed="true"> - <xs:attributeGroup ref="attlist.propertyInfoOptional"/> - </xs:complexType> - </xs:element> - <xs:element name="success-suffix"> - <xs:annotation> - <xs:documentation> - Specify a resource and a property to append to the success message. - </xs:documentation> - </xs:annotation> - <xs:complexType mixed="true"> - <xs:attributeGroup ref="attlist.propertyInfoOptional"/> - </xs:complexType> - </xs:element> - <xs:element name="message-prefix"> - <xs:annotation> - <xs:documentation> - Specify a resource and a property to prepend to any kind of message. - </xs:documentation> - </xs:annotation> - <xs:complexType mixed="true"> - <xs:attributeGroup ref="attlist.propertyInfoOptional"/> - </xs:complexType> - </xs:element> - <xs:element name="message-suffix"> - <xs:annotation> - <xs:documentation> - Specify a resource and a property to append to any kind of message. - </xs:documentation> - </xs:annotation> - <xs:complexType mixed="true"> - <xs:attributeGroup ref="attlist.propertyInfoOptional"/> - </xs:complexType> - </xs:element> - <xs:element name="default-message"> - <xs:annotation> - <xs:documentation> - Message that you can specify for the case where the service does not return a message. - You can just specify a default-message to use as if the service had returned that default-message. - </xs:documentation> - </xs:annotation> - <xs:complexType mixed="true"> - <xs:attributeGroup ref="attlist.propertyInfoOptional"/> + </xs:attribute> + <xs:attribute type="xs:string" name="list" use="required"> + <xs:annotation> + <xs:documentation> + The field name of the list that the object will be appended to. + If the list does not exist, one will be created. + + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:element name="results-to-map"> + + <xs:element name="field-to-request" substitutionGroup="EventOperations"> <xs:annotation> <xs:documentation> - results-to-map will take all of the results of the service, - the outgoing maps from the service and put them in a map of the given map-name. + Copies a field to a servlet request attribute. + Valid only when the simple-method is called as an event, it is ignored otherwise. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.results-to-map"/> + <xs:attribute type="xs:string" name="field" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field to copy from. The source of the assignment. + The operation does nothing if the field does not exist. + + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="request-name"> + <xs:annotation> + <xs:documentation> + The servlet request attribute name. The target of the assignment. + Defaults to the value of the field attribute. + + Optional. Attribute types: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.results-to-map"> - <xs:attribute type="xs:string" name="map-name" use="required"> - <xs:annotation> - <xs:documentation> - Name of a map where results will be put in. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="result-to-field"> - <xs:annotation> - <xs:documentation> - Specify the name of the field in the result and then the name of the field in the context you want to put it in, - and optionally the name in the map. - There's a field-map there. If you don't specify a field-name then the result-name will be used for the field-name, - that's the name of the variable that will be created in the current context for the value of that result. - </xs:documentation> - </xs:annotation> - <xs:complexType> - <xs:attributeGroup ref="attlist.result-to-field"/> - </xs:complexType> - </xs:element> - <xs:attributeGroup name="attlist.result-to-field"> - <xs:attribute type="xs:string" name="result-name" use="required"> - <xs:annotation> - <xs:documentation> - Name of the result. May be used for the field-name. If you don't specify a field-name, - this will be name of the variable that will be created in the current context for the value of that result. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="field"> - <xs:annotation><xs:documentation>Optional name of target field. If empty will default to result-name.</xs:documentation></xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="result-to-request"> + <xs:element name="field-to-result" substitutionGroup="EnvOperations"> <xs:annotation> <xs:documentation> - result-to-request is event specific. - It takes the result with the given name and puts it in a request attribute with the given name here. - Again the request-name is optional. - If you leave it off then it will put it in an attribute with the name of the result-name. + Copies a field to a service OUT attribute. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.result-to-request"/> + <xs:attribute type="xs:string" name="field" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field to copy from. The source of the assignment. + The operation does nothing if the field does not exist. + + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="result-name"> + <xs:annotation> + <xs:documentation> + The name of the result field to set. The target of the assignment. + Defaults to the value of the field attribute. + + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.result-to-request"> - <xs:attribute type="xs:string" name="result-name" use="required"> - <xs:annotation> - <xs:documentation> - Name of the result. May be used for the request attribute name. If you don't specify a request-name , - that's the name of the request attribute that will be created for the value of that result. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="request-name"> - <xs:annotation> - <xs:documentation> - Optionnal request name. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="result-to-session"> + + <xs:element name="field-to-session" substitutionGroup="EventOperations"> <xs:annotation> <xs:documentation> - Specify the name of the session attribute that you want it to put the value in. - If you don't specify one it will use the result-name. + Copies a field to a servlet session attribute. + Valid only when the simple-method is called as an event, it is ignored otherwise. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.result-to-session"/> + <xs:attribute type="xs:string" name="field" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field to copy from. The source of the assignment. + The operation does nothing if the field does not exist. + + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="session-name"> + <xs:annotation> + <xs:documentation> + The servlet session attribute name. The target of the assignment. + Defaults to the value of the field attribute. + + Optional. Attribute types: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.result-to-session"> - <xs:attribute type="xs:string" name="result-name" use="required"> - <xs:annotation> - <xs:documentation> - Name of the result. May be used for the session attribute name. If you don't specify a session-name, - that's the name of the session attribute that will be created for the value of that result. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="session-name"> - <xs:annotation> - <xs:documentation> - Optionnal session name. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="result-to-result"> - <xs:annotation> - <xs:documentation> - result-to-result is service specific (when the service is being called as a service). - - It will take the result of the service you're calling with the call service operation and it will put it in with the result of the current service. - So result-name is the name of the result in the service that was called using the call-service tag. - NOTE that these attributes are somewhat confusing: result-name is the name of the field in the result of this service call that the value comes FROM; - service-result-name is the name of the field in the result of this simple-method called as a service where the value goes TO; - in other words FROM result-name and TO service-result-name. - </xs:documentation> - </xs:annotation> - <xs:complexType> - <xs:attributeGroup ref="attlist.result-to-result"/> - </xs:complexType> - </xs:element> - <xs:attributeGroup name="attlist.result-to-result"> - <xs:attribute type="xs:string" name="result-name" use="required"> - <xs:annotation> - <xs:documentation> - Name of the field in the result of this service call that the value comes FROM. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="service-result-name"> - <xs:annotation> - <xs:documentation> - Name of the field in the result of this simple-method called as a service where the value goes TO. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="call-service-asynch" substitutionGroup="CallOperations"> + <xs:element name="first-from-list" substitutionGroup="EnvOperations"> <xs:annotation> <xs:documentation> - Calls a service asynchronously and ignores the result, so no return messages - are used; that doesn't mean no errors will result, but they would just be - system errors like database failures, etc. which all have system error messages. + Assigns the first (lowest order) entry in a list to a field. + If the list does not exist or is empty, assigns null to a field. + + Deprecated - use the set element. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.call-service-asynch"/> + <xs:attribute type="xs:string" name="entry" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field to set. The target of the assignment. + + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="list" use="required"> + <xs:annotation> + <xs:documentation> + The name of the list that contains the object to copy. + + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.call-service-asynch"> - <xs:attribute type="xs:string" name="service-name" use="required"> - <xs:annotation> - <xs:documentation> - Name of the service called asynchronously. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="in-map-name"> - <xs:annotation> - <xs:documentation> - The name of a map in the method environment to use as the input map. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="include-user-login" default="true"> - <xs:annotation> - <xs:documentation> - Defaults to "true". - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true"/> - <xs:enumeration value="false"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="script" substitutionGroup="CallOperations"> + + <xs:element name="list-to-list" substitutionGroup="EnvOperations"> <xs:annotation> <xs:documentation> - Runs an external script (minilang, bsh, groovy) from the expanded location provided. - Error messages go on the error list and are handled with the check-errors tag. + Copy a list to another list. </xs:documentation> </xs:annotation> - <xs:complexType mixed="true"> - <xs:attributeGroup ref="attlist.script"/> + <xs:complexType> + <xs:attribute type="xs:string" name="list" use="required"> + <xs:annotation> + <xs:documentation> + Name of the list to copy from. The operation does nothing if the list does not exist. + + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="to-list" use="required"> + <xs:annotation> + <xs:documentation> + Name of the list to copy to. If the list does not exist, one will be created. + + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.script"> - <xs:attribute type="xs:string" name="location"> - <xs:annotation> - <xs:documentation> - Script location (component://...) - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="error-list-name" default="error_list"> - <xs:annotation> - <xs:documentation> - The name of the list in the method environment to check for error messages. - Defaults to "error_list". - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="call-bsh" substitutionGroup="CallOperations"> - <xs:annotation> - <xs:documentation> - Runs an external bsh script from the classpath if resource is specified and - then runs the inlined bsh script if any is specified. - - The bsh context is the current simple-method environment including maps, lists - and special objects whose names are defined in the simple-method attributes. - The current env cannot be modified, but if a Map is returned by the bsh block - the entries in the map will be put into the current env. - - Error messages go on the error list and are handled with the check-errors tag. - </xs:documentation> - </xs:annotation> - <xs:complexType mixed="true"> - <xs:attributeGroup ref="attlist.call-bsh"/> - </xs:complexType> - </xs:element> - <xs:attributeGroup name="attlist.call-bsh"> - <xs:attribute type="xs:string" name="resource"> - <xs:annotation> - <xs:documentation> - Name of a properties file on the classpath. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="error-list-name" default="error_list"> - <xs:annotation> - <xs:documentation> - The name of the list in the method environment to check for error messages. - Defaults to "error_list". - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="call-simple-method" substitutionGroup="CallOperations"> + <xs:element name="map-to-map" substitutionGroup="EnvOperations"> <xs:annotation> <xs:documentation> - The call-simple-method tag calls another simple-method in the same context as the current one. - In other words the called simple-method will have the same environment as the calling simple-method, - including all environment fields, and either the event or service objects that the calling simple-method was called with. + Copies a map to another map. + If a target map is not specified, the source map is copied to the current + environment (memory space). </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.call-simple-method"/> + <xs:attribute type="xs:string" name="map" use="required"> + <xs:annotation> + <xs:documentation> + The name of the map to copy from. The operation does nothing if the map does not exist. + + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="to-map"> + <xs:annotation> + <xs:documentation> + The name of the map to copy to. If the target map does not exist, one will be created. + If this attribute is empty, the source map will be copied to the current environment. + + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.call-simple-method"> - <xs:attribute type="xs:string" name="xml-resource"> - <xs:annotation> - <xs:documentation> - The full path and filename on the classpath of the XML file which contains an external simple-method to execute. - This is only required if a simple-method in a different file is desired. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="method-name" use="required"> - <xs:annotation> - <xs:documentation> - The name of the simple-method to execute in the specified xml-resource, - or in the current XML file if no xml-resource is specified. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <!-- Operations to call Java methods and create Java objects --> - <xs:element name="call-object-method" substitutionGroup="CallOperations"> + + <xs:element name="now" substitutionGroup="OtherOperations"> <xs:annotation> <xs:documentation> - Calls a method on an existing object that exists in a field in the environment or in a map in the environment. - - The string and field sub-elements are passed to the method as arguments in the order they are specified. - If the sub-elements do not match the method arguments an error will be returned. - - The return value will be put in the named field if an value is returned and - if a field and optionally a map name are specified. + Sets a field to the current system time. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:choice minOccurs="0" maxOccurs="unbounded"> - <xs:element ref="string"> - <xs:annotation> - <xs:documentation> - Used to specify an inline String argument to the method call. - </xs:documentation> - </xs:annotation> - </xs:element> - <xs:element ref="field"/> - </xs:choice> - <xs:attributeGroup ref="attlist.call-object-method"/> + <xs:attribute ref="field" use="required" /> + <xs:attribute name="type"> + <xs:annotation> + <xs:documentation> + The field data type. Defaults to "java.sql.Timestamp". + + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="java.sql.Timestamp"/> + <xs:enumeration value="java.sql.Date" /> + <xs:enumeration value="java.sql.Time" /> + <xs:enumeration value="java.util.Date" /> + <xs:enumeration value="java.lang.Long" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.call-object-method"> - <xs:attribute type="xs:string" name="obj-field" use="required"> - <xs:annotation> - <xs:documentation> - The name of the field the object is in that has the method to be called. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="method-name" use="required"> - <xs:annotation> - <xs:documentation> - The name of the method to call on the given object. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="ret-field"> - <xs:annotation> - <xs:documentation> - The name of the field to put the result in. - If not specified any return value will be ignored. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="call-class-method" substitutionGroup="CallOperations"> + + <xs:element name="now-date-to-env" substitutionGroup="OtherOperations"> <xs:annotation> <xs:documentation> - Calls a static method on a class. - - The string and field sub-elements are passed to the method as arguments in the order they are specified. - If the sub-elements do not match the method arguments an error will be returned. - - The return value will be put in the named field if an value is returned and if a - field and optionally a map name are specified. + Sets a field to a java.sql.Date object initialized to the current system time. + Deprecated - use now. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:choice minOccurs="0" maxOccurs="unbounded"> - <xs:element ref="string"> - <xs:annotation> - <xs:documentation> - Used to specify an inline String argument to the method call. - </xs:documentation> - </xs:annotation> - </xs:element> - <xs:element ref="field"> - <xs:annotation> - <xs:documentation> - Used to specify a field to be passed as an argument to the constructor method. - The field can be in a map in the environment or if no map-name is specified then - the field will come directly from the environment. - </xs:documentation> - </xs:annotation> - </xs:element> - </xs:choice> - <xs:attributeGroup ref="attlist.call-class-method"/> + <xs:attribute ref="field" use="required" /> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.call-class-method"> - <xs:attribute type="xs:string" name="class-name" use="required"> - <xs:annotation> - <xs:documentation> - The name of the class to call the static method on. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="method-name" use="required"> - <xs:annotation> - <xs:documentation> - The name of the static method to call on the given class. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="ret-field"> - <xs:annotation> - <xs:documentation> - The name of the field to put the result in. If not specified any return value will be ignored. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="create-object" substitutionGroup="CallOperations"> + + <xs:element name="now-timestamp" substitutionGroup="OtherOperations"> <xs:annotation> <xs:documentation> - Creates an object of the given class and if the field attribute is specified saves it in that field. - The string and field sub-elements are passed to the constructor method as arguments in the order they are specified. - If the sub-elements do not match the constructor method arguments an error will be returned. + Sets a field to a java.sql.Timestamp object initialized to the current system time. + Deprecated - use now. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:choice minOccurs="0" maxOccurs="unbounded"> - <xs:element ref="field"> - <xs:annotation> - <xs:documentation> - Used to specify a field to be passed as an argument to the constructor method. - The field can be in a map in the environment or if no map-name is specified then - the field will come directly from the environment. - </xs:documentation> - </xs:annotation> - </xs:element> - <xs:element ref="string"> - <xs:annotation> - <xs:documentation> - Used to specify an inline String argument to the method call. - </xs:documentation> - </xs:annotation> - </xs:element> - </xs:choice> - <xs:attributeGroup ref="attlist.create-object"/> + <xs:attribute ref="field" use="required" /> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.create-object"> - <xs:attribute type="xs:string" name="class-name" use="required"> - <xs:annotation> - <xs:documentation> - The name of the class to construct an object of. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="field"> - <xs:annotation> - <xs:documentation> - The name of a field to put the new object in. - If not specified the object will be created but ignored after that. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <!-- Operations to copy map fields in the current env to context specific containers --> - <!-- Event specific operations --> - <xs:element name="field-to-request" substitutionGroup="EventOperations"> + + <xs:element name="order-by"> <xs:annotation> <xs:documentation> - The field-to-request tag copies a field from a map to the specified servlet request attribute. - The tag is only used when the simple-method is called as an event, it is ignored otherwise. + Declares a field or map key to sort on. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.field-to-request"/> + <xs:attribute name="field-name" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field or map key to sort on. + + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.field-to-request"> - <xs:attribute type="xs:string" name="field" use="required"> - <xs:annotation><xs:documentation>The context name of the field to use.</xs:documentation></xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="request-name"> - <xs:annotation><xs:documentation>The name of the request attribute to use. Defaults to the value of field attribute.</xs:documentation></xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="field-to-session" substitutionGroup="EventOperations"> + + <xs:element name="order-map-list" substitutionGroup="EnvOperations"> <xs:annotation> <xs:documentation> - The field-to-session tag copies a field from a map to the specified servlet session attribute. - The tag is only used when the simple-method is called as an event, it is ignored otherwise. + Sorts a list of maps. Maps are sorted by the keys specified in the order-by sub-elements. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.field-to-session"/> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="order-by" /> + </xs:sequence> + <xs:attribute type="xs:string" name="list" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field containing the list to be sorted. The operation does nothing if the list is not found. + [... 6948 lines stripped ...] |
Free forum by Nabble | Edit this page |