org.kuali.rice.kns.workflow.attribute
Class DataDictionarySearchableAttribute

java.lang.Object
  extended by org.kuali.rice.kns.workflow.attribute.DataDictionarySearchableAttribute
All Implemented Interfaces:
Serializable, SearchableAttribute

public class DataDictionarySearchableAttribute
extends Object
implements SearchableAttribute

This class...

See Also:
Serialized Form

Field Summary
static String DATA_TYPE_BOOLEAN
           
 
Fields inherited from interface org.kuali.rice.kew.docsearch.SearchableAttribute
DATA_TYPE_DATE, DATA_TYPE_FLOAT, DATA_TYPE_LONG, DATA_TYPE_STRING, DEFAULT_RANGE_SEARCH_LOWER_BOUND_LABEL, DEFAULT_RANGE_SEARCH_UPPER_BOUND_LABEL, DEFAULT_SEARCHABLE_ATTRIBUTE_TYPE_NAME, RANGE_LOWER_BOUND_PROPERTY_PREFIX, RANGE_UPPER_BOUND_PROPERTY_PREFIX, SEARCH_WILDCARD_CHARACTER, SEARCH_WILDCARD_CHARACTER_REGEX_ESCAPED, SEARCHABLE_ATTRIBUTE_BASE_CLASS_LIST
 
Constructor Summary
DataDictionarySearchableAttribute()
           
 
Method Summary
protected  List<Row> createFieldRowsForBusinessObject(Class<? extends org.kuali.rice.kns.bo.BusinessObject> businessObjectClass)
          Creates a list of search fields, one for each primary key of the maintained business object
protected  List<Row> createFieldRowsForWorkflowAttributes(WorkflowAttributes attrs)
          Creates a list of search fields, one for each primary key of the maintained business object
protected  List<SearchableAttributeValue> findAllSearchableAttributesForGlobalBusinessObject(GlobalBusinessObject globalBO)
           
protected  SearchableAttributeValue generateSearchableAttributeFromChange(PersistableBusinessObject changeToPersist)
           
protected  Class<? extends org.kuali.rice.kns.bo.BusinessObject> getBusinessObjectClass(String documentTypeName)
          Returns the class of the object being maintained by the given maintenance document type name
protected  Class<? extends Maintainable> getMaintainableClass(String documentTypeName)
          Returns the maintainable of the object being maintained by the given maintenance document type name
 String getSearchContent(DocumentSearchContext documentSearchContext)
          this gives the xml representation of the attribute; returning a standard java xml object might be a better approach here
 List<Row> getSearchingRows(DocumentSearchContext documentSearchContext)
          this will return a list of field objects to be rendered in the docsearch interface
 List<SearchableAttributeValue> getSearchStorageValues(DocumentSearchContext documentSearchContext)
          this will return the loaded data objects for storage in workflow�s database to be related to the document the attributes xml content was loaded with
protected  List<SearchableAttributeValue> parsePrimaryKeyValuesFromDocument(Class<? extends org.kuali.rice.kns.bo.BusinessObject> businessObjectClass, MaintenanceDocument document)
           
protected  SearchableAttributeValue parseSearchableAttributeValueForPrimaryKey(String propertyName, Class<? extends org.kuali.rice.kns.bo.BusinessObject> businessObjectClass, MaintenanceDocument document)
          Creates a searchable attribute value for the given property name out of the document XML
protected  GlobalBusinessObject retrieveGlobalBusinessObject(String documentNumber, Class<? extends org.kuali.rice.kns.bo.BusinessObject> businessObjectClass)
           
protected  MaintenanceDocumentEntry retrieveMaintenanceDocumentEntry(String documentTypeName)
          Retrieves the maintenance document entry for the given document type name
 List<WorkflowAttributeValidationError> validateUserSearchInputs(Map<Object,Object> paramMap, DocumentSearchContext searchContext)
          this will return a list of error objects if the user has made an input error
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_TYPE_BOOLEAN

public static final String DATA_TYPE_BOOLEAN
See Also:
Constant Field Values
Constructor Detail

DataDictionarySearchableAttribute

public DataDictionarySearchableAttribute()
Method Detail

getSearchContent

public String getSearchContent(DocumentSearchContext documentSearchContext)
Description copied from interface: SearchableAttribute
this gives the xml representation of the attribute; returning a standard java xml object might be a better approach here

Specified by:
getSearchContent in interface SearchableAttribute
Returns:
See Also:
SearchableAttribute.getSearchContent(org.kuali.rice.kew.docsearch.DocumentSearchContext)

