| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.kns.workflow.attribute.DataDictionarySearchableAttribute
public class DataDictionarySearchableAttribute
| Field Summary | |
|---|---|
| static String | DATA_TYPE_BOOLEAN | 
| Constructor Summary | |
|---|---|
| DataDictionarySearchableAttribute() | |
| Method Summary | |
|---|---|
| protected  List<Row> | createFieldRowsForBusinessObject(Class<? extends BusinessObject> businessObjectClass)Creates a list of search fields, one for each primary key of the maintained business object | 
| protected  List<Row> | createFieldRowsForWorkflowAttributes(WorkflowAttributes attrs) | 
|  List<DocumentAttribute> | extractDocumentAttributes(ExtensionDefinition extensionDefinition,
                                                   DocumentWithContent documentWithContent)Extracts and returns document attributes for the given document in order to allow indexing of those values for association with the document and use in document searches. | 
| protected  List<DocumentAttribute> | findAllDocumentAttributesForGlobalBusinessObject(GlobalBusinessObject globalBO) | 
| protected  DocumentAttribute | generateSearchableAttributeFromChange(PersistableBusinessObject changeToPersist) | 
|  String | generateSearchContent(ExtensionDefinition extensionDefinition,
                                           String documentTypeName,
                                           WorkflowAttributeDefinition attributeDefinition)Allows for generation of custom XML for this searchable attribute. | 
| protected  Class<? extends 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 | 
|  List<RemotableAttributeField> | getSearchFields(ExtensionDefinition extensionDefinition,
                               String documentTypeName)Returns a list of RemotableAttributeFieldobjects which define which searchable attribute criteria fields
 should be included in the criteria section of the document search user interface for this searchable attribute. | 
| protected  List<Row> | getSearchingRows(String documentTypeName)Produces legacy KNS rows to use for search attributes. | 
| protected  List<DocumentAttribute> | parsePrimaryKeyValuesFromDocument(Class<? extends BusinessObject> businessObjectClass,
                                                                   MaintenanceDocument document) | 
| protected  DocumentAttribute | parseSearchableAttributeValueForPrimaryKey(String propertyName,
                                                                                     Class<? extends 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 BusinessObject> businessObjectClass) | 
| protected  MaintenanceDocumentEntry | retrieveMaintenanceDocumentEntry(String documentTypeName)Retrieves the maintenance document entry for the given document type name | 
| protected  void | retrieveValidationErrorsFromGlobalVariables(List<RemotableAttributeError> validationErrors)Retrieves validation errors from GlobalVariables MessageMap and appends to the given list of RemotableAttributeError | 
|  List<RemotableAttributeError> | validateDocumentAttributeCriteria(ExtensionDefinition extensionDefinition,
                                                                   DocumentSearchCriteria documentSearchCriteria)Performs custom validation of document attribute values that come from this searchable attribute whenever a document search is performed against a document type which uses this searchable attribute. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final String DATA_TYPE_BOOLEAN
| Constructor Detail | 
|---|
public DataDictionarySearchableAttribute()
| Method Detail | 
|---|
public String generateSearchContent(ExtensionDefinition extensionDefinition,
                                    String documentTypeName,
                                    WorkflowAttributeDefinition attributeDefinition)
SearchableAttributeDocumentContentUpdate).  This XML is ultimately included as part of the
 document's content.
 It is intended that this XML can be used by the extractDocumentAttributes method in order to pull
 values out for indexing, though this method is free to use any source available to it for extracting data for
 indexing alongside a document.
A null or blank value may be returned from this method to indicate that no XML was generated.
generateSearchContent in interface SearchableAttributeextensionDefinition - the extension definition which was used to locate and load this searchable attribute
 implementationdocumentTypeName - the name of the document type for which this method is being invokedattributeDefinition - contains parameters and properties that can be used to inform generation of the XML,
 these are supplied by the user of the workflow API when the document's searchable XML content is requested to be
 updated
