Entering content frame

Background documentation Deployment Handler Locate the document in its SAP Library structure

If the deployment hook returns a DeploymentHandler, then this handler is called for each entry in the PAR file and can decide if it wants to handle the entry or not:

Event

Description

ENTRY_UPLOAD

An entry of the corresponding PAR is loaded in the Portal Content Directory (PCD)

ENTRY_DEPLOYMENT 

An entry in the PAR is going to be deployed

This graphic is explained in the accompanying text

public boolean handleEvent(IDeploymentEvent event)

   throws DeploymentHookException {

   if (event instanceof IDeploymentEntryEvent) {

      IDeploymentEntryEvent entryEvent = (IDeploymentEntryEvent) event;

      String entryName = entryEvent.getEntryName();

      if (entryName.indexOf("cr-plugins") != -1) {

         System.out.println("Deploying entry .... :" + entryName);

         return true;

      }

   }

   return false;

}

The PAR entry is retrieved from an input stream of the IdeploymentEntryEvent.

This graphic is explained in the accompanying text

if (entryName.endsWith(".xml")) {

   InputStream is = entryEvent.getInputStream();

   ByteArrayOutputStream baos = new ByteArrayOutputStream();

   .....

   }

Event

Description

COMMIT_UPLOAD

All the events handlers involved in the upload process have been executed successfully

COMMIT_DEPLOYMENT 

All the events handlers involved in the deploy process have been executed successfully

ROLLBACK_UPLOAD 

Not supported in current version

ROLLBACK_DEPLOYM

Not supported in current version

This graphic is explained in the accompanying text

Global events are not sent to the deployment handlers, but to the deployment hooks instead (as soon as the service implements both interfaces).

 

 

Leaving content frame