org.kuali.rice.kew.api.document.search
Class DocumentSearchCriteria

java.lang.Object
  extended by org.kuali.rice.core.api.mo.AbstractDataTransferObject
      extended by org.kuali.rice.kew.api.document.search.DocumentSearchCriteria
All Implemented Interfaces:
Serializable, ModelObjectBasic, ModelObjectComplete, DocumentSearchCriteriaContract

public final class DocumentSearchCriteria
extends AbstractDataTransferObject
implements DocumentSearchCriteriaContract

An immutable data transfer object implementation of the DocumentSearchCriteriaContract. Instances of this class should be constructed using the nested DocumentSearchCriteria.Builder class.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Nested Class Summary
static class DocumentSearchCriteria.Builder
          A builder which can be used to construct DocumentSearchCriteria instances.
 
Method Summary
 List<String> getAdditionalDocumentTypeNames()
          Returns an optional list of additional document type name criteria against which to search.
 String getApplicationDocumentId()
          Returns the application document id criteria to search against when executing the document search.
 String getApplicationDocumentStatus()
          Returns the application document status criteria to search against when executing the document search.
 String getApproverPrincipalName()
          Returns the criteria for the principal name of an "approver" of a document (someone who took action against the document) to search against when executing the document search.
 org.joda.time.DateTime getDateApplicationDocumentStatusChangedFrom()
          Returns the inclusive lower end of the date of application document status change criteria to search against when executing the document search.
 org.joda.time.DateTime getDateApplicationDocumentStatusChangedTo()
          Returns the inclusive upper end of the date of application document status change criteria to search against when executing the document search.
 org.joda.time.DateTime getDateApprovedFrom()
          Returns the inclusive lower end of the date approved criteria to search against when executing the document search.
 org.joda.time.DateTime getDateApprovedTo()
          Returns the inclusive upper end of the date approved criteria to search against when executing the document search.
 org.joda.time.DateTime getDateCreatedFrom()
          Returns the inclusive lower end of the date created criteria to search against when executing the document search.
 org.joda.time.DateTime getDateCreatedTo()
          Returns the inclusive upper end of the date created criteria to search against when executing the document search.
 org.joda.time.DateTime getDateFinalizedFrom()
          Returns the inclusive lower end of the date finalized criteria to search against when executing the document search.
 org.joda.time.DateTime getDateFinalizedTo()
          Returns the inclusive upper end of the date finalized criteria to search against when executing the document search.
 org.joda.time.DateTime getDateLastModifiedFrom()
          Returns the inclusive lower end of the date last modified criteria to search against when executing the document search.
 org.joda.time.DateTime getDateLastModifiedTo()
          Returns the inclusive upper end of the date last modified criteria to search against when executing the document search.
 Map<String,List<String>> getDocumentAttributeValues()
          Returns a map of document attribute values to search against when executing the document search.
 String getDocumentId()
          Returns the document id criteria to search against when executing the document search.
 List<DocumentStatusCategory> getDocumentStatusCategories()
          Returns an unmodifiable list of document status categories to search against when executing the document search.
 List<DocumentStatus> getDocumentStatuses()
          Returns an unmodifiable list of document statuses to search against when executing the document search.
 String getDocumentTypeName()
          Returns the document type name criteria to search against when executing the document search.
 String getInitiatorPrincipalName()
          Returns the criteria for the principal name of the document initiator to search against when executing the document search.
 String getIsAdvancedSearch()
          Returns a string that indicates if a query was run in advanced mode.
 Integer getMaxResults()
          Returns the requested maximum number of documents that should be returned from a document search performed using this criteria.
 RouteNodeLookupLogic getRouteNodeLookupLogic()
          Returns the logic that should be used when performing a document search against the route name.
 String getRouteNodeName()
          Returns the route node name criteria to search against when executing the document search.
 String getSaveName()
          Return the name under which to save this criteria so that it can be recalled and used again in the future.
 Integer getStartAtIndex()
          Returns the 0-based index in the result set at which to start returning results from a document search which is performed using this criteria.
 String getTitle()
          Returns the document title criteria to search against when executing the document search.
 String getViewerGroupId()
          Returns the criteria for the id of a group who is a "viewer" of a document (a group who received an action request related to the document) to search against when executing the document search.
 String getViewerPrincipalName()
          Returns the criteria for the principal name of a "viewer" of a document (someone who received an action request related to the document) to search against when executing the document search.
 
