Package org.pentaho.platform.workitem
Class WorkItemLifecycleEventUtil
- java.lang.Object
-
- org.pentaho.platform.workitem.WorkItemLifecycleEventUtil
-
public class WorkItemLifecycleEventUtil extends Object
A class for common utility methods related to work item lifecycle events.
-
-
Constructor Summary
Constructors Constructor Description WorkItemLifecycleEventUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static org.pentaho.platform.api.workitem.IWorkItemLifecycleEvent
createEvent(String workItemUid, String workItemDetails, WorkItemLifecyclePhase workItemLifecyclePhase, String lifecycleDetails, Date sourceTimestamp)
static void
publish(String workItemUid, String details, WorkItemLifecyclePhase workItemLifecyclePhase, String lifecycleDetails)
A convenience method for publishing changes to the work item's lifecycles that creates an instance ofWorkItemLifecycleEvent
and calls thepublish(IWorkItemLifecycleEvent)
methodstatic void
publish(String workItemUid, Map<String,Serializable> details, WorkItemLifecyclePhase workItemLifecyclePhase)
A convenience method for publishing changes to the work item's lifecycles that callspublish(String, Map, WorkItemLifecyclePhase, String, Date)
with a nulllifecycleDetails
andsourceTimestamp
static void
publish(String workItemUid, Map<String,Serializable> details, WorkItemLifecyclePhase workItemLifecyclePhase, String lifecycleDetails)
A convenience method for publishing changes to the work item's lifecycles that callspublish(String, Map, WorkItemLifecyclePhase, String, Date)
with a nullsourceTimestamp
static void
publish(String workItemUid, Map<String,Serializable> details, WorkItemLifecyclePhase workItemLifecyclePhase, String lifecycleDetails, Date sourceTimestamp)
A convenience method for publishing changes to the work item's lifecycles that creates an instance ofWorkItemLifecycleEvent
and calls thepublish(IWorkItemLifecycleEvent)
methodstatic void
publish(org.pentaho.platform.api.workitem.IWorkItemLifecycleEvent workItemLifecycleEvent)
A convenience method for publishing changes to the work item's lifecycles.
-
-
-
Method Detail
-
publish
public static void publish(String workItemUid, Map<String,Serializable> details, WorkItemLifecyclePhase workItemLifecyclePhase)
A convenience method for publishing changes to the work item's lifecycles that callspublish(String, Map, WorkItemLifecyclePhase, String, Date)
with a nulllifecycleDetails
andsourceTimestamp
- Parameters:
workItemUid
- aString
containing unique identifier for theWorkItemLifecycleEvent
details
- anMap
containing details of theWorkItemLifecycleEvent
workItemLifecyclePhase
- aWorkItemLifecyclePhase
representing the lifecycle event
-
publish
public static void publish(String workItemUid, Map<String,Serializable> details, WorkItemLifecyclePhase workItemLifecyclePhase, String lifecycleDetails)
A convenience method for publishing changes to the work item's lifecycles that callspublish(String, Map, WorkItemLifecyclePhase, String, Date)
with a nullsourceTimestamp
- Parameters:
workItemUid
- aString
containing unique identifier for theWorkItemLifecycleEvent
details
- anMap
containing details of theWorkItemLifecycleEvent
workItemLifecyclePhase
- aWorkItemLifecyclePhase
representing the lifecycle eventlifecycleDetails
- aString
containing any additional details about the lifecycle event, such as pertinent failure messages
-
publish
public static void publish(String workItemUid, Map<String,Serializable> details, WorkItemLifecyclePhase workItemLifecyclePhase, String lifecycleDetails, Date sourceTimestamp)
A convenience method for publishing changes to the work item's lifecycles that creates an instance ofWorkItemLifecycleEvent
and calls thepublish(IWorkItemLifecycleEvent)
method- Parameters:
workItemUid
- aString
containing unique identifier for theIWorkItemLifecycleEvent
details
- anMap
containing details of theIWorkItemLifecycleEvent
workItemLifecyclePhase
- aWorkItemLifecyclePhase
representing the lifecycle eventlifecycleDetails
- aString
containing any additional details about the lifecycle event, such as pertinent failure messagessourceTimestamp
- aDate
representing the time the lifecycle change occurred.
-
publish
public static void publish(String workItemUid, String details, WorkItemLifecyclePhase workItemLifecyclePhase, String lifecycleDetails)
A convenience method for publishing changes to the work item's lifecycles that creates an instance ofWorkItemLifecycleEvent
and calls thepublish(IWorkItemLifecycleEvent)
method- Parameters:
workItemUid
- aString
containing unique identifier for theIWorkItemLifecycleEvent
details
- aString
containing details of theIWorkItemLifecycleEvent
workItemLifecyclePhase
- aWorkItemLifecyclePhase
representing the lifecycle eventlifecycleDetails
- aString
containing lifecycle of theIWorkItemLifecycleEvent
-
createEvent
protected static org.pentaho.platform.api.workitem.IWorkItemLifecycleEvent createEvent(String workItemUid, String workItemDetails, WorkItemLifecyclePhase workItemLifecyclePhase, String lifecycleDetails, Date sourceTimestamp)
-
publish
public static void publish(org.pentaho.platform.api.workitem.IWorkItemLifecycleEvent workItemLifecycleEvent)
A convenience method for publishing changes to the work item's lifecycles. Fetches theIWorkItemLifecycleEventPublisher
bean, and if available, calls its post method. Otherwise does nothing, as theIWorkItemLifecycleEventPublisher
bean may not be available, which is a perfectly valid scenario, if we do not care about publishingIWorkItemLifecycleEvent
's.- Parameters:
workItemLifecycleEvent
- theIWorkItemLifecycleEvent
-
-