Coverage Report - org.kuali.rice.kew.routeheader.service.RouteHeaderService
 
Classes in this File Line Coverage Branch Coverage Complexity
RouteHeaderService
N/A
N/A
1
 
 1  
 /**
 2  
  * Copyright 2005-2011 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.kew.routeheader.service;
 17  
 
 18  
 import java.math.BigDecimal;
 19  
 import java.sql.Timestamp;
 20  
 import java.util.Collection;
 21  
 import java.util.List;
 22  
 import java.util.Map;
 23  
 import java.util.Set;
 24  
 
 25  
 import org.kuali.rice.kew.api.action.ActionItem;
 26  
 import org.kuali.rice.kew.docsearch.SearchableAttributeValue;
 27  
 import org.kuali.rice.kew.doctype.bo.DocumentType;
 28  
 import org.kuali.rice.kew.routeheader.DocumentRouteHeaderValue;
 29  
 import org.kuali.rice.kew.routeheader.DocumentRouteHeaderValueContent;
 30  
 
 31  
 
 32  
 /**
 33  
  * A service providing data access for documents (a.k.a route headers).
 34  
  *
 35  
  * @see DocumentRouteHeaderValue
 36  
  *
 37  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 38  
  */
 39  
 public interface RouteHeaderService {
 40  
 
 41  
     public DocumentRouteHeaderValue getRouteHeader(String documentId);
 42  
     public DocumentRouteHeaderValue getRouteHeader(String documentId, boolean clearCache);
 43  
     public Collection<DocumentRouteHeaderValue> getRouteHeaders (Collection<String> documentIds);
 44  
     public Collection<DocumentRouteHeaderValue> getRouteHeaders (Collection<String> documentIds, boolean clearCache);
 45  
     public Map<String,DocumentRouteHeaderValue> getRouteHeadersForActionItems(Collection<ActionItem> actionItems);
 46  
     public void lockRouteHeader(String documentId, boolean wait);
 47  
     public void saveRouteHeader(DocumentRouteHeaderValue routeHeader);
 48  
     public void deleteRouteHeader(DocumentRouteHeaderValue routeHeader);
 49  
     public String getNextDocumentId();
 50  
     public void validateRouteHeader(DocumentRouteHeaderValue routeHeader);
 51  
     public Collection findPendingByResponsibilityIds(Set responsibilityIds);
 52  
     public Collection findByDocTypeAndAppId(String documentTypeName, String appId);
 53  
     
 54  
     /**
 55  
      * Removes all SearchableAttributeValues associated with the RouteHeader.
 56  
      * @param routeHeader
 57  
      */
 58  
     public void clearRouteHeaderSearchValues(String documentId);
 59  
 
 60  
     /**
 61  
      * Updates the searchable attribute values for the document with the given id to the given values.
 62  
      * This method will clear existing search attribute values and replace with the ones given.
 63  
      */
 64  
     public void updateRouteHeaderSearchValues(String documentId, List<SearchableAttributeValue> searchAttributes);
 65  
     
 66  
     /**
 67  
      * Returns the application id of the {@link DocumentType} for the Document with the given ID.
 68  
      */
 69  
     public String getApplicationIdByDocumentId(String documentId);
 70  
 
 71  
     public DocumentRouteHeaderValueContent getContent(String documentId);
 72  
 
 73  
     public boolean hasSearchableAttributeValue(String documentId, String searchableAttributeKey, String searchableAttributeValue);
 74  
 
 75  
     public String getDocumentStatus(String documentId);
 76  
 
 77  
     public String getAppDocId(String documentId);
 78  
     
 79  
     /**
 80  
      *
 81  
      * This method is a more direct way to get the searchable attribute values
 82  
      *
 83  
      * @param documentId
 84  
      * @param key
 85  
      * @return
 86  
      */
 87  
     public List<String> getSearchableAttributeStringValuesByKey(String documentId, String key);
 88  
     /**
 89  
      *
 90  
      * This method is a more direct way to get the searchable attribute values
 91  
      *
 92  
      * @param documentId
 93  
      * @param key
 94  
      * @return
 95  
      */
 96  
     public List<Timestamp> getSearchableAttributeDateTimeValuesByKey(String documentId, String key);
 97  
     /**
 98  
      *
 99  
      * This method is a more direct way to get the searchable attribute values
 100  
      *
 101  
      * @param documentId
 102  
      * @param key
 103  
      * @return
 104  
      */
 105  
     public List<BigDecimal> getSearchableAttributeFloatValuesByKey(String documentId, String key);
 106  
     /**
 107  
      *
 108  
      * This method is a more direct way to get the searchable attribute values
 109  
      *
 110  
      * @param documentId
 111  
      * @param key
 112  
      * @return
 113  
      */
 114  
     public List<Long> getSearchableAttributeLongValuesByKey(String documentId, String key);
 115  
 
 116  
 }