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