public class SearchTaskImpl extends java.lang.Object implements SearchTask
SearchTask
. The default algorithms used
for the various search hook points are defined here.
See the following classes for more details:
Modifier and Type | Field and Description |
---|---|
protected SearchTaskSQL |
searchTaskSQL
The task search SQL hook.
|
protected curam.core.sl.impl.TaskSort |
taskSort
The task sort hook.
|
Constructor and Description |
---|
SearchTaskImpl()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
curam.core.struct.Count |
countAvailableTasks()
Returns a count of the available tasks for the currently logged in user
using the search criteria stored for the user in the database.
|
curam.core.struct.Count |
countTasks(curam.core.sl.struct.TaskQueryCriteria criteria)
Returns a count of the tasks satisfying the specified search criteria.
|
curam.core.struct.AvailableTaskSearchResult |
searchAvailableTasks(curam.core.sl.struct.ReadMultiOperationDetails readMultiDetails)
Returns a list of available tasks for the currently logged in user using
the search criteria stored for the user in the database.
|
curam.core.sl.struct.TaskQueryResultDetailsList |
searchTask(curam.core.sl.struct.TaskQueryKey searchTaskKey,
curam.core.sl.struct.ReadMultiOperationDetails readMultiDetails)
Returns a list of task details using the specified search criteria.
|
void |
validateSearchTask(curam.core.sl.struct.TaskQueryKey searchTaskKey)
Validates search details before performing a search.
|
@Inject protected curam.core.sl.impl.TaskSort taskSort
@Inject protected SearchTaskSQL searchTaskSQL
public curam.core.sl.struct.TaskQueryResultDetailsList searchTask(curam.core.sl.struct.TaskQueryKey searchTaskKey, curam.core.sl.struct.ReadMultiOperationDetails readMultiDetails) throws curam.util.exception.AppException, curam.util.exception.InformationalException
The number of tasks that returned may be limited. This may be changed by
altering the ENV_INBOX_MAX_TASK_LIST_SIZE
application property. The default is 100. If
the number of records exceeds the specified maximum value then an
informational message is returned (
INF_READMULTI_MAX_EXCEEDED
) informing the user that more records exist.
By default the returned tasks are ordered deadline time in ascending order
using the sort class TaskSortByDeadlineAscending
. The sort order can be changed by using Guice
to bind TaskSort
to another sort class.
searchTask
in interface SearchTask
searchTaskKey
- The criteria to be used in the search.readMultiDetails
- Specifies the maximum size of the return list.curam.util.exception.AppException
curam.util.exception.InformationalException
validateSearchTask(TaskQueryKey)
,
countTasks(TaskQueryCriteria)
public curam.core.struct.AvailableTaskSearchResult searchAvailableTasks(curam.core.sl.struct.ReadMultiOperationDetails readMultiDetails) throws curam.util.exception.AppException, curam.util.exception.InformationalException
The user preferences of type USERSEARCHTYPE.TASK
are queried
to determine if the specified user had previously completed an available
task search. If such a search had been executed, then the criteria used is
read from the preferences and used for this search function. If no search
had been executed, the default criteria to use is to search for available
tasks assigned directly to that user and tasks assigned to the position(s)
that the user is a member of. Tasks of all due dates and all priorities are
included when this scenario occurs.
The number of tasks that returned may be limited. This may be changed by
altering the ENV_INBOX_MAX_TASK_LIST_SIZE
application property. The default is 100. If
the number of records exceeds the specified maximum value then an
informational message is returned (
INF_READMULTI_MAX_EXCEEDED
) informing the user that more records exist.
By default the returned tasks are ordered deadline time in ascending order
using the sort class TaskSortByDeadlineAscending
. The sort order can be changed by using Guice
to bind TaskSort
to another sort class.
searchAvailableTasks
in interface SearchTask
readMultiDetails
- Specifies the maximum size of the return list.curam.util.exception.AppException
curam.util.exception.InformationalException
countAvailableTasks()
public curam.core.struct.Count countAvailableTasks() throws curam.util.exception.AppException, curam.util.exception.InformationalException
The user preferences of type USERSEARCHTYPE.TASK
are queried
to determine if the specified user had previously completed an available
task search. If such a search had been executed, then the criteria used is
read from the preferences and used for this count function. If no search
had been executed, the default criteria to use is to count tasks assigned
directly to that user and tasks assigned to the position(s) that the user
is a member of.
countAvailableTasks
in interface SearchTask
curam.util.exception.AppException
curam.util.exception.InformationalException
public curam.core.struct.Count countTasks(curam.core.sl.struct.TaskQueryCriteria criteria) throws curam.util.exception.AppException, curam.util.exception.InformationalException
countTasks
in interface SearchTask
criteria
- The search criteria.curam.util.exception.AppException
curam.util.exception.InformationalException
searchTask(TaskQueryKey, ReadMultiOperationDetails)
public void validateSearchTask(curam.core.sl.struct.TaskQueryKey searchTaskKey) throws curam.util.exception.AppException, curam.util.exception.InformationalException
validateSearchTask
in interface SearchTask
searchTaskKey
- The task search criteria key.curam.util.exception.AppException
curam.util.exception.InformationalException