Interface IssueSecurityLevelService
- All Known Implementing Classes:
IssueSecurityLevelServiceImpl
@PublicApi
public interface IssueSecurityLevelService
Service which can be used to add or edit security levels.
It validates the name provided before creating or updating IssueSecurityLevel
- Since:
- 7.1
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
A simple object that holds the information about validating an create IssueSecurityLevel operation.static class
static class
A simple object that holds the information about validating an update IssueSecurityLevel operation. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(ApplicationUser callingUser, IssueSecurityLevelService.CreateValidationResult validationResult) This method will create new IssueSecurityLevel carried int CreateValidationResult if it's valid it will throw an Exception otherwiseupdate
(ApplicationUser callingUser, IssueSecurityLevelService.UpdateValidationResult validationResult) This method will update IssueSecurityLevel carried in UpdateValidationResult if it is valid.validateCreate
(ApplicationUser user, long schemeId, String name, String description) Method that will validate arguments for and creation of IssueSecurityLevel operationvalidateUpdate
(ApplicationUser user, IssueSecurityLevel currentLevel, String newName, String newDescription) Method that will validate arguments for an update of IssueSecurityLevel operation
-
Method Details
-
validateUpdate
IssueSecurityLevelService.UpdateValidationResult validateUpdate(ApplicationUser user, IssueSecurityLevel currentLevel, String newName, String newDescription) Method that will validate arguments for an update of IssueSecurityLevel operation- Parameters:
user
- the user who tries to validate an IssueSecurityLevelcurrentLevel
- the level to updatenewName
- the new name current level will be updated withnewDescription
- the new description current level will be updated with- Returns:
- validation result for provided name and description
-
update
ServiceOutcome<IssueSecurityLevel> update(ApplicationUser callingUser, IssueSecurityLevelService.UpdateValidationResult validationResult) This method will update IssueSecurityLevel carried in UpdateValidationResult if it is valid. It will throw an Exception otherwise- Parameters:
callingUser
- the user who updates the levelvalidationResult
- it carry validation data and IssueSecurityLevel to update- Returns:
- an IssueSecurityLevel that has been updated
-
validateCreate
IssueSecurityLevelService.CreateValidationResult validateCreate(ApplicationUser user, long schemeId, String name, String description) Method that will validate arguments for and creation of IssueSecurityLevel operation- Parameters:
user
- the user who is trying to create an IssueSecurityLevelschemeId
- the scheme that new IssueSecurityLevel will belong toname
- the name for the new security leveldescription
- the description for the new security level- Returns:
- validation result for provided arguments
-
create
ServiceOutcome<IssueSecurityLevel> create(ApplicationUser callingUser, IssueSecurityLevelService.CreateValidationResult validationResult) This method will create new IssueSecurityLevel carried int CreateValidationResult if it's valid it will throw an Exception otherwise- Parameters:
callingUser
- the user who updates the levelvalidationResult
- it carry validation data and IssueSecurityLevel to update- Returns:
-