Methods inherited from class org.kuali.rice.core.api.mo.AbstractDataTransferObject
afterUnmarshal, beforeUnmarshal, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getDocumentId

public String getDocumentId()
Description copied from interface: DocumentSearchCriteriaContract
Returns the document id criteria to search against when executing the document search.

Specified by:
getDocumentId in interface DocumentSearchCriteriaContract
Returns:
the document id criteria

getDocumentStatuses

public List<DocumentStatus> getDocumentStatuses()
Description copied from interface: DocumentSearchCriteriaContract
Returns an unmodifiable list of document statuses to search against when executing the document search. If there is more than one of these, then the search should treat this as an "OR" case (i.e. search for documents with one or more of these statuses).

Specified by:
getDocumentStatuses in interface DocumentSearchCriteriaContract
Returns:
the document status criteria

getDocumentStatusCategories

public List<DocumentStatusCategory> getDocumentStatusCategories()
Description copied from interface: DocumentSearchCriteriaContract
Returns an unmodifiable list of document status categories to search against when executing the document search. If there is more than one of these, then the search should treat this as an "OR" case (i.e. search for documents that have a status contained in one or more of these categories).

Specified by:
getDocumentStatusCategories in interface DocumentSearchCriteriaContract
Returns:
the document status category criteria

getTitle

public String getTitle()
Description copied from interface: DocumentSearchCriteriaContract
Returns the document title criteria to search against when executing the document search.

Specified by:
getTitle in interface DocumentSearchCriteriaContract
Returns:
the title criteria

getApplicationDocumentId

public String getApplicationDocumentId()
Description copied from interface: DocumentSearchCriteriaContract
Returns the application document id criteria to search against when executing the document search.

Specified by:
getApplicationDocumentId in interface DocumentSearchCriteriaContract
Returns:
the application document id criteria

getApplicationDocumentStatus

public String getApplicationDocumentStatus()
Description copied from interface: DocumentSearchCriteriaContract
Returns the application document status criteria to search against when executing the document search.

Specified by:
getApplicationDocumentStatus in interface DocumentSearchCriteriaContract
Returns:
the application document status criteria

getInitiatorPrincipalName

public String getInitiatorPrincipalName()
Description copied from interface: DocumentSearchCriteriaContract
Returns the criteria for the principal name of the document initiator to search against when executing the document search. Follows the rules for principal name criteria (see class-level documentation).

Specified by:
getInitiatorPrincipalName in interface DocumentSearchCriteriaContract
Returns:
the initiator principal name criteria

getViewerPrincipalName

public String getViewerPrincipalName()
Description copied from interface: DocumentSearchCriteriaContract
Returns the criteria for the principal name of a "viewer" of a document (someone who received an action request related to the document) to search against when executing the document search. Follows the rules for principal name criteria (see class-level documentation).

Specified by:
getViewerPrincipalName in interface DocumentSearchCriteriaContract
Returns:
the viewer principal name criteria

getViewerGroupId

public String getViewerGroupId()
Description copied from interface: DocumentSearchCriteriaContract
Returns the criteria for the id of a group who is a "viewer" of a document (a group who received an action request related to the document) to search against when executing the document search. Group id criteria follows rules similar to principal name criteria:

Specified by:
getViewerGroupId in interface DocumentSearchCriteriaContract
Returns:
the viewer principal name criteria

getApproverPrincipalName

public String getApproverPrincipalName()
Description copied from interface: DocumentSearchCriteriaContract
Returns the criteria for the principal name of an "approver" of a document (someone who took action against the document) to search against when executing the document search. Follows the rules for principal name criteria (see class-level documentation).

Specified by:
getApproverPrincipalName in interface DocumentSearchCriteriaContract
Returns:
the viewer principal name criteria

getRouteNodeName

