public class ActivityService
extends java.lang.Object
| Constructor and Description |
|---|
ActivityService(ActivityStorage activitiestorage)
Constructor for ActivityService.
|
| Modifier and Type | Method and Description |
|---|---|
Activity |
createActivity(Activity activity)
Create new Activity that will be available for all users.
|
void |
deleteActivity(java.lang.Long activityId,
java.lang.String username)
Delete Activity identified by its id and check if username has permission to
delete it.
|
java.util.List<Activity> |
getActivitiesforUser(java.util.List<java.lang.String> teams)
Retrieves the list of Activities with offset, limit and a keyword that can be
empty
|
java.util.List<Activity> |
getActivitiesList()
Retrieves the list of Activities with offset, limit and a keyword that can be
empty
|
Activity |
updateActivity(Activity Activity,
java.lang.String username)
Update an existing Activity on datasource.
|
public ActivityService(ActivityStorage activitiestorage)
Constructor for ActivityService.
activitiestorage - a ActivityStorage object.public Activity createActivity(Activity activity) throws java.lang.Exception
EntityExistsException will be thrown.activity - Activity to createActivity in datasourcejava.lang.Exception - when Activity already exists or an error occurs while
creating Activity or its attached imagepublic Activity updateActivity(Activity Activity, java.lang.String username) throws java.lang.Exception
EntityNotFoundException will be thrown.Activity - dto to update on storeusername - username storing ActivityActivity in datasourcejava.lang.Exception - when Exception is thrown or an error
occurs while saving Activitypublic void deleteActivity(java.lang.Long activityId,
java.lang.String username)
throws javax.persistence.EntityNotFoundException,
java.lang.IllegalAccessException
activityId - technical identifier of Activityusername - user currently deleting Activityjavax.persistence.EntityNotFoundException - if Activity wasn't foundjava.lang.IllegalAccessException - if user is not allowed to delete Activitypublic java.util.List<Activity> getActivitiesList()
Activity that contains the list of ActivitiesCopyright © 2003–2021 eXo Platform SAS. All rights reserved.