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.

output_html_m261a7350.gif

output_html_m3f6d3633.gif

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
createInterface

output_html_29a49af2.png

Operation

output_html_m5bf2c016.png

create_allInterface

output_html_m112e9d9d.png

Operation

output_html_2204f623.png

updateInterface

output_html_m1614970e.png

Operation

output_html_m1614970e.png

update_allInterface

output_html_m1526148c.png

Operation

output_html_m7f666009.png

deleteInterface

output_html_48d3e178.png

Operation

output_html_ba56d71.png

delete_allInterface

output_html_mff54d6a.png

Operation

output_html_m4082904b.png

find_by_idInterface

output_html_m2deb257c.png

Operation

output_html_m4d7bd073.png

find_allInterface

output_html_m528af7ca.png

Operation

output_html_mc9926ee.png

find_by_propertiesInterface

output_html_38095b62.png

Operation

output_html_7517855e.png

loginInterface

output_html_6ac41ca2.png

Operation

output_html_m5ce1c62e.png

logoutInterface

output_html_m7c7ab9b2.png

Operation

output_html_6f2e867f.png

copyInterface

output_html_m52c210d9.png

Operation

output_html_m5d986ccf.png

complexOperation

output_html_m1b060c25.png


output_html_20ec512.png


output_html_1590ace3.png

BROperation

output_html_3abe1681.png

hql_operationOperation

output_html_m70ac27e.png


output_html_c7ee1cc.png

processOperation

output_html_m56353c4d.png


output_html_1bab7fdf.png


output_html_m184aca1b.png

specificInterface

output_html_m56488b92.png


output_html_7a464b59.png

Operation

output_html_f216b1b.png


output_html_63bbeae6.png

ClientWebServiceInterface

output_html_1a24770d.png

ServerWebServiceInterface

output_html_m50cdc299.png


ValidationService

(As of ver 3.5.0)

Operation

output_html_5a4528bf.png

sql_operation (As of ver 3.5.1)Operation

output_html_2dbd0790.png

output_html_37ed3311.png

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.

BLU AGE is a registered trademark of NETFECTIVE TECHNOLOGY S.A. - Trademarks are property of their respective owners
Do not copy or divulge without written permission