Package dev.getelements.elements.sdk.dao
Interface ProgressDao
- All Known Implementing Classes:
MongoProgressDao
public interface ProgressDao
Created by davidjbrooks on 12/05/18.
-
Method Summary
Modifier and TypeMethodDescriptionadvanceProgress
(Progress progress, int actionsPerformed) AdvancesProgress
by the specified number of actions.createOrGetExistingProgress
(Progress progress) Creates a progress.void
deleteProgress
(String progressId) Deletes a progress.findProgress
(String progressId) Gets the progress with the id, or throws aNotFoundException
if the progress can't be found.findProgressForProfileAndMission
(Profile profile, String missionNameOrId) default Progress
getProgress
(String progressId) Gets the progress with the id, or throws aNotFoundException
if the progress can't be found.getProgresses
(int offset, int count, List<String> tags) Gets progresses specifying the offset and the count.getProgresses
(int offset, int count, List<String> tags, String search) Gets progresses specifying the offset and the count, specifying a search filter.getProgresses
(Profile profile, int offset, int count, List<String> tags) Gets progresses specifying the user, offset and the count.getProgresses
(Profile profile, int offset, int count, List<String> tags, String search) Gets progresses specifying the user, offset and the count, specifying a search filter.Gets Progress instances in a tabular fashion.default Progress
getProgressForProfileAndMission
(Profile profile, String missionNameOrId) updateProgress
(Progress progress) Updates the progress, or throws aNotFoundException
if the progress can't be found.
-
Method Details
-
getProgresses
Gets progresses specifying the user, offset and the count.- Parameters:
profile
-Profile
offset
- the offsetcount
- the counttags
-profile
-Profile
- Returns:
- a
Pagination
ofProgress
objects.
-
getProgresses
Pagination<Progress> getProgresses(Profile profile, int offset, int count, List<String> tags, String search) Gets progresses specifying the user, offset and the count, specifying a search filter.- Parameters:
profile
-Profile
offset
- the offsetcount
- the counttags
-search
- a query to filter the results- Returns:
- a
Pagination
ofProgress
objects.
-
getProgresses
Gets progresses specifying the offset and the count.- Parameters:
offset
- the offsetcount
- the counttags
- the tags- Returns:
- a
Pagination
ofProgress
objects.
-
getProgresses
Gets progresses specifying the offset and the count, specifying a search filter.- Parameters:
offset
- the offsetcount
- the counttags
- the tagssearch
- a query to filter the results- Returns:
- a
Pagination
ofProgress
objects.
-
getProgressesTabular
Tabulation<ProgressRow> getProgressesTabular()Gets Progress instances in a tabular fashion.- Returns:
- a
Tabulation
ofProgressRow
instances
-
getProgress
Gets the progress with the id, or throws aNotFoundException
if the progress can't be found.- Returns:
- the
Progress
that was requested, never null - Throws:
ProgressNotFoundException
- if noProgress
matches
-
findProgress
Gets the progress with the id, or throws aNotFoundException
if the progress can't be found.- Returns:
- the
Progress
that was requested, never null - Throws:
ProgressNotFoundException
- if noProgress
matches
-
updateProgress
Updates the progress, or throws aNotFoundException
if the progress can't be found. TheProgress.getId()
is used to key the progress being updated.- Returns:
- the
Progress
as it was written into the database - Throws:
InvalidDataException
- if the state of the passed in Progress is invalid
-
createOrGetExistingProgress
Creates a progress. The value ofProgress.getId()
will be ignored.- Returns:
- the
Progress
as it was written into the database - Throws:
InvalidDataException
- if the state of the passed in Progress is invalidDuplicateException
- if the passed in Progress has a name that already exists
-
deleteProgress
Deletes a progress.- Parameters:
progressId
- the progress ID
-
advanceProgress
AdvancesProgress
by the specified number of actions.- Parameters:
progress
- theProgress
actionsPerformed
- the amount of actions to apply- Returns:
-
getProgressForProfileAndMission
- Parameters:
profile
- theProfile
linked to the progressmissionNameOrId
- theMission
linked to the progress- Returns:
- the
Progress
instances - Throws:
ProgressNotFoundException
- if the process cannot be found
-
findProgressForProfileAndMission
-