Class FilterService
java.lang.Object
org.exoplatform.timetracker.service.FilterService
A Service to access and store Activities
- Version:
- $Id: $Id
- Author:
- medamine
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFilter(FilterModel filter, String userName) Create new Filter that will be available for all users.voiddeleteFilter(Long filterId) Delete Filter identified by its id and check if username has permission to delete it.org.json.JSONObjectgetFields(long filterId) getFields.org.json.JSONArraygetFiltersList(String userName) Retrieves the list of Activities with offset, limit and a keyword that can be empty
-
Constructor Details
-
FilterService
Constructor for FilterService.
- Parameters:
filterStorage- aFilterStorageobject.
-
-
Method Details
-
createFilter
Create new Filter that will be available for all users. If the Filter already exits anEntityExistsExceptionwill be thrown. -
deleteFilter
public void deleteFilter(Long filterId) throws javax.persistence.EntityNotFoundException, IllegalAccessException Delete Filter identified by its id and check if username has permission to delete it.- Parameters:
filterId- technical identifier of Filter- Throws:
javax.persistence.EntityNotFoundException- if Filter wasn't foundIllegalAccessException- if user is not allowed to delete Filter
-
getFiltersList
Retrieves the list of Activities with offset, limit and a keyword that can be empty- Parameters:
userName- aStringobject.- Returns:
- List of
FilterModelthat contains the list of Activities
-
getFields
public org.json.JSONObject getFields(long filterId) getFields.
- Parameters:
filterId- a long.- Returns:
- a
JSONObjectobject.
-