Entering content frame

Component documentation Deployment Hook Locate the document in its SAP Library structure

Purpose

The PRT implements a hook called deployment that enables custom code to be executed at predefined points during the deployment process. A deployment hook is a service delivered in a portal application that binds a name in the portal registry deployment folder:

This graphic is explained in the accompanying text

<application>

  <registry>

    <entry path="/runtime/deployment/com.myPackage.myDeploymentHook"

           name="myDeploymentHook"

           type="service”

  </registry>

 

  <services>

    <service name="myDeploymentHook">

    ...

    </service>

  </ services >

 

</application>

The deployment hook service has to implement the IDeploymentHook interface. The deployment process will call every registered deployment hook to get an IDeploymentHandlerimplementation each time a there is an upload into the Portal Content Directory (PCD) or an update of the local deployment. Then the deployment handlers will participate in the upload/deployment process as follows:

·        During the upload, the deployment handlers are called once the PAR has been stored in the Portal Content Directory

·        During the deployment, the deployment handlers are stored before the PAR entries in the deployment folder. The deployment event passed as a parameter provides access to the PAR file that is currently loaded. The Boolean value returned by the handler will condition the execution of the normal deployment process. If the value is:

¡        true – the normal behavior is not executed

¡        false – the rest of the process is not executed.

Integration

The deployment hook API is shipped in prtdeploymentapi.jar. With this API, it is possible to hook the upload of PAR file and also the update of the local deployment on each server node of the cluster.

 

See also:

 

·        Deployment Hook Interface

·        Deployment Handler

 

 

Leaving content frame