You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2012/05/04 15:55:09 UTC
svn commit: r1333964 - /ofbiz/site/dtds/simple-methods-v2.xsd
Author: adrianc
Date: Fri May 4 13:55:08 2012
New Revision: 1333964
URL: http://svn.apache.org/viewvc?rev=1333964&view=rev
Log:
Updated Mini-language schema.
Modified:
ofbiz/site/dtds/simple-methods-v2.xsd
Modified: ofbiz/site/dtds/simple-methods-v2.xsd
URL: http://svn.apache.org/viewvc/ofbiz/site/dtds/simple-methods-v2.xsd?rev=1333964&r1=1333963&r2=1333964&view=diff
==============================================================================
--- ofbiz/site/dtds/simple-methods-v2.xsd (original)
+++ ofbiz/site/dtds/simple-methods-v2.xsd Fri May 4 13:55:08 2012
@@ -117,45 +117,44 @@ under the License.
<xs:element name="field">
<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.
-
- 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.
+ Specifies an environment field to be passed as an argument to a method call.
</xs:documentation>
</xs:annotation>
<xs:complexType>
- <xs:attributeGroup ref="attlist.field"/>
+ <xs:attribute type="xs:string" name="field" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the environment field to use.
+ <br/><br/>
+ Required. Attribute type: expression.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="type">
+ <xs:annotation>
+ <xs:documentation>
+ The Java class of the argument. Defaults to java.lang.String.
+ 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.
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
</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:annotation>
<xs:documentation>
- String of type java.lang.String. Inserts the value of the inline string where specified.
+ Specifies a java.lang.String to be passed as an argument to a method call.
+ The String can be contained in the value attribute or in the element body.
</xs:documentation>
</xs:annotation>
- <xs:complexType mixed="true">
- <xs:attributeGroup ref="attlist.string"/>
+ <xs:complexType>
+ <xs:attribute type="xs:string" name="value" />
</xs:complexType>
</xs:element>
- <xs:attributeGroup name="attlist.string">
- <xs:attribute type="xs:string" name="value"/>
- </xs:attributeGroup>
<xs:element name="simple-methods">
<xs:annotation>
<xs:documentation>
@@ -164,217 +163,270 @@ under the License.
</xs:annotation>
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" ref="simple-method">
- <xs:annotation>
- <xs:documentation>
- Opening tag of a simple-method definition.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
+ <xs:element maxOccurs="unbounded" ref="simple-method"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="simple-method">
<xs:annotation>
<xs:documentation>
+ Contains a block of Mini-language code.
+ <br/><br/>
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.
-
- 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.
-
- The field-to-result elements will be ignored in an event context, ie only used in a service.
-
- 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:documentation>
</xs:annotation>
<xs:complexType>
- <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllOperations"/>
- <xs:attributeGroup ref="attlist.simple-method"/>
- </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" (defauts 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" (defauts 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. (defauts 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. (defauts 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.
- (defauts 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 (defauts 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 (defauts 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 (defauts 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 (defauts 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 (defauts 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 (defauts 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 (defauts 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 (defauts 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 (defauts 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 (defauts 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 (defauts 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 (defauts 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 (defauts 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 (defauts 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 (defauts 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 (defauts to "userLogin")
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:attributeGroup>
+ <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllOperations" />
+ <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.
+ <br/><br/>
+ Required. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="short-description">
+ <xs:annotation>
+ <xs:documentation>
+ A short description of the method - used for documentation.
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="login-required">
+ <xs:annotation>
+ <xs:documentation>
+ Require a user login to run this method. Defaults to "true".
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </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">
+ <xs:annotation>
+ <xs:documentation>
+ Create a transaction if none exists for this thread. Defaults to "true".
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </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">
+ <xs:annotation>
+ <xs:documentation>
+ The default error return code. Defauts to "error".
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="default-success-code">
+ <xs:annotation>
+ <xs:documentation>
+ The default success return code. Defauts to "success".
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="parameter-map-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the field containing the parameters map. Defaults to "parameters".
+ <br/><br/>
+ When the simple method is invoked as an event, the parameters map contains the request parameters.
+ When the simple method is invoked as a service, the parameters map contains the service IN attributes.
+ The parameters map should not be modified, but modification is permitted for backward compatibility.
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="event-request-object-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the field containing the javax.servlet.ServletRequest object. Defaults to "request".
+ <br/><br/>
+ Used when the simple method is invoked as an event, it is ignored otherwise.
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="event-response-object-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the field containing the javax.servlet.ServletResponse object. Defaults to "response".
+ <br/><br/>
+ Used when the simple method is invoked as an event, it is ignored otherwise.
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="event-response-code-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the field containing the event response code. Defaults to "_response_code_".
+ <br/><br/>
+ Used when the simple method is invoked as an event, it is ignored otherwise.
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="event-error-message-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the field containing the event error message. Defaults to "_error_message_".
+ <br/><br/>
+ Used when the simple method is invoked as an event, it is ignored otherwise.
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="event-event-message-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the field containing the event message. Defaults to "_event_message_".
+ <br/><br/>
+ Used when the simple method is invoked as an event, it is ignored otherwise.
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="service-response-message-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the field containing the service response message. Defaults to "responseMessage".
+ <br/><br/>
+ Used when the simple method is invoked as a service, it is ignored otherwise.
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="service-error-message-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the field containing the service error message. Defaults to "errorMessage".
+ <br/><br/>
+ Used when the simple method is invoked as a service, it is ignored otherwise.
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="service-error-message-list-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the field containing the service error message list. Defaults to "errorMessageList".
+ <br/><br/>
+ Used when the simple method is invoked as a service, it is ignored otherwise.
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="service-error-message-map-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the field containing the service error message map. Defaults to "errorMessageMap".
+ <br/><br/>
+ Used when the simple method is invoked as a service, it is ignored otherwise.
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="service-success-message-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the field containing the service success message. Defaults to "successMessage".
+ <br/><br/>
+ Used when the simple method is invoked as a service, it is ignored otherwise.
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="service-success-message-list-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the field containing the service success message list. Defaults to "successMessageList".
+ <br/><br/>
+ Used when the simple method is invoked as a service, it is ignored otherwise.
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="locale-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the field containing the java.util.Locale object. Defaults to "locale".
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="delegator-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the field containing the org.ofbiz.entity.Delegator object. Defaults to "delegator".
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="security-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the field containing the org.ofbiz.security.Security object. Defaults to "security".
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="dispatcher-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the field containing the org.ofbiz.service.LocalDispatcher object. Defaults to "dispatcher".
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="user-login-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the field containing the UserLogin GenericValue. Defaults to "userLogin".
+ <br/><br/>
+ Optional. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
<xs:element name="call-map-processor" substitutionGroup="CallOperations">
<xs:annotation>
<xs:documentation>
@@ -854,8 +906,8 @@ under the License.
<xs:element name="script" substitutionGroup="CallOperations">
<xs:annotation>
<xs:documentation>
- Runs an external script or a short inline script (scriptlet).
- Error messages go on the error list and are handled with the check-errors tag.
+ Runs an external script or a short inline script (scriptlet). The scriptlet can be
+ included in the script attribute or in the element body.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
@@ -885,39 +937,24 @@ under the License.
<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.
+ Executes a BSH script. Deprecated - replace with <script>.
+ <br/><br/>
+ The script can be contained in a Java resource, or a short
+ script can be included in the element body.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
- <xs:attributeGroup ref="attlist.call-bsh"/>
+ <xs:attribute type="xs:string" name="resource">
+ <xs:annotation>
+ <xs:documentation>
+ A Java resource that contains the script.
+ <br/><br/>
+ Required if the element body is empty. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
</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:annotation>
<xs:documentation>
@@ -982,110 +1019,78 @@ under the License.
<xs:element name="call-object-method" substitutionGroup="CallOperations">
<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.
-
+ Calls a method on an existing Java object. Deprecated - replace with <script>.
+ <br/><br/>
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.
+ If the method returns a value, the value will be put in the named field.
</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:element ref="string" />
+ <xs:element ref="field" />
</xs:choice>
- <xs:attributeGroup ref="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: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:annotation>
<xs:documentation>
- Calls a static method on a class.
-
+ Calls a static method on a Java class. Deprecated - replace with <script>.
+ <br/><br/>
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.
+ If the method returns a value, the value will be put in the named field.
</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:element ref="string"/>
+ <xs:element ref="field"/>
</xs:choice>
- <xs:attributeGroup ref="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: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:annotation>
<xs:documentation>
@@ -3560,62 +3565,43 @@ under the License.
<xs:element name="check-errors" substitutionGroup="ControlOperations">
<xs:annotation>
<xs:documentation>
- The message lists from invoking are not checked until the check-errors tag is used.
- The named list is checked and if it contains any messages they are put in the servlet
- request object and the specified error code is returned to the control servlet.
+ Halts script execution if errors were encountered in previous operations.
</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="message-prefix"/>
- <xs:element minOccurs="0" ref="message-suffix"/>
- </xs:sequence>
- <xs:attributeGroup ref="attlist.check-errors"/>
+ <xs:attribute type="xs:string" name="error-code">
+ <xs:annotation>
+ <xs:documentation>
+ The error code to return to the calling process. Defaults to "error".
+ <br/><br/>
+ Optional. Attribute type: constant+expr
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
</xs:complexType>
</xs:element>
- <xs:attributeGroup name="attlist.check-errors">
- <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="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="add-error" substitutionGroup="ControlOperations">
<xs:annotation>
<xs:documentation>
- Adds an error message with to the given error list from either an inline message or a message from a properties file.
+ 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:element ref="fail-message" />
+ <xs:element ref="fail-property" />
</xs:choice>
- <xs:attributeGroup ref="attlist.add-error"/>
+ <xs:attribute type="xs:string" name="error-list-name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the error message list. Defaults to "error_list".
+ <br/><br/>
+ Optional. Attribute type: constant
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
</xs:complexType>
</xs:element>
- <xs:attributeGroup name="attlist.add-error">
- <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="break" substitutionGroup="ControlOperations">
<xs:annotation>
<xs:documentation>
@@ -4419,61 +4405,44 @@ under the License.
<xs:element name="log" substitutionGroup="OtherOperations">
<xs:annotation>
<xs:documentation>
- The log tag logs a message used the OFBiz Debug class, which uses Log4J to log to the console, a file, or some other location.
- The message is a concatenation of the message attribute and then all of the field and string sub-element values in the order they are specified.
+ Logs a message.
</xs:documentation>
</xs:annotation>
<xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="field">
- <xs:annotation>
- <xs:documentation>
- Inserts the value of the field into the message where specified.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element ref="string">
- <xs:annotation>
- <xs:documentation>
- Inserts the value of the inline string into the message where specified.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:choice>
- <xs:attributeGroup ref="attlist.log"/>
+ <xs:attribute name="level" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ The logging/debug level to use.
+ Must be one of the following: verbose | timing | info | important | warning | error | fatal | always.
+ Defaults to "info".
+ <br/><br/>
+ Required. Attribute type: constant.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="info" />
+ <xs:enumeration value="verbose" />
+ <xs:enumeration value="timing" />
+ <xs:enumeration value="important" />
+ <xs:enumeration value="warning" />
+ <xs:enumeration value="error" />
+ <xs:enumeration value="fatal" />
+ <xs:enumeration value="always" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="message" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ The message to log.
+ <br/><br/>
+ Required. Attribute type: constant+expr.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
</xs:complexType>
</xs:element>
- <xs:attributeGroup name="attlist.log">
- <xs:attribute name="level" use="required">
- <xs:annotation>
- <xs:documentation>
- The logging/debug level to use.
- Must be one of the following: verbose | timing | info | important | warning | error | fatal | always.
- These are the standard OFBiz logging levels.
- </xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="verbose"/>
- <xs:enumeration value="timing"/>
- <xs:enumeration value="info"/>
- <xs:enumeration value="important"/>
- <xs:enumeration value="warning"/>
- <xs:enumeration value="error"/>
- <xs:enumeration value="fatal"/>
- <xs:enumeration value="always"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute type="xs:string" name="message">
- <xs:annotation>
- <xs:documentation>
- A shortcut for simple messages.
- If used along with field and/or string sub-elements the inline string in the message will come first.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:attributeGroup>
<xs:element name="now" substitutionGroup="OtherOperations">
<xs:annotation>
<xs:documentation>
@@ -5305,22 +5274,21 @@ under the License.
<xs:element name="fail-message">
<xs:annotation>
<xs:documentation>
- Used to specify an inline message. Has one attribute called 'message'.
+ Used to specify an error message.
</xs:documentation>
</xs:annotation>
<xs:complexType>
- <xs:attributeGroup ref="attlist.fail-message"/>
+ <xs:attribute type="xs:string" name="message" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ The error message text.
+ <br/><br/>
+ Required. Attribute type: constant+expr
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
</xs:complexType>
</xs:element>
- <xs:attributeGroup name="attlist.fail-message">
- <xs:attribute type="xs:string" name="message" use="required">
- <xs:annotation>
- <xs:documentation>
- Literal or flexible string using ${} syntax.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:attributeGroup>
<xs:element name="fail-property">
<xs:annotation>
<xs:documentation>
@@ -5329,23 +5297,24 @@ under the License.
</xs:documentation>
</xs:annotation>
<xs:complexType>
- <xs:attributeGroup ref="attlist.fail-property"/>
+ <xs:attribute type="xs:string" name="resource" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ The name of a properties file on the classpath.
+ <br/><br/>
+ 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.
+ <br/><br/>
+ Required. Attribute type: constant
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
</xs:complexType>
</xs:element>
- <xs:attributeGroup name="attlist.fail-property">
- <xs:attribute type="xs:string" name="resource" use="required">
- <xs:annotation>
- <xs:documentation>
- Name of a properties file on the classpath.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute type="xs:string" name="property" use="required">
- <xs:annotation>
- <xs:documentation>
- Name of the property in the properties file qualifed by 'resource'.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:attributeGroup>
</xs:schema>