public class FeatureService
extends java.lang.Object
| Constructor and Description |
|---|
FeatureService(FeatureStorage featureStorage)
Constructor for FeatureService.
|
| Modifier and Type | Method and Description |
|---|---|
Feature |
createFeature(Feature feature)
Create new Feature that will be available for all users.
|
void |
deleteFeature(java.lang.Long featureId,
java.lang.String username)
Delete Feature identified by its id and check if username has permission to
delete it.
|
java.util.List<Feature> |
getFeaturesList()
Retrieves the list of Activities with offset, limit and a keyword that can be
empty
|
Feature |
updateFeature(Feature Feature,
java.lang.String username)
Update an existing Feature on datasource.
|
public FeatureService(FeatureStorage featureStorage)
Constructor for FeatureService.
featureStorage - a FeatureStorage object.public Feature createFeature(Feature feature) throws java.lang.Exception
EntityExistsException will be thrown.feature - Feature to createFeature in datasourcejava.lang.Exception - when Feature already exists or an error occurs while
creating Feature or its attached imagepublic Feature updateFeature(Feature Feature, java.lang.String username) throws java.lang.Exception
EntityNotFoundException will be thrown.Feature - dto to update on storeusername - username storing FeatureFeature in datasourcejava.lang.Exception - when Exception is thrown or an error
occurs while saving Featurepublic void deleteFeature(java.lang.Long featureId,
java.lang.String username)
throws javax.persistence.EntityNotFoundException,
java.lang.IllegalAccessException
featureId - technical identifier of Featureusername - user currently deleting Featurejavax.persistence.EntityNotFoundException - if Feature wasn't foundjava.lang.IllegalAccessException - if user is not allowed to delete FeatureCopyright © 2003–2021 eXo Platform SAS. All rights reserved.