001    /**
002     * Copyright 2005-2012 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     */
016    package org.kuali.rice.kew.actionitem.dao;
017    
018    import java.util.Collection;
019    
020    import org.kuali.rice.kew.actionitem.ActionItem;
021    import org.kuali.rice.kew.actionitem.OutboxItemActionListExtension;
022    import org.kuali.rice.kew.actionrequest.Recipient;
023    
024    /**
025     * Data Access Object for {@link ActionItem}s.
026     *
027     * @see ActionItem
028     *
029     * @author Kuali Rice Team (rice.collab@kuali.org)
030     */
031    public interface ActionItemDAO {
032    
033            public ActionItem findByActionItemId(String actionItemId);
034    
035            public void deleteActionItem(ActionItem actionItem);
036    
037            public void deleteByDocumentId(String documentId);
038    
039            public void deleteByDocumentIdWorkflowUserId(String documentId,
040                            String workflowUserId);
041    
042            public void saveActionItem(ActionItem actionItem);
043    
044            public Collection<ActionItem> findByPrincipalId(String principalId);
045    
046            public Collection<ActionItem> findByDocumentId(String documentId);
047    
048            public Collection<ActionItem> findByActionRequestId(String actionRequestId);
049    
050            public Collection<ActionItem> findByWorkflowUserDocumentId(
051                            String workflowUserId, String documentId);
052    
053        public Collection<ActionItem> findByDocumentTypeName(String documentTypeName);
054    
055        public Collection<Recipient> findSecondaryDelegators(String principalId);
056    
057            public Collection<Recipient> findPrimaryDelegationRecipients(String principalId);
058    
059        public Collection<OutboxItemActionListExtension> getOutboxItemsByDocumentType(String documentTypeName);
060    }