View Javadoc
1   /**
2    * Copyright 2005-2014 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.api.document.search;
17  
18  import org.kuali.rice.kew.api.document.DocumentContract;
19  import org.kuali.rice.kew.api.document.attribute.DocumentAttributeContract;
20  
21  import java.util.List;
22  
23  /**
24   * Defines the contract for a single document result from execution of a document search.  This serves to package the
25   * actual document with it's document attributes.
26   */
27  public interface DocumentSearchResultContract {
28  
29      /**
30       * Returns the document represented by this result.  This should include all information available on the
31       * {@code DocumentContract} with the exception of document {@code variables}.  Even if a document has variables
32       * defined they will not be included on the document returned from this method.
33       *
34       * @return the document represented by this result, this will never be null
35       */
36      DocumentContract getDocument();
37  
38      /**
39       * Returns an unmodifiable list of objects implementing the {@link DocumentAttributeContract} interface.  These
40       * define the various document attributes that have been indexed for the document represented by this result.
41       *
42       * @return an unmodifiable list containing the document attribute values associated with the document represented
43       * by this result, this will never be null but may be empty
44       */
45      List<? extends DocumentAttributeContract> getDocumentAttributes();
46  
47  }