1 /* 2 * Copyright 2007 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.kuali.rice.ken.service; 17 18 import org.kuali.rice.ken.bo.NotificationMessageDelivery; 19 import org.kuali.rice.ken.document.kew.NotificationWorkflowDocument; 20 import org.kuali.rice.kew.exception.WorkflowException; 21 import org.kuali.rice.kew.service.WorkflowDocument; 22 23 24 /** 25 * The NotificationWorkflowDocumentService class is responsible for housing service methods for interacting with KEW. 26 * @author Kuali Rice Team (rice.collab@kuali.org) 27 */ 28 public interface NotificationWorkflowDocumentService { 29 /** 30 * This service method is responsible for creating a NotificationWorkflowDocument for the given user, which in turn, 31 * creates a workflow document in KEW. It then ad-hoc routes the document to the passed in recipient. This 32 * method will be used by the NotificationService.deliverNotification() service method. 33 * @param messageDelivery - the specific NotificationMessageDelivery that is associated with this ad hoc route 34 * @param initiatorUserId - the person/workflow user who is responsible for "initiating" this workflow document 35 * @param recipientUserId - the person/workflow user who will recieve this document via an ad hoc route 36 * @param annotation - a description of the workflow ad hoc route transaction 37 * @return String - the id of the workflow document 38 */ 39 public String createAndAdHocRouteNotificationWorkflowDocument(NotificationMessageDelivery messageDelivery, String initiatorUserId, 40 String recipientUserId, String annotation) throws WorkflowException; 41 42 /** 43 * This method is responsible for canceling a workflow document; which in turn simulates the "checking-off" 44 * of a notification in the notification list by the system through an auto-removal. 45 * @param initiatorUserId 46 * @param workflowDocument 47 * @param annotation 48 * @throws WorkflowException 49 */ 50 public void clearAllFyisAndAcknowledgeNotificationWorkflowDocument(String initiatorUserId, NotificationWorkflowDocument workflowDocument, String annotation) throws WorkflowException; 51 52 /** 53 * This method is responsible for unconditionally terminating a workflow document, after which there should be no 54 * pending action requests against this document. 55 * @param document workflow document to terminate 56 */ 57 public void terminateWorkflowDocument(WorkflowDocument document) throws WorkflowException; 58 59 /** 60 * This service method is responsible for retrieving a NotificationWorkflowDocument from KEW. 61 * @param initiatorUserId 62 * @param workflowDocumentId 63 * @return NotificationWorkflowDocument 64 * @throws WorkflowException 65 */ 66 public NotificationWorkflowDocument getNotificationWorkflowDocumentByDocumentId(String initiatorUserId, String workflowDocumentId) throws WorkflowException; 67 }