You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Introduction

This guide serves as an introduction to architectural concepts related to and administration of Triggers in ApacheDS. ApacheDS is the first server to provide Triggers for LDAP like their counterparts in RDBMS world. The Trigger Model in ApacheDS has been carefully designed to be LDAP standards compliant and to take advantage of powerful aspects of ApacheDS like The Administrative Model. A Trigger basically provides a mechanism to register some sort of action to be fired upon an event. To restate this considering ApacheDS Triggers, Triggers allow you to register Stored Procedure invocations to be fired upon any change-inducing LDAP operations on some set of selected entries. Triggers also provides some facilities to make them even more usable like allowing to pass request parameters to stored procedures. To make the most sense of this powerful construct you need to first understand The Administrative Model and have a look at Stored Procedures.

Trigger Specification

A Trigger can be specified with three basic components: Action Time, Trigger Event and Triggered Action. According to a Trigger specification, when a tracked Event occurs (or before it occurs) an Action gets invoked with respect to the Action Time. For example if an Add operation (Event) is performed, information related to it may be logged with a Stored Procedure (Triggered Action), just After (Action Time) the Add operation ended. Here is a sample Trigger Specification:

AFTER Add CALL "Logger.logAddOperation" ($entry,$attributes,$operationPrincipal);

In this example a Stored Procedure named "Logger.logAddOperation" is executed with three operation specific arguments After an LDAP Add operation is performed. The operation specific arguments will be discussed later as well as the not-yet-specified set of entries the Trigger is defined on.

  • No labels