getSearchStorageValues

public List<SearchableAttributeValue> getSearchStorageValues(DocumentSearchContext documentSearchContext)
Description copied from interface: SearchableAttribute
this will return the loaded data objects for storage in workflow�s database to be related to the document the attributes xml content was loaded with

Specified by:
getSearchStorageValues in interface SearchableAttribute
Returns:
See Also:
SearchableAttribute.getSearchStorageValues(org.kuali.rice.kew.docsearch.DocumentSearchContext)

getSearchingRows

public List<Row> getSearchingRows(DocumentSearchContext documentSearchContext)
Description copied from interface: SearchableAttribute
this will return a list of field objects to be rendered in the docsearch interface

Specified by:
getSearchingRows in interface SearchableAttribute
Returns:
See Also:
SearchableAttribute.getSearchingRows(org.kuali.rice.kew.docsearch.DocumentSearchContext)

validateUserSearchInputs

public List<WorkflowAttributeValidationError> validateUserSearchInputs(Map<Object,Object> paramMap,
                                                                       DocumentSearchContext searchContext)
Description copied from interface: SearchableAttribute
this will return a list of error objects if the user has made an input error

Specified by:
validateUserSearchInputs in interface SearchableAttribute
Parameters:
paramMap - map
searchContext - document search context
Returns:
list of workflow attribute validation errors

createFieldRowsForWorkflowAttributes

protected List<Row> createFieldRowsForWorkflowAttributes(WorkflowAttributes attrs)
Creates a list of search fields, one for each primary key of the maintained business object

Parameters:
businessObjectClass - the class of the maintained business object
Returns:
a List of KEW search fields

parsePrimaryKeyValuesFromDocument

protected List<SearchableAttributeValue> parsePrimaryKeyValuesFromDocument(Class<? extends org.kuali.rice.kns.bo.BusinessObject> businessObjectClass,
                                                                           MaintenanceDocument document)
Parameters:
businessObjectClass -
documentContent -
Returns:

parseSearchableAttributeValueForPrimaryKey

protected SearchableAttributeValue parseSearchableAttributeValueForPrimaryKey(String propertyName,
                                                                              Class<? extends org.kuali.rice.kns.bo.BusinessObject> businessObjectClass,
                                                                              MaintenanceDocument document)
Creates a searchable attribute value for the given property name out of the document XML

Parameters:
propertyName - the name of the property to return
businessObjectClass - the class of the business object maintained
document - the document XML
Returns:
a generated SearchableAttributeValue, or null if a value could not be created

getBusinessObjectClass

protected Class<? extends org.kuali.rice.kns.bo.BusinessObject> getBusinessObjectClass(String documentTypeName)
Returns the class of the object being maintained by the given maintenance document type name

Parameters:
documentTypeName - the name of the document type to look up the maintained business object for
Returns:
the class of the maintained business object

getMaintainableClass

protected Class<? extends Maintainable> getMaintainableClass(String documentTypeName)
Returns the maintainable of the object being maintained by the given maintenance document type name

Parameters:
documentTypeName - the name of the document type to look up the maintained business object for
Returns:
the Maintainable of the maintained business object

retrieveMaintenanceDocumentEntry

protected MaintenanceDocumentEntry retrieveMaintenanceDocumentEntry(String documentTypeName)
Retrieves the maintenance document entry for the given document type name

Parameters:
documentTypeName - the document type name to look up the data dictionary document entry for
Returns:
the corresponding data dictionary entry for a maintenance document

retrieveGlobalBusinessObject

protected GlobalBusinessObject retrieveGlobalBusinessObject(String documentNumber,
                                                            Class<? extends org.kuali.rice.kns.bo.BusinessObject> businessObjectClass)
Parameters:
documentNumber -
businessObjectClass -
document -
Returns:

findAllSearchableAttributesForGlobalBusinessObject

protected List<SearchableAttributeValue> findAllSearchableAttributesForGlobalBusinessObject(GlobalBusinessObject globalBO)
Parameters:
globalBO -
Returns:

generateSearchableAttributeFromChange

protected SearchableAttributeValue generateSearchableAttributeFromChange(PersistableBusinessObject changeToPersist)
Parameters:
changeToPersist -
Returns:

createFieldRowsForBusinessObject

protected List<Row> createFieldRowsForBusinessObject(Class<? extends org.kuali.rice.kns.bo.BusinessObject> businessObjectClass)
Creates a list of search fields, one for each primary key of the maintained business object

Parameters:
businessObjectClass - the class of the maintained business object
Returns:
a List of KEW search fields


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.