public String getRouteNodeName()
Description copied from interface: DocumentSearchCriteriaContract
Returns the route node name criteria to search against when executing the document search. By default this will match only documents which are at the node with the given name, unless DocumentSearchCriteriaContract.getRouteNodeLookupLogic() returns a non-null value that specifies different criteria for how the route node-based lookup should be performed.

Specified by:
getRouteNodeName in interface DocumentSearchCriteriaContract
Returns:
the route node name criteria

getRouteNodeLookupLogic

public RouteNodeLookupLogic getRouteNodeLookupLogic()
Description copied from interface: DocumentSearchCriteriaContract
Returns the logic that should be used when performing a document search against the route name. This essentially allows for the criteria to specify whether or not it should look at documents which are currently before, exactly at, or after the specified route node. This value only has an effect if the route node name is also defined on this criteria.

Specified by:
getRouteNodeLookupLogic in interface DocumentSearchCriteriaContract
Returns:
the route node lookup logic to use in conjunction with the route node name criteria

getDocumentTypeName

public String getDocumentTypeName()
Description copied from interface: DocumentSearchCriteriaContract
Returns the document type name criteria to search against when executing the document search. If the document type name matches a single document type exactly, this might trigger document search customizations which are tied to that document type (assuming the document type has such customizations configured).

In order for the map of document attribute values to be properly searchable, this document type name should result to a valid document type. This is because the document type itself defines information about custom document attributes and the parameters around how searches against those attributes can be executed.

Note that searches against a document type name should be document type hierarchy-aware. Meaning that the search should also return results for any documents that have document types that are children of the specified document type name (assuming that the specified document type name is valid and not wildcarded at all).

Specified by:
getDocumentTypeName in interface DocumentSearchCriteriaContract
Returns:
the document type name criteria

getAdditionalDocumentTypeNames

public List<String> getAdditionalDocumentTypeNames()
Description copied from interface: DocumentSearchCriteriaContract
Returns an optional list of additional document type name criteria against which to search. The search should effectively return all documents that have a document type name within the set of the main document type name on the criteria as well as any additional document type names.

As with DocumentSearchCriteriaContract.getDocumentTypeName(), the additional document type name criteria is document type hierarchy aware.

Specified by:
getAdditionalDocumentTypeNames in interface DocumentSearchCriteriaContract
Returns:
the list of additional document type names to use on the search criteria

getDateCreatedFrom

public org.joda.time.DateTime getDateCreatedFrom()
Description copied from interface: DocumentSearchCriteriaContract
Returns the inclusive lower end of the date created criteria to search against when executing the document search.

Specified by:
getDateCreatedFrom in interface DocumentSearchCriteriaContract
Returns:
the date created "from" criteria

getDateCreatedTo

public org.joda.time.DateTime getDateCreatedTo()
Description copied from interface: DocumentSearchCriteriaContract
Returns the inclusive upper end of the date created criteria to search against when executing the document search.

Specified by:
getDateCreatedTo in interface DocumentSearchCriteriaContract
Returns:
the date created "to" criteria

getDateLastModifiedFrom

public org.joda.time.DateTime getDateLastModifiedFrom()
Description copied from interface: DocumentSearchCriteriaContract
Returns the inclusive lower end of the date last modified criteria to search against when executing the document search.

Specified by:
getDateLastModifiedFrom in interface DocumentSearchCriteriaContract
Returns:
the date last modified "from" criteria

getDateLastModifiedTo

public org.joda.time.DateTime getDateLastModifiedTo()
Description copied from interface: DocumentSearchCriteriaContract
Returns the inclusive upper end of the date last modified criteria to search against when executing the document search.

Specified by:
getDateLastModifiedTo in interface DocumentSearchCriteriaContract
Returns:
the date last modified "to" criteria

getDateApprovedFrom

public org.joda.time.DateTime getDateApprovedFrom()
Description copied from interface: DocumentSearchCriteriaContract
Returns the inclusive lower end of the date approved criteria to search against when executing the document search.

Specified by:
getDateApprovedFrom in interface DocumentSearchCriteriaContract
Returns:
the date approved "from" criteria

getDateApprovedTo

public org.joda.time.DateTime getDateApprovedTo()
Description copied from interface: DocumentSearchCriteriaContract
Returns the inclusive upper end of the date approved criteria to search against when executing the document search.

