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.kns.service;
17  
18  import org.kuali.rice.kew.api.document.attribute.DocumentAttribute;
19  import org.kuali.rice.krad.bo.BusinessObject;
20  import org.kuali.rice.krad.datadictionary.RoutingTypeDefinition;
21  import org.kuali.rice.krad.datadictionary.WorkflowAttributes;
22  import org.kuali.rice.krad.document.Document;
23  
24  import java.util.List;
25  import java.util.Map;
26  
27  /**
28   * A service which will resolve workflow attributes into the proper data for routing qualifier resolution
29   *
30   * @author Kuali Rice Team (rice.collab@kuali.org)
31   *
32   * @deprecated Only used in KNS classes, no replacement.
33   */
34  @Deprecated
35  public interface WorkflowAttributePropertyResolutionService {
36  
37      /** 
38       * Generates a List of Map<String, String> data from the data on the document for the given WorkflowAttributeDefinitions
39       * @param document the document to gather data from
40       * @param routingTypeDefinition 
41       * @return a List of populated Map<String, String> data
42       */
43      public abstract List<Map<String, String>> resolveRoutingTypeQualifiers(Document document, RoutingTypeDefinition routingTypeDefinition);
44      
45      /**
46       * Given a document, returns the searchable attribute values to index for it
47       * @param document the document to find indexable searchable attribute values for
48       * @param workflowAttributes the WorkflowAttributes data dictionary metadata which contains the searchable attributes to index 
49       * @return a List of SearchableAttributeValue objects for index
50       */
51      public abstract List<DocumentAttribute> resolveSearchableAttributeValues(Document document, WorkflowAttributes workflowAttributes);
52      
53      /**
54       * Retrieves an object, the child of another given object passed in as a parameter, by the given path
55       * @param object an object to find a child object of
56       * @param path the path to that child object
57       * @return the child object
58       */
59      public abstract Object getPropertyByPath(Object object, String path);
60      
61      /**
62       * Determines the type of the field which is related to the given attribute name on instances of the given business object class
63       * @param businessObjectClass the class of the business object which has an attribute
64       * @param attributeName the name of the attribute
65       * @return the String constrant representing what Field#fieldDataType this represents
66       */
67      public abstract String determineFieldDataType(Class<? extends BusinessObject> businessObjectClass, String attributeName);
68      
69      /**
70       * Using the type of the sent in value, determines what kind of SearchableAttributeValue implementation should be passed back 
71       * @param attributeKey
72       * @param value
73       * @return
74       */
75      public DocumentAttribute buildSearchableAttribute(Class<? extends BusinessObject> businessObjectClass, String attributeKey, Object value);
76      
77  }