001/** 002 * Copyright 2005-2017 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.ken.service; 017 018import org.kuali.rice.ken.bo.NotificationMessageDelivery; 019import org.kuali.rice.kew.api.WorkflowDocument; 020 021 022/** 023 * The NotificationWorkflowDocumentService class is responsible for housing service methods for interacting with KEW. 024 * @author Kuali Rice Team (rice.collab@kuali.org) 025 */ 026public interface NotificationWorkflowDocumentService { 027 /** 028 * This service method is responsible for creating a NotificationWorkflowDocument for the given user, which in turn, 029 * creates a workflow document in KEW. It then ad-hoc routes the document to the passed in recipient. This 030 * method will be used by the NotificationService.deliverNotification() service method. 031 * @param messageDelivery - the specific NotificationMessageDelivery that is associated with this ad hoc route 032 * @param initiatorUserId - the person/workflow user who is responsible for "initiating" this workflow document 033 * @param recipientUserId - the person/workflow user who will recieve this document via an ad hoc route 034 * @param annotation - a description of the workflow ad hoc route transaction 035 * @return String - the id of the workflow document 036 */ 037 public String createAndAdHocRouteNotificationWorkflowDocument(NotificationMessageDelivery messageDelivery, String initiatorUserId, 038 String recipientUserId, String annotation); 039 040 /** 041 * This method is responsible for canceling a workflow document; which in turn simulates the "checking-off" 042 * of a notification in the notification list by the system through an auto-removal. 043 * @param initiatorUserId 044 * @param workflowDocument 045 * @param annotation 046 */ 047 public void clearAllFyisAndAcknowledgeNotificationWorkflowDocument(String initiatorUserId, WorkflowDocument workflowDocument, String annotation); 048 049 /** 050 * This method is responsible for unconditionally terminating a workflow document, after which there should be no 051 * pending action requests against this document. 052 * @param document workflow document to terminate 053 */ 054 public void terminateWorkflowDocument(WorkflowDocument document); 055 056 /** 057 * This service method is responsible for retrieving a NotificationWorkflowDocument from KEW. 058 * @param initiatorUserId 059 * @param workflowDocumentId 060 * @return NotificationWorkflowDocument 061 */ 062 public WorkflowDocument getNotificationWorkflowDocumentByDocumentId(String initiatorUserId, String workflowDocumentId); 063}