Specified by:
getDateApprovedTo in interface DocumentSearchCriteriaContract
Returns:
the date approved "tp" criteria

getDateFinalizedFrom

public org.joda.time.DateTime getDateFinalizedFrom()
Description copied from interface: DocumentSearchCriteriaContract
Returns the inclusive lower end of the date finalized criteria to search against when executing the document search.

Specified by:
getDateFinalizedFrom in interface DocumentSearchCriteriaContract
Returns:
the date finalized "from" criteria

getDateFinalizedTo

public org.joda.time.DateTime getDateFinalizedTo()
Description copied from interface: DocumentSearchCriteriaContract
Returns the inclusive upper end of the date finalized criteria to search against when executing the document search.

Specified by:
getDateFinalizedTo in interface DocumentSearchCriteriaContract
Returns:
the date finalized "to" criteria

getDateApplicationDocumentStatusChangedFrom

public org.joda.time.DateTime getDateApplicationDocumentStatusChangedFrom()
Description copied from interface: DocumentSearchCriteriaContract
Returns the inclusive lower end of the date of application document status change criteria to search against when executing the document search.

Specified by:
getDateApplicationDocumentStatusChangedFrom in interface DocumentSearchCriteriaContract
Returns:
the date application document status changed "from" criteria

getDateApplicationDocumentStatusChangedTo

public org.joda.time.DateTime getDateApplicationDocumentStatusChangedTo()
Description copied from interface: DocumentSearchCriteriaContract
Returns the inclusive upper end of the date of application document status change criteria to search against when executing the document search.

Specified by:
getDateApplicationDocumentStatusChangedTo in interface DocumentSearchCriteriaContract
Returns:
the date application document status changed "to" criteria

getDocumentAttributeValues

public Map<String,List<String>> getDocumentAttributeValues()
Description copied from interface: DocumentSearchCriteriaContract
Returns a map of document attribute values to search against when executing the document search. The key of the map is the name of the document attribute, while the list of values contains values of those attributes to search against. These individual attribute values support the different search operations where appropriate. The resulting List of criteria values however should ultimately be "or"-ed together when executing the document search.

In order for the document attribute values to be processed as part of the criteria during the search, the DocumentSearchCriteriaContract.getDocumentTypeName() must return a valid name of a document type which is configured to understand the attributes passed as part of the document attribute values map.

Specified by:
getDocumentAttributeValues in interface DocumentSearchCriteriaContract
Returns:

getSaveName

public String getSaveName()
Description copied from interface: DocumentSearchCriteriaContract
Return the name under which to save this criteria so that it can be recalled and used again in the future. If no save name is specified, then this criteria will not be saved for future use.

Specified by:
getSaveName in interface DocumentSearchCriteriaContract
Returns:

getStartAtIndex

public Integer getStartAtIndex()
Description copied from interface: DocumentSearchCriteriaContract
Returns the 0-based index in the result set at which to start returning results from a document search which is performed using this criteria. If not specified, results from the search should be returned starting at the beginning of the result set. If this index is larger then the total number of results returned by the actual search, then no values should be returned.

Specified by:
getStartAtIndex in interface DocumentSearchCriteriaContract
Returns:
the index in the result set at which to begin returning results

getMaxResults

public Integer getMaxResults()
Description copied from interface: DocumentSearchCriteriaContract
Returns the requested maximum number of documents that should be returned from a document search performed using this criteria. If not specified, it is up to the document search implementation to decide how many results to return. It is likely in such cases that the implementation will use a default result cap in order to prevent too many documents from being returned.

It is important to note that this value is meant simply as a request to the document search for the number of results to return. The implementation may return fewer results then requested if it decides to impose it's own internal cap on results.

Specified by:
getMaxResults in interface DocumentSearchCriteriaContract
Returns:
the requested number of maximum document results that should be returned from the search

getIsAdvancedSearch

public String getIsAdvancedSearch()
Description copied from interface: DocumentSearchCriteriaContract
Returns a string that indicates if a query was run in advanced mode.

Specified by:
getIsAdvancedSearch in interface DocumentSearchCriteriaContract
Returns:
whether or not the search was run in advanced mode


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.