Class DocumentSearchCriteria.Builder
- All Implemented Interfaces:
Serializable,ModelBuilder,DocumentSearchCriteriaContract
- Enclosing class:
DocumentSearchCriteria
DocumentSearchCriteria instances. Enforces the constraints of
the DocumentSearchCriteriaContract.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddDocumentAttributeValue(String name, String value) add document attribute value to an internal mapbuild()create()Creates an empty builder instance.create(DocumentSearchCriteriaContract contract) Creates a new builder instance initialized with copies of the properties from the given contract.Returns an optional list of additional document type name criteria against which to search.Returns the application document id criteria to search against when executing the document search.Deprecated.Return the list of application document statuses to match when executing the document search.Returns the criteria for the principal id of an "approver" of a document (someone who took action against the document) to search against when executing the document search.Deprecated.usegetApproverPrincipalId()insteadorg.joda.time.DateTimeReturns the inclusive lower end of the date of application document status change criteria to search against when executing the document search.org.joda.time.DateTimeReturns the inclusive upper end of the date of application document status change criteria to search against when executing the document search.org.joda.time.DateTimeReturns the inclusive lower end of the date approved criteria to search against when executing the document search.org.joda.time.DateTimeReturns the inclusive upper end of the date approved criteria to search against when executing the document search.org.joda.time.DateTimeReturns the inclusive lower end of the date created criteria to search against when executing the document search.org.joda.time.DateTimeReturns the inclusive upper end of the date created criteria to search against when executing the document search.org.joda.time.DateTimeReturns the inclusive lower end of the date finalized criteria to search against when executing the document search.org.joda.time.DateTimeReturns the inclusive upper end of the date finalized criteria to search against when executing the document search.org.joda.time.DateTimeReturns the inclusive lower end of the date last modified criteria to search against when executing the document search.org.joda.time.DateTimeReturns the inclusive upper end of the date last modified criteria to search against when executing the document search.Returns the principalId of the user performing the searchReturns a map of document attribute values to search against when executing the document search.Returns the document id criteria to search against when executing the document search.Returns an unmodifiable list of document status categories to search against when executing the document search.Returns an unmodifiable list of document statuses to search against when executing the document search.Returns the document type name criteria to search against when executing the document search.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.Returns the criteria for the name 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.Returns the criteria for the principal id of the document initiator to search against when executing the document search.Deprecated.usegetInitiatorPrincipalId()insteadReturns a string that indicates if a query was run in advanced mode.Returns the requested maximum number of documents that should be returned from a document search performed using this criteria.Returns the logic that should be used when performing a document search against the route name.Returns the route node name criteria to search against when executing the document search.Return the name under which to save this criteria so that it can be recalled and used again in the future.Returns a map of custom options for document search when either executing the document search or returning results.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.getTitle()Returns the document title criteria to search against when executing the document search.Returns the criteria for the principal id of a "viewer" of a document (someone who received an action request related to the document) to search against when executing the document search.Deprecated.usegetViewerPrincipalId()insteadvoidResets DateTimes to local TimeZone (preserving absolute time)voidsetAdditionalDocumentTypeNames(List<String> additionalDocumentTypeNames) voidsetApplicationDocumentId(String applicationDocumentId) voidsetApplicationDocumentStatus(String applicationDocumentStatus) Deprecated.usesetApplicationDocumentStatuses(java.util.List)insteadvoidsetApplicationDocumentStatuses(List<String> applicationDocumentStatuses) voidsetApproverPrincipalId(String approverPrincipalId) voidsetApproverPrincipalName(String approverPrincipalName) Deprecated.usesetApproverPrincipalId(String)insteadvoidsetDateApplicationDocumentStatusChangedFrom(org.joda.time.DateTime dateApplicationDocumentStatusChangedFrom) voidsetDateApplicationDocumentStatusChangedTo(org.joda.time.DateTime dateApplicationDocumentStatusChangedTo) voidsetDateApprovedFrom(org.joda.time.DateTime dateApprovedFrom) voidsetDateApprovedTo(org.joda.time.DateTime dateApprovedTo) voidsetDateCreatedFrom(org.joda.time.DateTime dateCreatedFrom) voidsetDateCreatedTo(org.joda.time.DateTime dateCreatedTo) voidsetDateFinalizedFrom(org.joda.time.DateTime dateFinalizedFrom) voidsetDateFinalizedTo(org.joda.time.DateTime dateFinalizedTo) voidsetDateLastModifiedFrom(org.joda.time.DateTime dateLastModifiedFrom) voidsetDateLastModifiedTo(org.joda.time.DateTime dateLastModifiedTo) voidsetDocSearchUserId(String docSearchUserId) voidsetDocumentAttributeValues(Map<String, List<String>> documentAttributeValues) voidsetDocumentId(String documentId) voidsetDocumentStatusCategories(List<DocumentStatusCategory> documentStatusCategories) voidsetDocumentStatuses(List<DocumentStatus> documentStatuses) voidsetDocumentTypeName(String documentTypeName) voidsetGroupViewerId(String groupViewerId) voidsetGroupViewerName(String groupViewerName) voidsetInitiatorPrincipalId(String initiatorPrincipalId) voidsetInitiatorPrincipalName(String initiatorPrincipalName) Deprecated.usesetInitiatorPrincipalId(String)insteadvoidsetIsAdvancedSearch(String isAdvancedSearch) voidsetMaxResults(Integer maxResults) voidsetRouteNodeLookupLogic(RouteNodeLookupLogic routeNodeLookupLogic) voidsetRouteNodeName(String routeNodeName) voidsetSaveName(String saveName) voidsetSearchOptions(Map<String, List<String>> searchOptions) voidsetStartAtIndex(Integer startAtIndex) voidvoidsetViewerPrincipalId(String viewerPrincipalId) voidsetViewerPrincipalName(String viewerPrincipalName) Deprecated.usesetViewerPrincipalId(String)instead
-
Method Details
-
create
Creates an empty builder instance. All collections on the new instance are initialized to empty collections.- Returns:
- a new builder instance
-
create
Creates a new builder instance initialized with copies of the properties from the given contract.- Parameters:
contract- the contract from which to copy properties- Returns:
- a builder instance initialized with properties from the given contract
- Throws:
IllegalArgumentException- if the given contract is null
-
build
- Specified by:
buildin interfaceModelBuilder
-
getDocumentId
Description copied from interface:DocumentSearchCriteriaContractReturns the document id criteria to search against when executing the document search.- Specified by:
getDocumentIdin interfaceDocumentSearchCriteriaContract- Returns:
- the document id criteria
-
getDocumentStatuses
Description copied from interface:DocumentSearchCriteriaContractReturns 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:
getDocumentStatusesin interfaceDocumentSearchCriteriaContract- Returns:
- the document status criteria
-
getDocumentStatusCategories
Description copied from interface:DocumentSearchCriteriaContractReturns 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:
getDocumentStatusCategoriesin interfaceDocumentSearchCriteriaContract- Returns:
- the document status category criteria
-
getTitle
Description copied from interface:DocumentSearchCriteriaContractReturns the document title criteria to search against when executing the document search.- Specified by:
getTitlein interfaceDocumentSearchCriteriaContract- Returns:
- the title criteria
-
getApplicationDocumentId
Description copied from interface:DocumentSearchCriteriaContractReturns the application document id criteria to search against when executing the document search.- Specified by:
getApplicationDocumentIdin interfaceDocumentSearchCriteriaContract- Returns:
- the application document id criteria
-
getApplicationDocumentStatus
Deprecated.usegetApplicationDocumentStatuses()insteadDescription copied from interface:DocumentSearchCriteriaContractReturns the application document status criteria to search against when executing the document search.- Specified by:
getApplicationDocumentStatusin interfaceDocumentSearchCriteriaContract- Returns:
- the application document status criteria
-
getInitiatorPrincipalName
Deprecated.usegetInitiatorPrincipalId()insteadDescription copied from interface:DocumentSearchCriteriaContractReturns 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:
getInitiatorPrincipalNamein interfaceDocumentSearchCriteriaContract- Returns:
- the initiator principal name criteria
-
getInitiatorPrincipalId
Description copied from interface:DocumentSearchCriteriaContractReturns the criteria for the principal id of the document initiator to search against when executing the document search.- Specified by:
getInitiatorPrincipalIdin interfaceDocumentSearchCriteriaContract- Returns:
- the initiator principal id criteria
-
getViewerPrincipalName
Deprecated.usegetViewerPrincipalId()insteadDescription copied from interface:DocumentSearchCriteriaContractReturns 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:
getViewerPrincipalNamein interfaceDocumentSearchCriteriaContract- Returns:
- the viewer principal name criteria
-
getViewerPrincipalId
Description copied from interface:DocumentSearchCriteriaContractReturns the criteria for the principal id of a "viewer" of a document (someone who received an action request related to the document) to search against when executing the document search.- Specified by:
getViewerPrincipalIdin interfaceDocumentSearchCriteriaContract- Returns:
- the viewer principal id criteria
-
getGroupViewerId
Description copied from interface:DocumentSearchCriteriaContractReturns 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:- only literal group ids that resolve to a valid group are allowed
- however, if the group ids don't resolve to valid groups, this simply means the search will return no results
- "!" is allowed before a group id
- when wanting to search on more than one viewer group id, use of "|" and "invalid input: '&'invalid input: '&'" is allowed, though they cannot be used together
- Specified by:
getGroupViewerIdin interfaceDocumentSearchCriteriaContract- Returns:
- the viewer principal name criteria
-
getGroupViewerName
Description copied from interface:DocumentSearchCriteriaContractReturns the criteria for the name 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 name criteria follows rules similar to principal name criteria:- only literal group names that resolve to a valid group are allowed
- however, if the group names don't resolve to valid groups, this simply means the search will return no results
- "!" is allowed before a group id
- when wanting to search on more than one viewer group name, use of "|" and "invalid input: '&'invalid input: '&'" is allowed, though they cannot be used together
- Specified by:
getGroupViewerNamein interfaceDocumentSearchCriteriaContract- Returns:
- the viewer principal name criteria
-
getApproverPrincipalName
Deprecated.usegetApproverPrincipalId()insteadDescription copied from interface:DocumentSearchCriteriaContractReturns 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:
getApproverPrincipalNamein interfaceDocumentSearchCriteriaContract- Returns:
- the viewer principal name criteria
-
getApproverPrincipalId
Description copied from interface:DocumentSearchCriteriaContractReturns the criteria for the principal id of an "approver" of a document (someone who took action against the document) to search against when executing the document search.- Specified by:
getApproverPrincipalIdin interfaceDocumentSearchCriteriaContract- Returns:
- the viewer principal id criteria
-
getRouteNodeName
Description copied from interface:DocumentSearchCriteriaContractReturns 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, unlessDocumentSearchCriteriaContract.getRouteNodeLookupLogic()returns a non-null value that specifies different criteria for how the route node-based lookup should be performed.- Specified by:
getRouteNodeNamein interfaceDocumentSearchCriteriaContract- Returns:
- the route node name criteria
-
getRouteNodeLookupLogic
Description copied from interface:DocumentSearchCriteriaContractReturns 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:
getRouteNodeLookupLogicin interfaceDocumentSearchCriteriaContract- Returns:
- the route node lookup logic to use in conjunction with the route node name criteria
-
getDocumentTypeName
Description copied from interface:DocumentSearchCriteriaContractReturns 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:
getDocumentTypeNamein interfaceDocumentSearchCriteriaContract- Returns:
- the document type name criteria
-
getAdditionalDocumentTypeNames
Description copied from interface:DocumentSearchCriteriaContractReturns 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:
getAdditionalDocumentTypeNamesin interfaceDocumentSearchCriteriaContract- 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:DocumentSearchCriteriaContractReturns the inclusive lower end of the date created criteria to search against when executing the document search.- Specified by:
getDateCreatedFromin interfaceDocumentSearchCriteriaContract- Returns:
- the date created "from" criteria
-
getDateCreatedTo
public org.joda.time.DateTime getDateCreatedTo()Description copied from interface:DocumentSearchCriteriaContractReturns the inclusive upper end of the date created criteria to search against when executing the document search.- Specified by:
getDateCreatedToin interfaceDocumentSearchCriteriaContract- Returns:
- the date created "to" criteria
-
getDateLastModifiedFrom
public org.joda.time.DateTime getDateLastModifiedFrom()Description copied from interface:DocumentSearchCriteriaContractReturns the inclusive lower end of the date last modified criteria to search against when executing the document search.- Specified by:
getDateLastModifiedFromin interfaceDocumentSearchCriteriaContract- Returns:
- the date last modified "from" criteria
-
getDateLastModifiedTo
public org.joda.time.DateTime getDateLastModifiedTo()Description copied from interface:DocumentSearchCriteriaContractReturns the inclusive upper end of the date last modified criteria to search against when executing the document search.- Specified by:
getDateLastModifiedToin interfaceDocumentSearchCriteriaContract- Returns:
- the date last modified "to" criteria
-
getDateApprovedFrom
public org.joda.time.DateTime getDateApprovedFrom()Description copied from interface:DocumentSearchCriteriaContractReturns the inclusive lower end of the date approved criteria to search against when executing the document search.- Specified by:
getDateApprovedFromin interfaceDocumentSearchCriteriaContract- Returns:
- the date approved "from" criteria
-
getDateApprovedTo
public org.joda.time.DateTime getDateApprovedTo()Description copied from interface:DocumentSearchCriteriaContractReturns the inclusive upper end of the date approved criteria to search against when executing the document search.- Specified by:
getDateApprovedToin interfaceDocumentSearchCriteriaContract- Returns:
- the date approved "tp" criteria
-
getDateFinalizedFrom
public org.joda.time.DateTime getDateFinalizedFrom()Description copied from interface:DocumentSearchCriteriaContractReturns the inclusive lower end of the date finalized criteria to search against when executing the document search.- Specified by:
getDateFinalizedFromin interfaceDocumentSearchCriteriaContract- Returns:
- the date finalized "from" criteria
-
getDateFinalizedTo
public org.joda.time.DateTime getDateFinalizedTo()Description copied from interface:DocumentSearchCriteriaContractReturns the inclusive upper end of the date finalized criteria to search against when executing the document search.- Specified by:
getDateFinalizedToin interfaceDocumentSearchCriteriaContract- Returns:
- the date finalized "to" criteria
-
getDateApplicationDocumentStatusChangedFrom
public org.joda.time.DateTime getDateApplicationDocumentStatusChangedFrom()Description copied from interface:DocumentSearchCriteriaContractReturns the inclusive lower end of the date of application document status change criteria to search against when executing the document search.- Specified by:
getDateApplicationDocumentStatusChangedFromin interfaceDocumentSearchCriteriaContract- Returns:
- the date application document status changed "from" criteria
-
getDateApplicationDocumentStatusChangedTo
public org.joda.time.DateTime getDateApplicationDocumentStatusChangedTo()Description copied from interface:DocumentSearchCriteriaContractReturns the inclusive upper end of the date of application document status change criteria to search against when executing the document search.- Specified by:
getDateApplicationDocumentStatusChangedToin interfaceDocumentSearchCriteriaContract- Returns:
- the date application document status changed "to" criteria
-
getDocumentAttributeValues
Description copied from interface:DocumentSearchCriteriaContractReturns 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:
getDocumentAttributeValuesin interfaceDocumentSearchCriteriaContract- Returns:
-
getSearchOptions
Description copied from interface:DocumentSearchCriteriaContractReturns a map of custom options for document search when either executing the document search or returning results. The key of the map is the name of the document attribute, while the list of values contains values of those attributes to customize against.In order for the search options to be processed as part of the criteria during the search, a custom document search customizer must be used to fill and process these values.
- Specified by:
getSearchOptionsin interfaceDocumentSearchCriteriaContract- Returns:
-
getSaveName
Description copied from interface:DocumentSearchCriteriaContractReturn 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:
getSaveNamein interfaceDocumentSearchCriteriaContract- Returns:
-
getStartAtIndex
Description copied from interface:DocumentSearchCriteriaContractReturns 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:
getStartAtIndexin interfaceDocumentSearchCriteriaContract- Returns:
- the index in the result set at which to begin returning results
-
getMaxResults
Description copied from interface:DocumentSearchCriteriaContractReturns 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:
getMaxResultsin interfaceDocumentSearchCriteriaContract- Returns:
- the requested number of maximum document results that should be returned from the search
-
getIsAdvancedSearch
Description copied from interface:DocumentSearchCriteriaContractReturns a string that indicates if a query was run in advanced mode.- Specified by:
getIsAdvancedSearchin interfaceDocumentSearchCriteriaContract- Returns:
- whether or not the search was run in advanced mode
-
getApplicationDocumentStatuses
Description copied from interface:DocumentSearchCriteriaContractReturn the list of application document statuses to match when executing the document search.- Specified by:
getApplicationDocumentStatusesin interfaceDocumentSearchCriteriaContract- Returns:
- the list of application document statuses to match
-
getDocSearchUserId
Description copied from interface:DocumentSearchCriteriaContractReturns the principalId of the user performing the search- Specified by:
getDocSearchUserIdin interfaceDocumentSearchCriteriaContract- Returns:
-
setDocumentId
-
setDocumentStatuses
-
setDocumentStatusCategories
-
setTitle
-
setApplicationDocumentId
-
setApplicationDocumentStatus
Deprecated.usesetApplicationDocumentStatuses(java.util.List)instead -
setInitiatorPrincipalName
Deprecated.usesetInitiatorPrincipalId(String)instead- Parameters:
initiatorPrincipalName-
-
setInitiatorPrincipalId
-
setViewerPrincipalName
Deprecated.usesetViewerPrincipalId(String)instead- Parameters:
viewerPrincipalName-
-
setViewerPrincipalId
-
setGroupViewerId
-
setGroupViewerName
-
setApproverPrincipalName
Deprecated.usesetApproverPrincipalId(String)instead- Parameters:
approverPrincipalName-
-
setApproverPrincipalId
-
setRouteNodeName
-
setRouteNodeLookupLogic
-
setDocumentTypeName
-
setAdditionalDocumentTypeNames
-
setDateCreatedFrom
public void setDateCreatedFrom(org.joda.time.DateTime dateCreatedFrom) -
setDateCreatedTo
public void setDateCreatedTo(org.joda.time.DateTime dateCreatedTo) -
setDateLastModifiedFrom
public void setDateLastModifiedFrom(org.joda.time.DateTime dateLastModifiedFrom) -
setDateLastModifiedTo
public void setDateLastModifiedTo(org.joda.time.DateTime dateLastModifiedTo) -
setDateApprovedFrom
public void setDateApprovedFrom(org.joda.time.DateTime dateApprovedFrom) -
setDateApprovedTo
public void setDateApprovedTo(org.joda.time.DateTime dateApprovedTo) -
setDateFinalizedFrom
public void setDateFinalizedFrom(org.joda.time.DateTime dateFinalizedFrom) -
setDateFinalizedTo
public void setDateFinalizedTo(org.joda.time.DateTime dateFinalizedTo) -
setDateApplicationDocumentStatusChangedFrom
public void setDateApplicationDocumentStatusChangedFrom(org.joda.time.DateTime dateApplicationDocumentStatusChangedFrom) -
setDateApplicationDocumentStatusChangedTo
public void setDateApplicationDocumentStatusChangedTo(org.joda.time.DateTime dateApplicationDocumentStatusChangedTo) -
setDocumentAttributeValues
-
addDocumentAttributeValue
add document attribute value to an internal map- Parameters:
name- - the attribute namevalue- - the attribute value
-
setSearchOptions
-
setSaveName
-
setStartAtIndex
-
setMaxResults
-
setIsAdvancedSearch
-
setApplicationDocumentStatuses
- Since:
- 2.1.2
-
setDocSearchUserId
-
normalizeDateTimes
public void normalizeDateTimes()Resets DateTimes to local TimeZone (preserving absolute time)- See Also:
-
getApplicationDocumentStatuses()instead