public class CodesService
extends java.lang.Object
| Constructor and Description |
|---|
CodesService(CodesStorage codesStorage)
Constructor for CodesService.
|
| Modifier and Type | Method and Description |
|---|---|
ActivityCode |
createActivityCode(ActivityCode activityCode)
Create new ActivityCode.
|
SubActivityCode |
createSubActivityCode(SubActivityCode subActivityCode)
Create new SubActivityCode that will be available for all users.
|
SubType |
createSubType(SubType subType)
Create new SubType that will be available for all users.
|
Type |
createType(Type type)
Create new Type that will be available for all users.
|
void |
deleteActivityCode(java.lang.Long activityCodeId,
java.lang.String username)
Delete ActivityCode identified by its id and check if username has permission to
delete it.
|
void |
deleteSubActivityCode(java.lang.Long subActivityCodeId,
java.lang.String username)
Delete SubActivityCode identified by its id and check if username has permission to
delete it.
|
void |
deleteSubType(java.lang.Long subTypeId,
java.lang.String username)
Delete SubType identified by its id and check if username has permission to
delete it.
|
void |
deleteType(java.lang.Long typeId,
java.lang.String username)
Delete Type identified by its id and check if username has permission to
delete it.
|
java.util.List<ActivityCode> |
getActivityCodesList()
Retrieves the list of Activities with offset, limit and a keyword that can be
empty
|
java.util.List<SubActivityCode> |
getSubActivityCodesList()
Retrieves the list of Activities with offset, limit and a keyword that can be
empty
|
java.util.List<SubType> |
getSubTypesList()
Retrieves the list of Activities with offset, limit and a keyword that can be
empty
|
java.util.List<Type> |
getTypesList()
Retrieves the list of Activities with offset, limit and a keyword that can be
empty
|
ActivityCode |
updateActivityCode(ActivityCode activityCode,
java.lang.String username)
Update an existing ActivityCode on datasource.
|
SubActivityCode |
updateSubActivityCode(SubActivityCode SubActivityCode,
java.lang.String username)
Update an existing SubActivityCode on datasource.
|
SubType |
updateSubType(SubType SubType,
java.lang.String username)
Update an existing SubType on datasource.
|
Type |
updateType(Type type,
java.lang.String username)
Update an existing Type on datasource.
|
public CodesService(CodesStorage codesStorage)
Constructor for CodesService.
codesStorage - a CodesStorage object.public ActivityCode createActivityCode(ActivityCode activityCode) throws java.lang.Exception
EntityExistsException will be thrown.activityCode - ActivityCode to createActivityCode in datasourcejava.lang.Exception - when ActivityCode already exists or an error occurs while
creating ActivityCode or its attached imagepublic ActivityCode updateActivityCode(ActivityCode activityCode, java.lang.String username) throws java.lang.Exception
EntityNotFoundException will be thrown.activityCode - to update on storeusername - username storing ActivityCodeActivityCode in datasourcejava.lang.Exception - when Exception is thrown or an error
occurs while saving ActivityCodepublic void deleteActivityCode(java.lang.Long activityCodeId,
java.lang.String username)
throws javax.persistence.EntityNotFoundException,
java.lang.IllegalAccessException
activityCodeId - technical identifier of ActivityCodeusername - user currently deleting ActivityCodejavax.persistence.EntityNotFoundException - if ActivityCode wasn't foundjava.lang.IllegalAccessException - if user is not allowed to delete ActivityCodepublic java.util.List<ActivityCode> getActivityCodesList()
ActivityCode that contains the list of Activitiespublic SubActivityCode createSubActivityCode(SubActivityCode subActivityCode) throws java.lang.Exception
EntityExistsException will be thrown.subActivityCode - SubActivityCode to createSubActivityCode in datasourcejava.lang.Exception - when SubActivityCode already exists or an error occurs while
creating SubActivityCode or its attached imagepublic SubActivityCode updateSubActivityCode(SubActivityCode SubActivityCode, java.lang.String username) throws java.lang.Exception
EntityNotFoundException will be thrown.SubActivityCode - dto to update on storeusername - username storing SubActivityCodeSubActivityCode in datasourcejava.lang.Exception - when Exception is thrown or an error
occurs while saving SubActivityCodepublic void deleteSubActivityCode(java.lang.Long subActivityCodeId,
java.lang.String username)
throws javax.persistence.EntityNotFoundException,
java.lang.IllegalAccessException
subActivityCodeId - technical identifier of SubActivityCodeusername - user currently deleting SubActivityCodejavax.persistence.EntityNotFoundException - if SubActivityCode wasn't foundjava.lang.IllegalAccessException - if user is not allowed to delete SubActivityCodepublic java.util.List<SubActivityCode> getSubActivityCodesList()
SubActivityCode that contains the list of Activitiespublic Type createType(Type type) throws java.lang.Exception
EntityExistsException will be thrown.type - Type to createType in datasourcejava.lang.Exception - when Type already exists or an error occurs while
creating Type or its attached imagepublic Type updateType(Type type, java.lang.String username) throws java.lang.Exception
EntityNotFoundException will be thrown.type - dto to update on storeusername - username storing TypeType in datasourcejava.lang.Exception - when Exception is thrown or an error
occurs while saving Typepublic void deleteType(java.lang.Long typeId,
java.lang.String username)
throws javax.persistence.EntityNotFoundException,
java.lang.IllegalAccessException
typeId - technical identifier of Typeusername - user currently deleting Typejavax.persistence.EntityNotFoundException - if Type wasn't foundjava.lang.IllegalAccessException - if user is not allowed to delete Typepublic java.util.List<Type> getTypesList()
Type that contains the list of Activitiespublic SubType createSubType(SubType subType) throws java.lang.Exception
EntityExistsException will be thrown.subType - SubType to createSubType in datasourcejava.lang.Exception - when SubType already exists or an error occurs while
creating SubType or its attached imagepublic SubType updateSubType(SubType SubType, java.lang.String username) throws java.lang.Exception
EntityNotFoundException will be thrown.SubType - dto to update on storeusername - username storing SubTypeSubType in datasourcejava.lang.Exception - when Exception is thrown or an error
occurs while saving SubTypepublic void deleteSubType(java.lang.Long subTypeId,
java.lang.String username)
throws javax.persistence.EntityNotFoundException,
java.lang.IllegalAccessException
subTypeId - technical identifier of SubTypeusername - user currently deleting SubTypejavax.persistence.EntityNotFoundException - if SubType wasn't foundjava.lang.IllegalAccessException - if user is not allowed to delete SubTypeCopyright © 2003–2020 eXo Platform SAS. All rights reserved.