Class FeatureService
java.lang.Object
org.exoplatform.timetracker.service.FeatureService
A Service to access and store Activities
- Version:
- $Id: $Id
- Author:
- medamine
-
Constructor Summary
ConstructorsConstructorDescriptionFeatureService(FeatureStorage featureStorage) Constructor for FeatureService. -
Method Summary
Modifier and TypeMethodDescriptioncreateFeature(Feature feature) Create new Feature that will be available for all users.voiddeleteFeature(Long featureId, String username) Delete Feature identified by its id and check if username has permission to delete it.Retrieves the list of Activities with offset, limit and a keyword that can be emptyupdateFeature(Feature Feature, String username) Update an existing Feature on datasource.
-
Constructor Details
-
FeatureService
Constructor for FeatureService.
- Parameters:
featureStorage- aFeatureStorageobject.
-
-
Method Details
-
createFeature
Create new Feature that will be available for all users. If the Feature already exits anEntityExistsExceptionwill be thrown. -
updateFeature
Update an existing Feature on datasource. If the Feature doesn't exit anEntityNotFoundExceptionwill be thrown. -
deleteFeature
public void deleteFeature(Long featureId, String username) throws jakarta.persistence.EntityNotFoundException, IllegalAccessException Delete Feature identified by its id and check if username has permission to delete it.- Parameters:
featureId- technical identifier of Featureusername- user currently deleting Feature- Throws:
jakarta.persistence.EntityNotFoundException- if Feature wasn't foundIllegalAccessException- if user is not allowed to delete Feature
-
getFeaturesList
Retrieves the list of Activities with offset, limit and a keyword that can be empty- Returns:
- List of
Featurethat contains the list of Activities
-