📄 simple-methods.dtd
字号:
<?xml version="1.0" encoding="UTF-8"?>
<!--
To refer to this DTD in your XML file, use the following declarations:
To use only the simple-methods element as the root node, use the following:
<!DOCTYPE simple-methods PUBLIC "-//OFBiz//DTD Simple Methods//EN" "http://www.ofbiz.org/dtds/simple-methods.dtd">
To use only the simple-map-processors element as the root node, use the following:
<!DOCTYPE simple-map-processors PUBLIC "-//OFBiz//DTD Simple Methods//EN" "http://www.ofbiz.org/dtds/simple-methods.dtd">
-->
<!--
* Copyright (c) 2001 The Open For Business Project - www.ofbiz.org
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*This is the DTD for the Open For Business Simple Event definition XML file.
-->
<!--
==================================================
========== The Simple Methods Section ==========
==================================================
(see further down for the Simple Map Processor Section)
-->
<!ENTITY % CallOperations "call-map-processor | set-service-fields | call-service | call-service-asynch | call-bsh | call-simple-method | check-errors | add-error | return">
<!ENTITY % CallJavaOperations "call-object-method | call-class-method | create-object">
<!ENTITY % EventOperations "field-to-request | field-to-session | request-to-field | request-parameters-to-list | session-to-field | webapp-property-to-field">
<!ENTITY % ServiceOperations "field-to-result">
<!ENTITY % EnvOperations "map-to-map | field-to-field | field-to-list | list-to-list | env-to-env | env-to-field | field-to-env | string-append | string-to-field | string-to-list | to-string | clear-field | iterate | iterate-map | first-from-list">
<!ENTITY % EntityMiscOperations "now-timestamp-to-env | now-date-to-env | sequenced-id-to-env | make-next-seq-id | set-current-user-login">
<!ENTITY % EntityFindOperations "find-by-primary-key | find-by-and | get-related-one | get-related | filter-list-by-and | filter-list-by-date | order-value-list">
<!ENTITY % EntityValueOperations "make-value | clone-value | create-value | store-value | refresh-value | remove-value | remove-related | remove-by-and | clear-cache-line | clear-entity-caches | set-pk-fields | set-nonpk-fields">
<!ENTITY % EntityListOperations "store-list | remove-list">
<!ENTITY % EntityTxOperations "transaction-begin | transaction-commit | transaction-rollback">
<!ENTITY % IfOperations "if | if-validate-method | if-compare | if-compare-field | if-regexp | if-empty | if-not-empty | if-has-permission | check-permission | check-id">
<!ENTITY % OtherOperations "property-to-field | log | calculate">
<!ENTITY % SimpleMethodOperations "%CallOperations; | %CallJavaOperations; | %EventOperations; |
%ServiceOperations; | %EnvOperations; | %EntityMiscOperations; | %EntityFindOperations; |
%EntityValueOperations; | %EntityListOperations; | %EntityTxOperations; | %IfOperations; | %OtherOperations;">
<!ELEMENT field EMPTY>
<!ATTLIST field
field-name CDATA #REQUIRED
map-name CDATA #IMPLIED
type CDATA #IMPLIED
>
<!ELEMENT string (#PCDATA)>
<!ATTLIST string
value CDATA #IMPLIED
>
<!ELEMENT simple-methods ( simple-method+ )>
<!--
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.
-->
<!ELEMENT simple-method ( (%SimpleMethodOperations;)* )>
<!ATTLIST simple-method
method-name CDATA #REQUIRED
short-description CDATA #REQUIRED
login-required ( true | false ) "true"
use-transaction ( true | false ) "true"
default-error-code CDATA "error"
default-success-code CDATA "success"
parameter-map-name CDATA "parameters"
event-request-object-name CDATA "request"
event-response-object-name CDATA "response"
event-response-code-name CDATA "_response_code_"
event-error-message-name CDATA "_error_message_"
event-event-message-name CDATA "_event_message_"
service-response-message-name CDATA "responseMessage"
service-error-message-name CDATA "errorMessage"
service-error-message-list-name CDATA "errorMessageList"
service-error-message-map-name CDATA "errorMessageMap"
service-success-message-name CDATA "successMessage"
service-success-message-list-name CDATA "successMessageList"
locale-name CDATA "locale"
delegator-name CDATA "delegator"
security-name CDATA "security"
dispatcher-name CDATA "dispatcher"
user-login-name CDATA "userLogin"
>
<!--
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
-->
<!ELEMENT call-map-processor ( simple-map-processor? )>
<!ATTLIST call-map-processor
xml-resource CDATA #IMPLIED
processor-name CDATA #IMPLIED
in-map-name CDATA #REQUIRED
out-map-name CDATA #REQUIRED
error-list-name CDATA "error_list"
>
<!ELEMENT set-service-fields EMPTY>
<!ATTLIST set-service-fields
service-name CDATA #REQUIRED
map-name CDATA #REQUIRED
to-map-name CDATA #REQUIRED
>
<!--
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.
-->
<!ELEMENT call-service ( error-prefix?, error-suffix?, success-prefix?, success-suffix?, message-prefix?, message-suffix?, default-message?,
(results-to-map | result-to-field | result-to-request | result-to-session | result-to-result)* )>
<!ATTLIST call-service
service-name CDATA #REQUIRED
in-map-name CDATA #IMPLIED
include-user-login ( true | false ) "true"
break-on-error ( true | false ) "true"
error-code CDATA "error"
success-code CDATA "success"
>
<!ELEMENT error-prefix (#PCDATA)>
<!ATTLIST error-prefix
resource CDATA #IMPLIED
property CDATA #IMPLIED
>
<!ELEMENT error-suffix (#PCDATA)>
<!ATTLIST error-suffix
resource CDATA #IMPLIED
property CDATA #IMPLIED
>
<!ELEMENT success-prefix (#PCDATA)>
<!ATTLIST success-prefix
resource CDATA #IMPLIED
property CDATA #IMPLIED
>
<!ELEMENT success-suffix (#PCDATA)>
<!ATTLIST success-suffix
resource CDATA #IMPLIED
property CDATA #IMPLIED
>
<!ELEMENT message-prefix (#PCDATA)>
<!ATTLIST message-prefix
resource CDATA #IMPLIED
property CDATA #IMPLIED
>
<!ELEMENT message-suffix (#PCDATA)>
<!ATTLIST message-suffix
resource CDATA #IMPLIED
property CDATA #IMPLIED
>
<!ELEMENT default-message (#PCDATA)>
<!ATTLIST default-message
resource CDATA #IMPLIED
property CDATA #IMPLIED
>
<!ELEMENT results-to-map EMPTY>
<!ATTLIST results-to-map
map-name CDATA #REQUIRED
>
<!ELEMENT result-to-field EMPTY>
<!ATTLIST result-to-field
result-name CDATA #REQUIRED
map-name CDATA #IMPLIED
field-name CDATA #IMPLIED
>
<!ELEMENT result-to-request EMPTY>
<!ATTLIST result-to-request
result-name CDATA #REQUIRED
request-name CDATA #IMPLIED
>
<!ELEMENT result-to-session EMPTY>
<!ATTLIST result-to-session
result-name CDATA #REQUIRED
session-name CDATA #IMPLIED
>
<!ELEMENT result-to-result EMPTY>
<!ATTLIST result-to-result
result-name CDATA #REQUIRED
service-result-name CDATA #IMPLIED
>
<!--
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.
-->
<!ELEMENT call-service-asynch EMPTY>
<!ATTLIST call-service-asynch
service-name CDATA #REQUIRED
in-map-name CDATA #IMPLIED
include-user-login ( true | false ) "true"
>
<!--
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.
-->
<!ELEMENT call-bsh (#PCDATA)>
<!ATTLIST call-bsh
resource CDATA #IMPLIED
error-list-name CDATA "error_list"
>
<!ELEMENT call-simple-method EMPTY>
<!ATTLIST call-simple-method
xml-resource CDATA #IMPLIED
method-name CDATA #REQUIRED
>
<!ELEMENT check-errors ( error-prefix?, error-suffix?, message-prefix?, message-suffix? )>
<!ATTLIST check-errors
error-code CDATA "error"
error-list-name CDATA "error_list"
>
<!ELEMENT add-error ( fail-message | fail-property )>
<!ATTLIST add-error
error-list-name CDATA "error_list"
>
<!ELEMENT return EMPTY>
<!ATTLIST return
response-code CDATA "success"
>
<!-- Operations to call Java methods and create Java objects -->
<!ELEMENT call-object-method ( ( string | field )* )>
<!ATTLIST call-object-method
obj-field-name CDATA #REQUIRED
obj-map-name CDATA #IMPLIED
method-name CDATA #REQUIRED
ret-field-name CDATA #IMPLIED
ret-map-name CDATA #IMPLIED
>
<!ELEMENT call-class-method ( ( string | field )* )>
<!ATTLIST call-class-method
class-name CDATA #REQUIRED
method-name CDATA #REQUIRED
ret-field-name CDATA #IMPLIED
ret-map-name CDATA #IMPLIED
>
<!ELEMENT create-object ( ( string | field )* )>
<!ATTLIST create-object
class-name CDATA #REQUIRED
field-name CDATA #IMPLIED
map-name CDATA #IMPLIED
>
<!-- Operations to copy map fields in the current env to context specific containers -->
<!-- Event specific operations -->
<!ELEMENT field-to-request EMPTY>
<!ATTLIST field-to-request
map-name CDATA #IMPLIED
field-name CDATA #REQUIRED
request-name CDATA #IMPLIED
>
<!ELEMENT field-to-session EMPTY>
<!ATTLIST field-to-session
map-name CDATA #IMPLIED
field-name CDATA #REQUIRED
session-name CDATA #IMPLIED
>
<!ELEMENT request-to-field EMPTY>
<!ATTLIST request-to-field
map-name CDATA #IMPLIED
field-name CDATA #REQUIRED
default CDATA #IMPLIED
request-name CDATA #IMPLIED
>
<!ELEMENT request-parameters-to-list EMPTY>
<!ATTLIST request-parameters-to-list
request-name CDATA #REQUIRED
list-name CDATA #IMPLIED
>
<!ELEMENT session-to-field EMPTY>
<!ATTLIST session-to-field
map-name CDATA #IMPLIED
field-name CDATA #REQUIRED
default CDATA #IMPLIED
session-name CDATA #IMPLIED
>
<!ELEMENT webapp-property-to-field EMPTY>
<!ATTLIST webapp-property-to-field
resource CDATA #REQUIRED
property CDATA #REQUIRED
default CDATA #IMPLIED
field-name CDATA #REQUIRED
session-name CDATA #IMPLIED
>
<!-- Service specific operations -->
<!ELEMENT field-to-result EMPTY>
<!ATTLIST field-to-result
map-name CDATA #IMPLIED
field-name CDATA #REQUIRED
result-name CDATA #IMPLIED
>
<!-- Environment specific operations -->
<!ELEMENT map-to-map EMPTY>
<!ATTLIST map-to-map
map-name CDATA #REQUIRED
to-map-name CDATA #IMPLIED
>
<!ELEMENT field-to-field EMPTY>
<!ATTLIST field-to-field
map-name CDATA #IMPLIED
field-name CDATA #REQUIRED
to-map-name CDATA #IMPLIED
to-field-name CDATA #IMPLIED
>
<!ELEMENT field-to-list EMPTY>
<!ATTLIST field-to-list
map-name CDATA #IMPLIED
field-name CDATA #REQUIRED
list-name CDATA #REQUIRED
>
<!ELEMENT list-to-list EMPTY>
<!ATTLIST list-to-list
list-name CDATA #REQUIRED
to-list-name CDATA #REQUIRED
>
<!ELEMENT env-to-env EMPTY>
<!ATTLIST env-to-env
env-name CDATA #REQUIRED
to-env-name CDATA #REQUIRED
>
<!ELEMENT env-to-field EMPTY>
<!ATTLIST env-to-field
env-name CDATA #REQUIRED
field-name CDATA #IMPLIED
map-name CDATA #IMPLIED
>
<!ELEMENT field-to-env EMPTY>
<!ATTLIST field-to-env
field-name CDATA #REQUIRED
map-name CDATA #IMPLIED
env-name CDATA #IMPLIED
>
<!-- NOTE: the prefix and suffix will only be used IFF the current string and the string to be appended are both not empty -->
<!ELEMENT string-append EMPTY>
<!ATTLIST string-append
field-name CDATA #REQUIRED
map-name CDATA #IMPLIED
string CDATA #REQUIRED
arg-list-name CDATA #IMPLIED
prefix CDATA #IMPLIED
suffix CDATA #IMPLIED
>
<!ELEMENT string-to-field EMPTY>
<!ATTLIST string-to-field
string CDATA #REQUIRED
map-name CDATA #IMPLIED
field-name CDATA #REQUIRED
arg-list-name CDATA #IMPLIED
>
<!ELEMENT string-to-list EMPTY>
<!ATTLIST string-to-list
string CDATA #REQUIRED
list-name CDATA #REQUIRED
arg-list-name CDATA #IMPLIED
>
<!ELEMENT to-string EMPTY>
<!ATTLIST to-string
map-name CDATA #IMPLIED
field-name CDATA #REQUIRED
format CDATA #IMPLIED
numeric-padding CDATA #IMPLIED
>
<!ELEMENT clear-field EMPTY>
<!ATTLIST clear-field
map-name CDATA #IMPLIED
field-name CDATA #REQUIRED
>
<!ELEMENT iterate ( (%SimpleMethodOperations;)* )>
<!ATTLIST iterate
entry-name CDATA #REQUIRED
list-name CDATA #REQUIRED
>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -