com.ibm.workplace.wcm.api
Class WebContentCustomWorkflowService

java.lang.Object
  extended by com.ibm.wps.services.Service
      extended by com.ibm.workplace.wcm.api.WebContentCustomWorkflowService

public abstract class WebContentCustomWorkflowService
extends com.ibm.wps.services.Service

WebContentCustomWorkflowService enables access to the Web Content Custom Workflow methods through Portal services. To ensure that the service is available at runtime, the below line must be added to the services.properties file (<wps>\shared\app\config\services.properties),

com.ibm.workplace.wcm.api.WebContentCustomWorkflowService = com.ibm.workplace.wcm.api.WebContentCustomWorkflowServiceImpl

Here is an example of how to retrieve the WebContentCustomWorkflowService:

 try
 {
    // Construct and inital Context
    InitialContext ctx = new InitialContext();

    // Retrieve WebContentCustomWorkflowService using JNDI name
    WebContentCustomWorkflowService webContentCustomWorkflowService = (WebContentCustomWorkflowService) ctx.lookup("portal:service/wcm/WebContentCustomWorkflowService");
 }
 catch (NamingException ne)
 {
    System.out.print("Naming Exception: " + ne);
 }
 


Constructor Summary
WebContentCustomWorkflowService()
          WebContentCustomWorkflowService implementation constructor
 
Method Summary
abstract  CustomWorkflowActionResult createResult(Directive directive, java.lang.String message)
          Create an instance of a CustomWorkflowActionResult
abstract  boolean factoryExists(java.lang.String factoryName)
          Determine if a factory with the supplied factory name exists as a registered custom workflow action factory.
abstract  CustomWorkflowActionFactory[] getAllFactories()
          Get all of the registered custom workflow action factories.
abstract  CustomWorkflowActionFactory getFactory(java.lang.String factoryName)
          Get a factory given a factory name
abstract  void registerFactory(CustomWorkflowActionFactory factory)
          Register a custom workflow action factory.
 
Methods inherited from class com.ibm.wps.services.Service
inspect
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebContentCustomWorkflowService

public WebContentCustomWorkflowService()
WebContentCustomWorkflowService implementation constructor

Method Detail

factoryExists

public abstract boolean factoryExists(java.lang.String factoryName)
Determine if a factory with the supplied factory name exists as a registered custom workflow action factory.

Parameters:
factoryName - Name of the factory
Returns:
True if a factory has already been registered with the same name

registerFactory

public abstract void registerFactory(CustomWorkflowActionFactory factory)
Register a custom workflow action factory. Each factory is uniquely identified by the getName() String. If a factory is currently registered using the same name, it will be replaced by the supplied factory. If more than one application is registering a factory, each application must ensure that the factory name provided is unique. Otherwise, the last application will replace the first application's factory.

Parameters:
factory - Factory to register.
Throws:
java.lang.IllegalArgumentException - Thrown if the supplied factory is null, the factory name is invalid or any action names are invalid.

getFactory

public abstract CustomWorkflowActionFactory getFactory(java.lang.String factoryName)
Get a factory given a factory name

Parameters:
factoryName - Factory name to look up
Returns:
Factory

getAllFactories

public abstract CustomWorkflowActionFactory[] getAllFactories()
Get all of the registered custom workflow action factories.

Returns:
Registered factories.

createResult

public abstract CustomWorkflowActionResult createResult(Directive directive,
                                                        java.lang.String message)
Create an instance of a CustomWorkflowActionResult

Parameters:
directive - Result directive
message - Result message
Returns:
Result