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) AdvancesProgressby the specified number of actions.createOrGetExistingProgress(Progress progress) Creates a progress.voiddeleteProgress(String progressId) Deletes a progress.findProgress(String progressId) Gets the progress with the id, or throws aNotFoundExceptionif the progress can't be found.findProgressForProfileAndMission(Profile profile, String missionNameOrId) default ProgressgetProgress(String progressId) Gets the progress with the id, or throws aNotFoundExceptionif 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 ProgressgetProgressForProfileAndMission(Profile profile, String missionNameOrId) updateProgress(Progress progress) Updates the progress, or throws aNotFoundExceptionif the progress can't be found.
-
Method Details
-
getProgresses
Gets progresses specifying the user, offset and the count.- Parameters:
profile-Profileoffset- the offsetcount- the counttags-profile-Profile- Returns:
- a
PaginationofProgressobjects.
-
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-Profileoffset- the offsetcount- the counttags-search- a query to filter the results- Returns:
- a
PaginationofProgressobjects.
-
getProgresses
Gets progresses specifying the offset and the count.- Parameters:
offset- the offsetcount- the counttags- the tags- Returns:
- a
PaginationofProgressobjects.
-
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
PaginationofProgressobjects.
-
getProgressesTabular
Tabulation<ProgressRow> getProgressesTabular()Gets Progress instances in a tabular fashion.- Returns:
- a
TabulationofProgressRowinstances
-
getProgress
Gets the progress with the id, or throws aNotFoundExceptionif the progress can't be found.- Returns:
- the
Progressthat was requested, never null - Throws:
ProgressNotFoundException- if noProgressmatches
-
findProgress
Gets the progress with the id, or throws aNotFoundExceptionif the progress can't be found.- Returns:
- the
Progressthat was requested, never null - Throws:
ProgressNotFoundException- if noProgressmatches
-
updateProgress
Updates the progress, or throws aNotFoundExceptionif the progress can't be found. TheProgress.getId()is used to key the progress being updated.- Returns:
- the
Progressas 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
Progressas 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
AdvancesProgressby the specified number of actions.- Parameters:
progress- theProgressactionsPerformed- the amount of actions to apply- Returns:
-
getProgressForProfileAndMission
- Parameters:
profile- theProfilelinked to the progressmissionNameOrId- theMissionlinked to the progress- Returns:
- the
Progressinstances - Throws:
ProgressNotFoundException- if the process cannot be found
-
findProgressForProfileAndMission
-