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.api.document.search; 017 018import org.kuali.rice.kew.api.document.DocumentContract; 019import org.kuali.rice.kew.api.document.attribute.DocumentAttributeContract; 020 021import java.util.List; 022 023/** 024 * Defines the contract for a single document result from execution of a document search. This serves to package the 025 * actual document with it's document attributes. 026 */ 027public interface DocumentSearchResultContract { 028 029 /** 030 * Returns the document represented by this result. This should include all information available on the 031 * {@code DocumentContract} with the exception of document {@code variables}. Even if a document has variables 032 * defined they will not be included on the document returned from this method. 033 * 034 * @return the document represented by this result, this will never be null 035 */ 036 DocumentContract getDocument(); 037 038 /** 039 * Returns an unmodifiable list of objects implementing the {@link DocumentAttributeContract} interface. These 040 * define the various document attributes that have been indexed for the document represented by this result. 041 * 042 * @return an unmodifiable list containing the document attribute values associated with the document represented 043 * by this result, this will never be null but may be empty 044 */ 045 List<? extends DocumentAttributeContract> getDocumentAttributes(); 046 047}