Message DSL
Contents
Purpose
The Message DSL contains all defined message outputs that either will be shown in the application as reponses and notifications (eg. Pop-Up Dialog), or redirected instead as console output (later also possibly persisted in log-files) with a selected list of severity level reports; both resulting of user interactions with the application.
Overview
Message Model Files
The Message DSL model unifies the content of all possible output messages and makes them available for other DSL models such as Action DSL.
Message model files are made up of the following sections:
- Package declaration: The message model file must have a unique fully qualified name that can be specified with the keyword package at the beginning of the file.
- Category section: The category section allows you to group a set of messages and in so forth defines different batches or categories (groups) of different set of messages.
- Message section: The message section contains the body and content of each message.
package
With the keyword package followed by a qualified name, you define the root element that contains all the other elements. A model can contain multiple packages.
► Syntax:
package <package name>[{
category <category name> {
message <message name> {
[ parameter { <parameter-list> } ]
[ severity { <severity-option-list> } ]
output {<output-option> “message text”}
}
message <another message name> { ... }
message <another message name> { ... }
message <another message name> { ... }
}
category <another category name> { ... }
} ]
category
With the keyword category followed by an identifier name, you are able to define a group of messages, which can be referenced in other DSL’s via its fully qualified name. It is the first reference level before accessing the messages themselves.
► Syntax:
package <package name>[{
category <category name> { ... }
category <one category name> { ... }
category <another category name> { ... }
} ]
► Example:
package net.osbee.sample.foodmart.messages {
category Guest { ... }
category Employee { ... }
category Cars { ... }
category Guest { ... }
category Information { ... }
}
Please note that at least one category has to be defined in order to create and/or show messages.
message
With the keyword message followed by a message name identifier you are able to define the basic message structure itself within a group of messages (message category).
► Syntax:
package <package name>[{
category <category name> {
message <message name> {
[ parameter { <parameter-list> } ]
[ severity { <severity-option-list> } ]
output {<output-option> “message text”}
}
message <one message name> { ... }
message <another message name> { ... }
message <and another message name> { ... }
}
category <another category name> { ... }
} ]
In order to create messages, you must define their output{…}
block, which specifies the content of the message that has to be shown in the application, and if needed can also be logged to the console.
output
all
log
show
parameter
- Boolean
- Class
- Double
- Exception
- Int
- Object
- String
severity
- Log: log-debug | log-error | log-info | log-trace | log-warn
- Show: show-error | show-info | show-warn
Copyright Notice
All rights are reserved by Compex Systemhaus GmbH. In particular, duplications, translations, microfilming, saving and processing in electronic systems are protected by copyright. Use of this manual is only authorized with the permission of Compex Systemhaus GmbH. Infringements of the law shall be punished in accordance with civil and penal laws. We have taken utmost care in putting together texts and images. Nevertheless, the possibility of errors cannot be completely ruled out. The Figures and information in this manual are only given as approximations unless expressly indicated as binding. Amendments to the manual due to amendments to the standard software remain reserved. Please note that the latest amendments to the manual can be accessed through our helpdesk at any time. The contractually agreed regulations of the licensing and maintenance of the standard software shall apply with regard to liability for any errors in the documentation. Guarantees, particularly guarantees of quality or durability can only be assumed for the manual insofar as its quality or durability are expressly stipulated as guaranteed. If you would like to make a suggestion, the Compex Team would be very pleased to hear from you.
(c) 2016-2024 Compex Systemhaus GmbH