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.kew.actiontaken.dao; 017 018import org.kuali.rice.kew.actiontaken.ActionTakenValue; 019import org.kuali.rice.kew.api.action.ActionType; 020import org.kuali.rice.kew.engine.node.RouteNodeInstance; 021 022import java.sql.Timestamp; 023import java.util.List; 024 025/** 026 * Data Access Object for {@link ActionTakenValue}s. 027 * 028 * @author Kuali Rice Team (rice.collab@kuali.org) 029 */ 030public interface ActionTakenDao { 031 032 /** 033 * Returns the Timestamp of the last action of the given type taken against the document. 034 * 035 * <p>Both {@code documentId} and {@code actionType} must be supplied to this query. Otherwise an 036 * {@code IllegalArgumentException} will be thrown.</p> 037 * 038 * @param documentId the id of the document to check 039 * @param actionType the type of the action to look for 040 * 041 * @return the Timestamp of the last action of the given type taken against the document, or null if the document 042 * has no actions 043 * 044 * @throws IllegalArgumentException if documentId is null or blank, or if actionType is null 045 */ 046 Timestamp getLastActionTakenDate(String documentId, ActionType actionType); 047 048 /** 049 * Returns the actions taken at a route node instance 050 * @param nodeInstance the route node instance 051 * @return the list of actions taken at a route node instance 052 */ 053 List<ActionTakenValue> findActionsTakenAtRouteNodeInstance(RouteNodeInstance nodeInstance); 054 055}