com.ibm.workplace.wcm.api.extensions.operation
Class OperationMapper

java.lang.Object
  extended by com.ibm.workplace.wcm.api.extensions.operation.OperationMapper

public class OperationMapper
extends java.lang.Object

OperationMapper is provided in the API to be used in conjunction with OperationContext from the OperationCheckPlugin extension point. It provides a convenient way to handle the different operation types.


Here is a simple example that attempts to process operations related to item creation:

  
  OperationCheckResult checkOperation(OperationContext context) {
         OperationCheckResult result = operationContext.map(new OperationMapper()
         {
            public OperationCheckPlugin map(CreateOperation createOperation)
            {
               return checkOperation(createOperation);
            }       
         });

         return result;
      }
   }
  

Since:
8.5 CF9

Constructor Summary
OperationMapper()
           
 
Method Summary
 OperationCheckResult map(CreateOperationContext context)
          Handle a create operation context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationMapper

public OperationMapper()
Method Detail

map

public OperationCheckResult map(CreateOperationContext context)
Handle a create operation context

Parameters:
context - for the create item operation
Returns:
map to the change into an item type T or return null