Implementing the Publisher Operations

This section assumes you installed the sample publisher in your workspace and you can inspect the source files as you read this tutorial.

Operations Overview

When you declared the com.sodius.mdw.clm.client.authoringTool extension in the /META-INF/MANIFEST.MF file, you referenced a class for the operationFactory attribute (e.g. com.sodius.mdw.clm.client.tool.sample.SampleOperationFactory). This class must extend the com.sodius.mdw.clm.client.OperationFactory interface and provide a zero-argument constructor. The OperationFactory is in charge of instantiating the main Operation, which executes the publishing activity (e.g. com.sodius.mdw.clm.client.tool.sample.SamplePublishOperation).

An Operation is a block of code to execute and has an associated status, which determines whether warning or errors are encountered during the execution. The status enables to monitor the execution state of the operation and to query the execution result. An operation is decomposed into sub-operations.

An Operation cannot throw an exception. All exceptions that occur during the execution are to catch and to store into the operation associated status.

The developer is encouraged to regularly check the Operation.isCanceledOrFailed(monitor) method to determine whether the operation shall continue to execute. The operation should return as soon as a cancel request is detected or when an error is stored in the status.

Publisher model

As seen in previous sections, SECollab comes with a Publisher model which simplifies the publishing implementation. The Publisher schema defines the concepts available in SECollab that let you, as a developer, project authoring tool data into the world of OSLC and SECollab.

Related tasks
Installing the Publisher Sample
Creating the Publisher Plug-In

Related reference
Publisher Schema