|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.workflow.attribute.DataDictionaryDocumentSearchCustomizer
public class DataDictionaryDocumentSearchCustomizer
Constructor Summary | |
---|---|
DataDictionaryDocumentSearchCustomizer()
|
|
DataDictionaryDocumentSearchCustomizer(SearchableAttribute searchableAttribute,
DocumentLookupCustomizer documentLookupCustomizer)
|
Method Summary | |
---|---|
DocumentLookupCriteria |
customizeClearCriteria(DocumentLookupCriteria documentLookupCriteria)
Performs a customized "clear" of the given document lookup criteria. |
DocumentLookupCriteria |
customizeCriteria(DocumentLookupCriteria documentLookupCriteria)
Performs customization on the given document lookup criteria. |
DocumentLookupResultValues |
customizeResults(DocumentLookupCriteria documentLookupCriteria,
List<DocumentLookupResult> defaultResults)
Performs customization of the given list of document lookup results. |
DocumentLookupResultSetConfiguration |
customizeResultSetConfiguration(DocumentLookupCriteria documentLookupCriteria)
Performs customization of what result fields should be displayed in the result set. |
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 lookups. |
String |
generateSearchContent(ExtensionDefinition extensionDefinition,
String documentTypeName,
WorkflowAttributeDefinition attributeDefinition)
Allows for generation of custom XML for this searchable attribute. |
protected DocumentLookupCustomizer |
getDocumentLookupCustomizer()
|
protected SearchableAttribute |
getSearchableAttribute()
|
List<RemotableAttributeField> |
getSearchFields(ExtensionDefinition extensionDefinition,
String documentTypeName)
Returns a list of RemotableAttributeField objects which define which searchable attribute criteria fields
should be included in the criteria section of the document lookup user interface for this searchable attribute. |
boolean |
isCustomizeClearCriteriaEnabled(String documentTypeName)
Indicates if the DocumentLookupCustomizer.customizeClearCriteria(org.kuali.rice.kew.api.document.lookup.DocumentLookupCriteria)
on this customizer should be invoked for the document type with the given name. |
boolean |
isCustomizeCriteriaEnabled(String documentTypeName)
Indicates if the DocumentLookupCustomizer.customizeCriteria(org.kuali.rice.kew.api.document.lookup.DocumentLookupCriteria) on
this customizer should be invoked for the document type with the given name. |
boolean |
isCustomizeResultsEnabled(String documentTypeName)
Indicates if the DocumentLookupCustomizer.customizeResults(org.kuali.rice.kew.api.document.lookup.DocumentLookupCriteria, java.util.List)
on this customizer should be invoked for the document type with the given name. |
boolean |
isCustomizeResultSetFieldsEnabled(String documentTypeName)
Indicates if the DocumentLookupCustomizer.customizeResultSetConfiguration(org.kuali.rice.kew.api.document.lookup.DocumentLookupCriteria)
on this customizer should be invoked for the document type with the given name. |
void |
setDocumentLookupCustomizer(DocumentLookupCustomizer documentLookupCustomizer)
|
void |
setSearchableAttribute(SearchableAttribute searchableAttribute)
|
List<RemotableAttributeError> |
validateDocumentAttributeCriteria(ExtensionDefinition extensionDefinition,
DocumentLookupCriteria documentLookupCriteria)
Performs custom validation of document attribute values that come from this searchable attribute whenever a document lookup 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 |
Constructor Detail |
---|
public DataDictionaryDocumentSearchCustomizer()
public DataDictionaryDocumentSearchCustomizer(SearchableAttribute searchableAttribute, DocumentLookupCustomizer documentLookupCustomizer)
Method Detail |
---|
public final String generateSearchContent(ExtensionDefinition extensionDefinition, String documentTypeName, WorkflowAttributeDefinition attributeDefinition)
SearchableAttribute
DocumentContentUpdate
). 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 SearchableAttribute
extensionDefinition
- 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 final List<DocumentAttribute> extractDocumentAttributes(ExtensionDefinition extensionDefinition, DocumentWithContent documentWithContent)
SearchableAttribute
There 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 SearchableAttribute
extensionDefinition
- the extension definition which was used to locate and load this searchable attribute
implementationdocumentWithContent
- the workflow document and it's XML content
DocumentAttributeFactory
public final List<RemotableAttributeField> getSearchFields(ExtensionDefinition extensionDefinition, String documentTypeName)
SearchableAttribute
RemotableAttributeField
objects which define which searchable attribute criteria fields
should be included in the criteria section of the document lookup user interface for this searchable attribute.
getSearchFields
in interface SearchableAttribute
extensionDefinition
- 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
public final List<RemotableAttributeError> validateDocumentAttributeCriteria(ExtensionDefinition extensionDefinition, DocumentLookupCriteria documentLookupCriteria)
SearchableAttribute
The entire DocumentLookupCriteria
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 lookup from the user interface as well as via
the WorkflowDocumentService
api.
validateDocumentAttributeCriteria
in interface SearchableAttribute
extensionDefinition
- the extension definition which was used to locate and load this searchable attribute
implementationdocumentLookupCriteria
- the criteria that was submitted to the document lookup and against which validation
is requested
public final DocumentLookupCriteria customizeCriteria(DocumentLookupCriteria documentLookupCriteria)
DocumentLookupCustomizer
It is guaranteed that the document type name on the given criteria will never be null and will always represent a valid document type.
customizeCriteria
in interface DocumentLookupCustomizer
documentLookupCriteria
- the original criteria against which to perform customization, will never be null
public final DocumentLookupCriteria customizeClearCriteria(DocumentLookupCriteria documentLookupCriteria)
DocumentLookupCustomizer
A common use of this feature is to preserve the document type that has been selected when clearing criteria for a customized document lookup.
It is guaranteed that the document type name on the given criteria will never be null and will always represent a valid document type.
customizeClearCriteria
in interface DocumentLookupCustomizer
documentLookupCriteria
- the criteria to clear
public final DocumentLookupResultValues customizeResults(DocumentLookupCriteria documentLookupCriteria, List<DocumentLookupResult> defaultResults)
DocumentLookupCustomizer
This method returns a DocumentLookupResultValues
object which contains a list of
DocumentLookupResultValue
objects. Each of these result values maps to a specific document id and
contains a list of DocumentAttribute
values which can be used
to modify existing document attributes or create new ones that are included as part of the lookup results. It
is important to note that in order for these custom attribute values to be displayed in the result set in the
document lookup user interface, there must be a corresponding entry in the
DocumentLookupResultSetConfiguration
returned by the
DocumentLookupCustomizer.customizeResultSetConfiguration(org.kuali.rice.kew.api.document.lookup.DocumentLookupCriteria)
method
on this customizer implementation.
It is permissible that implementations of this method may not return result values for all of the document provided in the given list of document lookup results. It is important to note however that ommision from the returned result values does not filter or remove the result from the lookup results. Generally speaking, this method cannot be used to remove results from the result set.
It is guaranteed that the document type name on the given criteria will never be null and will always represent a valid document type.
customizeResults
in interface DocumentLookupCustomizer
documentLookupCriteria
- the criteria against which the document lookup was executeddefaultResults
- the results that were returned by the execution of the document lookup
public DocumentLookupResultSetConfiguration customizeResultSetConfiguration(DocumentLookupCriteria documentLookupCriteria)
DocumentLookupCustomizer
This method is only invoked by the document lookup user interface whenever it is rendering document lookup results. It is not invoked when invoking document lookup using only the api.
It is guaranteed that the document type name on the given criteria will never be null and will always represent a valid document type.
customizeResultSetConfiguration
in interface DocumentLookupCustomizer
documentLookupCriteria
- the criteria against which the document lookup was executed
public final boolean isCustomizeCriteriaEnabled(String documentTypeName)
DocumentLookupCustomizer
DocumentLookupCustomizer.customizeCriteria(org.kuali.rice.kew.api.document.lookup.DocumentLookupCriteria)
on
this customizer should be invoked for the document type with the given name. The caller of this method is
permitted to cache the return value for a length of time of their choosing.
isCustomizeCriteriaEnabled
in interface DocumentLookupCustomizer
documentTypeName
- the name of the document type against which this customizer is being applied
public final boolean isCustomizeClearCriteriaEnabled(String documentTypeName)
DocumentLookupCustomizer
DocumentLookupCustomizer.customizeClearCriteria(org.kuali.rice.kew.api.document.lookup.DocumentLookupCriteria)
on this customizer should be invoked for the document type with the given name. The caller of this method is
permitted to cache the return value for a length of time of their choosing.
isCustomizeClearCriteriaEnabled
in interface DocumentLookupCustomizer
documentTypeName
- the name of the document type against which this customizer is being applied
public final boolean isCustomizeResultsEnabled(String documentTypeName)
DocumentLookupCustomizer
DocumentLookupCustomizer.customizeResults(org.kuali.rice.kew.api.document.lookup.DocumentLookupCriteria, java.util.List)
on this customizer should be invoked for the document type with the given name. The caller of this method is
permitted to cache the return value for a length of time of their choosing.
isCustomizeResultsEnabled
in interface DocumentLookupCustomizer
documentTypeName
- the name of the document type against which this customizer is being applied
public final boolean isCustomizeResultSetFieldsEnabled(String documentTypeName)
DocumentLookupCustomizer
DocumentLookupCustomizer.customizeResultSetConfiguration(org.kuali.rice.kew.api.document.lookup.DocumentLookupCriteria)
on this customizer should be invoked for the document type with the given name. The caller of this method is
permitted to cache the return value for a length of time of their choosing.
isCustomizeResultSetFieldsEnabled
in interface DocumentLookupCustomizer
documentTypeName
- the name of the document type against which this customizer is being applied
protected SearchableAttribute getSearchableAttribute()
public void setSearchableAttribute(SearchableAttribute searchableAttribute)
protected DocumentLookupCustomizer getDocumentLookupCustomizer()
public void setDocumentLookupCustomizer(DocumentLookupCustomizer documentLookupCustomizer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |