public class ReportManager
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addNewReport(android.app.Activity context,
User author,
java.lang.String reportedUserUsername,
java.lang.String object,
java.lang.String body,
Consumer<java.lang.Boolean> callback)
Insert a Report made by a User to another.
|
static void |
closeReport(android.app.Activity context,
Report report,
Consumer<java.lang.Boolean> callback)
Change the status of the report to "Closed".
|
static void |
removeReport(android.app.Activity context,
Report report,
Consumer<java.lang.Boolean> callback)
Change the status of the report to "Canceled".
|
static void |
requestReport(android.app.Activity context,
User user,
AsyncDatabaseConnector.OnStartConnectionListener onStartConnectionListener,
AsyncDatabaseConnector.OnEndConnectionListener<Report> callback)
Get list of the report.
|
static void |
takeCharge(android.app.Activity context,
Report report,
Consumer<java.lang.Boolean> callback)
Change the status of the report to "Pending".
|
public static void addNewReport(android.app.Activity context, User author, java.lang.String reportedUserUsername, java.lang.String object, java.lang.String body, @Nullable Consumer<java.lang.Boolean> callback)
context
- The context of the activity.author
- The author of the report.reportedUserUsername
- The username of the reported user.object
- The object of the reportbody
- The body of the report.callback
- A callback to be executed after the operation is completed.public static void takeCharge(android.app.Activity context, Report report, @Nullable Consumer<java.lang.Boolean> callback)
context
- The context of the activity.report
- The report to close.callback
- A callback to be executed after the operation is completed.public static void removeReport(android.app.Activity context, Report report, @Nullable Consumer<java.lang.Boolean> callback)
context
- The context of the activity.report
- The report to close.callback
- A callback to be executed after the operation is completed.public static void closeReport(android.app.Activity context, Report report, @Nullable Consumer<java.lang.Boolean> callback)
context
- The context of the activity.report
- The report to close.callback
- A callback to be executed after the operation is completed.public static void requestReport(android.app.Activity context, User user, @Nullable AsyncDatabaseConnector.OnStartConnectionListener onStartConnectionListener, @Nullable AsyncDatabaseConnector.OnEndConnectionListener<Report> callback)
context
- The context of the activity.user
- The user of request view reports' list.onStartConnectionListener
- On start connection callback.callback
- A callback to be executed after the operation is completed.