Class IssueSecurityLevelServiceImpl
java.lang.Object
com.atlassian.jira.issue.security.IssueSecurityLevelServiceImpl
- All Implemented Interfaces:
IssueSecurityLevelService
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.jira.issue.security.IssueSecurityLevelService
IssueSecurityLevelService.CreateValidationResult, IssueSecurityLevelService.LevelValidationResult, IssueSecurityLevelService.UpdateValidationResult
-
Constructor Summary
ConstructorsConstructorDescriptionIssueSecurityLevelServiceImpl
(IssueSecurityLevelManager levelManager, GlobalPermissionManager globalPermissionManager, I18nHelper i18n, com.atlassian.event.api.EventPublisher eventPublisher) -
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
-
Constructor Details
-
IssueSecurityLevelServiceImpl
public IssueSecurityLevelServiceImpl(IssueSecurityLevelManager levelManager, GlobalPermissionManager globalPermissionManager, I18nHelper i18n, com.atlassian.event.api.EventPublisher eventPublisher)
-
-
Method Details
-
validateUpdate
public IssueSecurityLevelService.UpdateValidationResult validateUpdate(ApplicationUser user, IssueSecurityLevel currentLevel, String newName, String newDescription) Description copied from interface:IssueSecurityLevelService
Method that will validate arguments for an update of IssueSecurityLevel operation- Specified by:
validateUpdate
in interfaceIssueSecurityLevelService
- 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
public ServiceOutcome<IssueSecurityLevel> update(ApplicationUser callingUser, IssueSecurityLevelService.UpdateValidationResult validationResult) Description copied from interface:IssueSecurityLevelService
This method will update IssueSecurityLevel carried in UpdateValidationResult if it is valid. It will throw an Exception otherwise- Specified by:
update
in interfaceIssueSecurityLevelService
- Parameters:
callingUser
- the user who updates the levelvalidationResult
- it carry validation data and IssueSecurityLevel to update- Returns:
- an IssueSecurityLevel that has been updated
-
validateCreate
public IssueSecurityLevelService.CreateValidationResult validateCreate(ApplicationUser user, long schemeId, String name, String description) Description copied from interface:IssueSecurityLevelService
Method that will validate arguments for and creation of IssueSecurityLevel operation- Specified by:
validateCreate
in interfaceIssueSecurityLevelService
- 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
public ServiceOutcome<IssueSecurityLevel> create(ApplicationUser callingUser, IssueSecurityLevelService.CreateValidationResult validationResult) Description copied from interface:IssueSecurityLevelService
This method will create new IssueSecurityLevel carried int CreateValidationResult if it's valid it will throw an Exception otherwise- Specified by:
create
in interfaceIssueSecurityLevelService
- Parameters:
callingUser
- the user who updates the levelvalidationResult
- it carry validation data and IssueSecurityLevel to update- Returns:
-