001/** 002 * Copyright 2005-2014 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.kns.service; 017 018import org.kuali.rice.kew.api.document.attribute.DocumentAttribute; 019import org.kuali.rice.krad.bo.BusinessObject; 020import org.kuali.rice.krad.datadictionary.RoutingTypeDefinition; 021import org.kuali.rice.krad.datadictionary.WorkflowAttributes; 022import org.kuali.rice.krad.document.Document; 023 024import java.util.List; 025import java.util.Map; 026 027/** 028 * A service which will resolve workflow attributes into the proper data for routing qualifier resolution 029 * 030 * @author Kuali Rice Team (rice.collab@kuali.org) 031 * 032 * @deprecated Only used in KNS classes, no replacement. 033 */ 034@Deprecated 035public interface WorkflowAttributePropertyResolutionService { 036 037 /** 038 * Generates a List of Map<String, String> data from the data on the document for the given WorkflowAttributeDefinitions 039 * @param document the document to gather data from 040 * @param routingTypeDefinition 041 * @return a List of populated Map<String, String> data 042 */ 043 public abstract List<Map<String, String>> resolveRoutingTypeQualifiers(Document document, RoutingTypeDefinition routingTypeDefinition); 044 045 /** 046 * Given a document, returns the searchable attribute values to index for it 047 * @param document the document to find indexable searchable attribute values for 048 * @param workflowAttributes the WorkflowAttributes data dictionary metadata which contains the searchable attributes to index 049 * @return a List of SearchableAttributeValue objects for index 050 */ 051 public abstract List<DocumentAttribute> resolveSearchableAttributeValues(Document document, WorkflowAttributes workflowAttributes); 052 053 /** 054 * Retrieves an object, the child of another given object passed in as a parameter, by the given path 055 * @param object an object to find a child object of 056 * @param path the path to that child object 057 * @return the child object 058 */ 059 public abstract Object getPropertyByPath(Object object, String path); 060 061 /** 062 * Determines the type of the field which is related to the given attribute name on instances of the given business object class 063 * @param businessObjectClass the class of the business object which has an attribute 064 * @param attributeName the name of the attribute 065 * @return the String constrant representing what Field#fieldDataType this represents 066 */ 067 public abstract String determineFieldDataType(Class<? extends BusinessObject> businessObjectClass, String attributeName); 068 069 /** 070 * Using the type of the sent in value, determines what kind of SearchableAttributeValue implementation should be passed back 071 * @param attributeKey 072 * @param value 073 * @return 074 */ 075 public DocumentAttribute buildSearchableAttribute(Class<? extends BusinessObject> businessObjectClass, String attributeKey, Object value); 076 077}