3.6.2Stereotyped services
BLU AGETM - BLU AGE 2009 EDITION
3.6.2Stereotyped services
Services only contain one method. They follow an implementation which is pre-defined in the target application architecture. According to the interface stereotype, the method follows some rules.
List of stereotypes applicable to modeling services and rules
- create
Services stereotyped “Create” inserts a new entry of the input object into database. The method must have a BO as a parameter (multiplicity: 1 or more), and a boolean return type.
- create_all
Services stereotyped “Create all” inserts new entries of the input List into database. The method must have a List as a parameter, and a boolean return type. The “BO” tagged value must be filled with a business object type.
- update
Services stereotyped “Update” updates the entry corresponding to the input object in database. The method must have a BO as a parameter (multiplicity: 1 or more), and a boolean return type.
- update _all
Services stereotyped “Update all” updates all the entries corresponding to the input List in database. The method must have List as a parameter, and a boolean return type. The “BO” tagged value must be assigned a business object type.
- delete
Services stereotyped “Delete” delete the entry corresponding to the input object from database. The method must have a BO as a parameter (multiplicity: 1 or more), and a boolean return type.
- delete _all
Services stereotyped “Delete all” delete the entries corresponding to the input List from database. The method must have a list as a parameter, and a boolean return type The “BO” tagged value must be filled with a business object type.
- find_by_id
Services stereotyped “Find_by_id” search in database for the entry with the same identifier as the input object. The method must have a BO as a parameter and the same BO type as a return type.
- find_all
Services stereotyped “Find_all” search in database for all the entries in a table. The method must not have an input parameter and be a list return type. The “BO” tagged value must be filled with a business object type (corresponding to the searched table).
- find_by_properties
Services stereotyped “Find_by_properties” search in database for the entries with the same properties as the input object. The method must have a BO as a parameter and a list return type.
- login
The method must have a BO as a parameter and the same BO as a return type.
- logout
The method must not contain any parameters and must have a void return type.
- complex
Service described in a sequences diagram. No constraint on the parameters and the return type.
- specific
This service operation must be manually implemented. The specific service’s « implementation » tagged value must be filled. As of ver 3.5.0, a specific service can have several operations.
- copy
Service for object copying. The method must only have one parameter of BO or « ValueObject » type and a return type of the same BO or « ValueObject » type.
- BR (DROOLS)
Service implemented with business rules defined in a .drl file. The tag « BR.package » must be defined. It defines the package location of the .drl file which describes the business rules. The parameters of a « BR » operation must be stereotyped « brParamIn », « brParamOut » or « brParamGlobal ».
- hql_operation
Service managing a hql operation defined in the « hql_request » tag.
The parameters of the operation are used as variables in the hql request. As of ver 3.5.0, the properties of the parameters like “myBo.myProperty” can also be used as variables in the hql request.
- process
Service described in an activity diagram. No constraint on the parameters and the return type.
- ClientWebService
Service for interacting with the presented web service.
- ServerWebService
Service for the presented web service.
- validationService (As of ver 3.5.0)
Service for dynamic validation.
These services are described by Validation Process Diagrams (similar to the process diagram).
Internationalization and bundle:
The messages are contained in opaque actions and have stereotype "msgKey".
A class (containing untyped property) with the stereotype "msgBundle" can contain the displayed messages. In this case, the tag "key" is filled with the corresponding proprieties.
When the message is unique, it can be entered in the "body" of the opaque action, this message will be translated into key I18N.


Figure 1 : Mödling Example
- sql_operation (As of ver 3.5.1)
Service managing a sql operation defined in the « sql_request » tag.
The parameters of the operation are used as variables in the sql request.
The SQL statement may contain in the modeling a carriage returns.
Rules applicable for services
- Packages containing the services must be « PK_SERVICE » stereotyped.
Example
| Stereotype | UML element | Service |
| create | Interface |
|
| Operation |
| |
| create_all | Interface |
|
| Operation |
| |
| update | Interface |
|
| Operation |
| |
| update_all | Interface |
|
| Operation |
| |
| delete | Interface |
|
| Operation |
| |
| delete_all | Interface |
|
| Operation |
| |
| find_by_id | Interface |
|
| Operation |
| |
| find_all | Interface |
|
| Operation |
| |
| find_by_properties | Interface |
|
| Operation |
| |
| login | Interface |
|
| Operation |
| |
| logout | Interface |
|
| Operation |
| |
| copy | Interface |
|
| Operation |
| |
| complex | Operation |
|
| ||
| ||
| BR | Operation |
|
| hql_operation | Operation |
|
| ||
| process | Operation |
|
| ||
| ||
| specific | Interface |
|
| ||
| Operation |
| |
| ||
| ClientWebService | Interface |
|
| ServerWebService | Interface |
|
ValidationService (As of ver 3.5.0) | Operation |
|
| sql_operation (As of ver 3.5.1) | Operation |
|
List of tags applicable to modeling services and rules
- .clearSession =true : is used to perform a flush and a clear of the hibernate session before a DAO/DAOFinder operation (can be used to resolve an object duplication problem but hurts system performance)
- .refreshSession = true : is used to perform a Hibernate session flush before the DAO/DAOFinder operation
- .bo : Specifies the target BO for:
- The object type of a list parameter.
- The key for the hibernate configuration (in multi-database project).
- hql_operation.hql_request : Specifies the HQL query invoked by the operation.
- ClientWebService.clientPathTypeRetour : cf. Error: Reference source not found
- ClientWebService.serverPathTypeRetour: cf. Error: Reference source not found
- ClientWebService.typeRetour : cf. Error: Reference source not found
- ClientWebService.targetNamespace: cf. Error: Reference source not found
- ClientWebService.url: cf. Error: Reference source not found
- ServerWebService.implementation: Implementation class of the presented service.
- Specific.implementation: Implementation class of the service.
- BR.package: Defines the package location of the .drl file which describes the business rules
- check_null.message: Specifies the message exception thrown if the concerned parameter is null.





































