Available in:

LPT 2.36.6.0 version and higher. 

Objective:

Implement business logic code in LPT and execute this code at runtime.

Procedure:

In order to implement a business logic handler definition, there are a few steps as below:

Create a business logic handler class

Business logic handler class is a class which determines the actions to be performed for a business object in the business logic layer. 
This class must extend from Basic Business Logic Handler class. By doing this, the user may override the methods of the super class and use them. 
The format of the class must be as:

1
2
3
4
package com.logopartner.util;
  import com.lbs.data.factory.BasicBusinessLogicHandler;
  public class Example extends BasicBusinessLogicHandler {
  }

The functions to be overridden are as:

  • beforeInsert
  • afterInsert
  • beforeDelete
  • afterDelete
  • beforeRead
  • afterRead
  • beforeUpdate
  • afterUpdate

Create a business logic handler definition

This operation matches the given business object with the given handler. After this, the user can perform operations on the given business object.

In order to do this, open the file named “businessLogicHandlers.lblhd”.
This file indexes the business logic handler definitions. 
To add a new definition, right click and select “Add”. 
A window will appear as:

Name The name of the definition.

Business Logic Handler Package: The name of the package which the handler class will be found under.

Business Logic Handler: The name of the handler class. The only name is required (not extension) When
clicked on the “Browse Handler” button only business logic handler classes will be listed.

Business Object: The name of the custom business object which will be matched with the business logic handler.

Description: The description of the definition.

Click OK, Save The File and You Are Done!



Telif HakkıKullanım KoşullarıGizlilik
Copyright © 2018 Logo Yazılım