001/** 002 * Copyright 2005-2016 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.routeheader.dao; 017 018import java.util.Collection; 019import java.util.Set; 020 021import org.kuali.rice.kew.docsearch.SearchableAttributeValue; 022import org.kuali.rice.kew.routeheader.DocumentRouteHeaderValue; 023import org.kuali.rice.kew.routeheader.DocumentRouteHeaderValueContent; 024 025 026 027/** 028 * @author Kuali Rice Team (rice.collab@kuali.org) 029 */ 030public interface DocumentRouteHeaderDAO { 031 032 public void saveRouteHeader(DocumentRouteHeaderValue routeHeader); 033 /** 034 * "Locks" the route header at the datasource level. 035 */ 036 public void lockRouteHeader(String documentId, boolean wait); 037 public DocumentRouteHeaderValue findRouteHeader(String documentId); 038 public DocumentRouteHeaderValue findRouteHeader(String documentId, boolean clearCache); 039 public Collection<DocumentRouteHeaderValue> findRouteHeaders(Collection<String> documentIds); 040 public Collection<DocumentRouteHeaderValue> findRouteHeaders(Collection<String> documentIds, boolean clearCache); 041 public void deleteRouteHeader(DocumentRouteHeaderValue routeHeader); 042 public String getNextDocumentId(); 043 public Collection<String> findPendingByResponsibilityIds(Set<String> responsibilityIds); 044 public void clearRouteHeaderSearchValues(String documentId); 045 public Collection<SearchableAttributeValue> findSearchableAttributeValues(String documentId); 046 public String getApplicationIdByDocumentId(String documentId); 047 public DocumentRouteHeaderValueContent getContent(String documentId); 048 public boolean hasSearchableAttributeValue(String documentId, String searchableAttributeKey, String searchableAttributeValue); 049 public String getDocumentStatus(String documentId); 050 public void save(SearchableAttributeValue searchableAttribute); 051 public String getAppDocId(String documentId); 052 public String getAppDocStatus(String documentId); 053 054 public Collection findByDocTypeAndAppId(String documentTypeName, String appId); 055 056}