org.kuali.rice.edl.framework.workflow
Class EDocLitePostProcessor

java.lang.Object
  extended by org.kuali.rice.kew.postprocessor.DefaultPostProcessorRemote
      extended by org.kuali.rice.edl.framework.workflow.EDocLitePostProcessor
All Implemented Interfaces:
PostProcessorRemote
Direct Known Subclasses:
EDocLiteDatabasePostProcessor

public class EDocLitePostProcessor
extends DefaultPostProcessorRemote

PostProcessor responsible for posting events to a url defined in the EDL doc definition.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
static String EVENT_TYPE_ACTION_TAKEN
           
static String EVENT_TYPE_DELETE_ROUTE_HEADER
           
static String EVENT_TYPE_ROUTE_LEVEL_CHANGE
           
static String EVENT_TYPE_ROUTE_STATUS_CHANGE
           
private static org.apache.log4j.Logger LOG
           
static int SUBMIT_URL_MILLISECONDS_WAIT
           
private static Timer TIMER
           
 
Constructor Summary
EDocLitePostProcessor()
           
 
Method Summary
 boolean doActionTaken(ActionTakenEventDTO event)
          KEW is signaling that the document has had an action taken on it by a user
 boolean doDeleteRouteHeader(DeleteEventDTO event)
          KEW is signaling that the document should be deleted.
 boolean doRouteLevelChange(DocumentRouteLevelChangeDTO event)
          The document has changed route level.
 boolean doRouteStatusChange(DocumentRouteStatusChangeDTO event)
          The document has changed route status.
static DocumentBuilder getDocumentBuilder()
           
static Document getEDLContent(String documentId)
           
private static String getURL(Document edlDoc)
           
private static String lowerCaseFirstChar(String s)
           
protected static void postEvent(String docId, Object event, String eventName)
           
static Element propertiesToXml(Object o, String elementName)
           
private static void submitURL(String urlstring, Document eventDoc)
           
 
Methods inherited from class org.kuali.rice.kew.postprocessor.DefaultPostProcessorRemote
afterProcess, beforeProcess, getDocumentIdsToLock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final org.apache.log4j.Logger LOG

TIMER

private static final Timer TIMER

SUBMIT_URL_MILLISECONDS_WAIT

public static final int SUBMIT_URL_MILLISECONDS_WAIT
See Also:
Constant Field Values

EVENT_TYPE_ACTION_TAKEN

public static final String EVENT_TYPE_ACTION_TAKEN
See Also:
Constant Field Values

EVENT_TYPE_DELETE_ROUTE_HEADER

public static final String EVENT_TYPE_DELETE_ROUTE_HEADER
See Also:
Constant Field Values

EVENT_TYPE_ROUTE_LEVEL_CHANGE

public static final String EVENT_TYPE_ROUTE_LEVEL_CHANGE
See Also:
Constant Field Values

EVENT_TYPE_ROUTE_STATUS_CHANGE

public static final String EVENT_TYPE_ROUTE_STATUS_CHANGE
See Also:
Constant Field Values
Constructor Detail

EDocLitePostProcessor

public EDocLitePostProcessor()
Method Detail

getURL

private static String getURL(Document edlDoc)
                      throws XPathExpressionException
Throws:
XPathExpressionException

submitURL

private static void submitURL(String urlstring,
                              Document eventDoc)
                       throws IOException
Parameters:
urlstring -
eventDoc -
Throws:
IOException

postEvent

protected static void postEvent(String docId,
                                Object event,
                                String eventName)

doRouteStatusChange

public boolean doRouteStatusChange(DocumentRouteStatusChangeDTO event)
                            throws RemoteException
Description copied from interface: PostProcessorRemote
The document has changed route status. The docEvent contains the information about the change. This method should do what ever is appropriate for various route status changes to a document. The method should return true if the change is correct and all application actions as a result of the change are successful. It should return false if the application considers this an incorrect change. The method can throw a ResourceUnavailableException in order to requeue the document and try again later.

Specified by:
doRouteStatusChange in interface PostProcessorRemote
Overrides:
doRouteStatusChange in class DefaultPostProcessorRemote
Returns:
true if the status change is correct and application actions are successful later if this exception is thrown
Throws:
RemoteException
See Also:
DocumentRouteStatusChange

doActionTaken

public boolean doActionTaken(ActionTakenEventDTO event)
                      throws RemoteException
Description copied from interface: PostProcessorRemote
KEW is signaling that the document has had an action taken on it by a user

Specified by:
doActionTaken in interface PostProcessorRemote
Overrides:
doActionTaken in class DefaultPostProcessorRemote
Returns:
Throws:
RemoteException

doDeleteRouteHeader

public boolean doDeleteRouteHeader(DeleteEventDTO event)
                            throws RemoteException
Description copied from interface: PostProcessorRemote
KEW is signaling that the document should be deleted. The application can reject this by returning false. If an Exception is thrown the docuemnt will go to exception routing. If a ResourceUnavailableException is thrown, the doc will be requeued and will try again later to delete the document.

Specified by:
doDeleteRouteHeader in interface PostProcessorRemote
Overrides:
doDeleteRouteHeader in class DefaultPostProcessorRemote
Returns:
Throws:
RemoteException

doRouteLevelChange

public boolean doRouteLevelChange(DocumentRouteLevelChangeDTO event)
                           throws RemoteException
Description copied from interface: PostProcessorRemote
The document has changed route level. The docEvent contains the information about the change. This method should do what ever is appropriate for various route level changes to a document. The method should return true if the change is correct and all application actions as a result of the change are successful. It should return false if the application considers this an incorrect change. The method can throw a ResourceUnavailableException in order to requeue the document and try again later.

Specified by:
doRouteLevelChange in interface PostProcessorRemote
Overrides:
doRouteLevelChange in class DefaultPostProcessorRemote
Returns:
true if the status change is correct and application actions are successful
Throws:
RemoteException
See Also:
DocumentRouteLevelChangeDTO

getEDLContent

public static Document getEDLContent(String documentId)

getDocumentBuilder

public static DocumentBuilder getDocumentBuilder()
                                          throws Exception
Throws:
Exception

lowerCaseFirstChar

private static String lowerCaseFirstChar(String s)

propertiesToXml

public static Element propertiesToXml(Object o,
                                      String elementName)
                               throws Exception
Throws:
Exception


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.