public List<DocumentAttribute> extractDocumentAttributes(ExtensionDefinition extensionDefinition,
                                                         DocumentWithContent documentWithContent)
SearchableAttributeThere are a finite set of DocumentAttribute implementations which can be returned and interpreted
 correctly.  Client application's should not create custom extensions of the
 DocumentAttribute abstract class but should preferably use the
 DocumentAttributeFactory to construct strongly-typed document
 attribute instances for indexing.
extractDocumentAttributes in interface SearchableAttributeextensionDefinition - the extension definition which was used to locate and load this searchable attribute
 implementationdocumentWithContent - the workflow document and it's XML content
DocumentAttributeFactory
public List<RemotableAttributeField> getSearchFields(ExtensionDefinition extensionDefinition,
                                                     String documentTypeName)
SearchableAttributeRemotableAttributeField objects which define which searchable attribute criteria fields
 should be included in the criteria section of the document search user interface for this searchable attribute.
getSearchFields in interface SearchableAttributeextensionDefinition - the extension definition which was used to locate and load this searchable attribute
 implementationdocumentTypeName - the name of the document type for which this method is being invoked
protected List<Row> getSearchingRows(String documentTypeName)
public List<RemotableAttributeError> validateDocumentAttributeCriteria(ExtensionDefinition extensionDefinition,
                                                                       DocumentSearchCriteria documentSearchCriteria)
SearchableAttributeThe entire DocumentSearchCriteria is passed to this method, though it's intended that implementing
 code will pull out the document attribute values on the criteria which are managed by this searchable attribute
 and perform any desired validation.  However, there are certainly no restrictions on this method that would
 prevent it from performing validations outside of this scope and in relation to other portions of the criteria,
 though this is certainly not the intent of this validation hook.
Note that this method is invoked when performing a document search from the user interface as well as via
 the WorkflowDocumentService api.
validateDocumentAttributeCriteria in interface SearchableAttributeextensionDefinition - the extension definition which was used to locate and load this searchable attribute
 implementationdocumentSearchCriteria - the criteria that was submitted to the document search and against which validation
 is requested
protected void retrieveValidationErrorsFromGlobalVariables(List<RemotableAttributeError> validationErrors)
validationErrors - list to append validation errorsprotected List<Row> createFieldRowsForWorkflowAttributes(WorkflowAttributes attrs)
protected List<DocumentAttribute> parsePrimaryKeyValuesFromDocument(Class<? extends BusinessObject> businessObjectClass,
                                                                    MaintenanceDocument document)
protected DocumentAttribute parseSearchableAttributeValueForPrimaryKey(String propertyName,
                                                                       Class<? extends BusinessObject> businessObjectClass,
                                                                       MaintenanceDocument document)
propertyName - the name of the property to returnbusinessObjectClass - the class of the business object maintaineddocument - the document XML
protected Class<? extends BusinessObject> getBusinessObjectClass(String documentTypeName)
documentTypeName - the name of the document type to look up the maintained business object for
protected Class<? extends Maintainable> getMaintainableClass(String documentTypeName)
documentTypeName - the name of the document type to look up the maintained business object for
protected MaintenanceDocumentEntry retrieveMaintenanceDocumentEntry(String documentTypeName)
documentTypeName - the document type name to look up the data dictionary document entry for
protected GlobalBusinessObject retrieveGlobalBusinessObject(String documentNumber,
                                                            Class<? extends BusinessObject> businessObjectClass)
protected List<DocumentAttribute> findAllDocumentAttributesForGlobalBusinessObject(GlobalBusinessObject globalBO)
protected DocumentAttribute generateSearchableAttributeFromChange(PersistableBusinessObject changeToPersist)
protected List<Row> createFieldRowsForBusinessObject(Class<? extends BusinessObject> businessObjectClass)
businessObjectClass - the class of the maintained business object
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||