public class IssueSecurityLevelManagerImpl extends Object implements IssueSecurityLevelManager
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.log4j.Logger |
log |
| Constructor and Description |
|---|
IssueSecurityLevelManagerImpl(IssueSecuritySchemeManager issueSecuritySchemeManager,
SecurityTypeManager securityTypeManager,
ProjectManager projectManager,
PermissionManager permissionManager,
EntityEngine entityEngine,
com.atlassian.cache.CacheManager cacheManager,
QueryDslAccessor queryDslAccessor,
ApplicationProperties applicationProperties) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearProjectLevels(Project project)
Clears the User security Level Map.
|
void |
clearUsersLevels()
Clears the User security Level Map.
|
IssueSecurityLevel |
createIssueSecurityLevel(IssueSecurityLevel level)
Creates an Issue Security Level with the same properties as in provided Issue Security Level.
|
IssueSecurityLevel |
createIssueSecurityLevel(long schemeId,
String name,
String description)
Creates an Issue Security Level with the given properties.
|
void |
deleteSecurityLevel(Long levelId)
Deletes the given Issue Security Level and any child permissions.
|
Collection<IssueSecurityLevel> |
getAllIssueSecurityLevels()
Get all the different levels of security across all schemes.
|
Collection<org.ofbiz.core.entity.GenericValue> |
getAllSecurityLevels()
Get all the different levels of security across all schemes.
|
Collection<IssueSecurityLevel> |
getAllSecurityLevelsForUser(ApplicationUser user)
Get the different levels of security that the user can see across all projects.
|
Collection<org.ofbiz.core.entity.GenericValue> |
getAllUsersSecurityLevels(ApplicationUser user)
Get the different levels of security that the user can see across all projects.
|
Long |
getDefaultSecurityLevel(Project project)
Returns the default Security Level as defined in the Issue Security Level scheme for the given project.
|
Long |
getIssueCount(Long issueSecurityLevelId,
Long projectId)
Get the count of issues at the given security level for a project.
|
org.ofbiz.core.entity.GenericValue |
getIssueSecurity(Long id)
Returns the IssueSecurityLevel with the given ID.
|
String |
getIssueSecurityDescription(Long id) |
org.ofbiz.core.entity.GenericValue |
getIssueSecurityLevel(Long id)
Returns the IssueSecurityLevel with the given ID.
|
List<IssueSecurityLevel> |
getIssueSecurityLevels(long schemeId)
Returns the list of Security Levels for the given Issue Security Level Scheme.
|
Collection<IssueSecurityLevel> |
getIssueSecurityLevelsByName(String securityLevelName)
Get the different levels of security that have the specified name.
|
String |
getIssueSecurityName(Long id)
Get the name of the issue security
|
Long |
getSchemeDefaultSecurityLevel(org.ofbiz.core.entity.GenericValue project)
Returns the default Security Level as defined in the Issue Security Level scheme for the given project.
|
List<org.ofbiz.core.entity.GenericValue> |
getSchemeIssueSecurityLevels(Long schemeId)
Returns the list of Security Levels for the given Issue Security Level Scheme.
|
IssueSecurityLevel |
getSecurityLevel(long id)
Returns the IssueSecurityLevel with the given ID.
|
IssueSecurityLevel |
getSecurityLevelByNameAndSchema(String securityLevelName,
Long schemaId)
Get the level with specified name and schemaId.
|
Collection<org.ofbiz.core.entity.GenericValue> |
getSecurityLevelsByName(String securityLevelName)
Get the different levels of security that have the specified name.
|
Collection<IssueSecurityLevel> |
getSecurityLevelsForUserByName(ApplicationUser user,
String securityLevelName)
Get the different levels of security that a user can see that have the specified name.
|
List<org.ofbiz.core.entity.GenericValue> |
getUsersSecurityLevels(org.ofbiz.core.entity.GenericValue entity,
ApplicationUser user)
Get the different levels of security that can be set for this issue.
|
List<IssueSecurityLevel> |
getUsersSecurityLevels(Issue issue,
ApplicationUser user)
Get the different levels of security that can be set for this issue.
|
List<IssueSecurityLevel> |
getUsersSecurityLevels(Project project,
ApplicationUser user)
Get the different levels of security that can be set for an issue created in this project.
|
Collection<org.ofbiz.core.entity.GenericValue> |
getUsersSecurityLevelsByName(ApplicationUser user,
String securityLevelName)
Get the different levels of security that a user can see that have the specified name.
|
void |
onClearCache(ClearCacheEvent event) |
void |
onEvent(IssueSecuritySchemeDeletedEvent event) |
boolean |
schemeIssueSecurityExists(Long id)
Checks to see if the issue security exists
|
IssueSecurityLevel |
updateIssueSecurityLevel(IssueSecurityLevel issueSecurityLevel)
Updates the name and/or description of security level.
|
public IssueSecurityLevelManagerImpl(IssueSecuritySchemeManager issueSecuritySchemeManager, SecurityTypeManager securityTypeManager, ProjectManager projectManager, PermissionManager permissionManager, EntityEngine entityEngine, com.atlassian.cache.CacheManager cacheManager, QueryDslAccessor queryDslAccessor, ApplicationProperties applicationProperties)
@EventListener public void onClearCache(ClearCacheEvent event)
@EventListener public void onEvent(IssueSecuritySchemeDeletedEvent event)
public List<org.ofbiz.core.entity.GenericValue> getSchemeIssueSecurityLevels(Long schemeId)
IssueSecurityLevelManagergetSchemeIssueSecurityLevels in interface IssueSecurityLevelManagerschemeId - ID of the Issue Security Level Scheme.public List<IssueSecurityLevel> getIssueSecurityLevels(long schemeId)
IssueSecurityLevelManagergetIssueSecurityLevels in interface IssueSecurityLevelManagerschemeId - ID of the Issue Security Level Scheme.@Nullable public org.ofbiz.core.entity.GenericValue getIssueSecurity(@Nonnull Long id)
IssueSecurityLevelManagergetIssueSecurity in interface IssueSecurityLevelManagerid - the IDpublic IssueSecurityLevel getSecurityLevel(long id)
IssueSecurityLevelManagergetSecurityLevel in interface IssueSecurityLevelManagerid - the IDpublic IssueSecurityLevel createIssueSecurityLevel(long schemeId, String name, String description)
IssueSecurityLevelManagercreateIssueSecurityLevel in interface IssueSecurityLevelManagerschemeId - The Issue security scheme that this level belongs to.name - The name of the new leveldescription - an optional descriptionpublic IssueSecurityLevel getSecurityLevelByNameAndSchema(String securityLevelName, Long schemaId)
IssueSecurityLevelManagergetSecurityLevelByNameAndSchema in interface IssueSecurityLevelManagersecurityLevelName - the name of the security level.schemaId - the id of security schema.public IssueSecurityLevel createIssueSecurityLevel(IssueSecurityLevel level)
IssueSecurityLevelManagercreateIssueSecurityLevel in interface IssueSecurityLevelManagerlevel - The Issue security level to be created.public IssueSecurityLevel updateIssueSecurityLevel(IssueSecurityLevel issueSecurityLevel)
IssueSecurityLevelManagerupdateIssueSecurityLevel in interface IssueSecurityLevelManagerissueSecurityLevel - the level to updatepublic boolean schemeIssueSecurityExists(Long id)
schemeIssueSecurityExists in interface IssueSecurityLevelManagerid - The security Idpublic String getIssueSecurityName(Long id)
getIssueSecurityName in interface IssueSecurityLevelManagerid - The security Idpublic String getIssueSecurityDescription(Long id)
getIssueSecurityDescription in interface IssueSecurityLevelManagerpublic List<org.ofbiz.core.entity.GenericValue> getUsersSecurityLevels(org.ofbiz.core.entity.GenericValue entity, @Nullable ApplicationUser user) throws org.ofbiz.core.entity.GenericEntityException
When editing an Issue, then you would pass in the GenericValue for the Issue. When creating an Issue, the project is passed in.
getUsersSecurityLevels in interface IssueSecurityLevelManagerentity - This is the issue or the project that the security is being checked foruser - The user used for the security checkorg.ofbiz.core.entity.GenericEntityExceptionpublic List<IssueSecurityLevel> getUsersSecurityLevels(Issue issue, ApplicationUser user)
IssueSecurityLevelManagerIssueSecurityLevelManager.getUsersSecurityLevels(com.atlassian.jira.project.Project, ApplicationUser).getUsersSecurityLevels in interface IssueSecurityLevelManagerissue - This is the issue that the security is being checked foruser - The user used for the security checkIssueSecurityLevelManager.getUsersSecurityLevels(com.atlassian.jira.project.Project, ApplicationUser)public List<IssueSecurityLevel> getUsersSecurityLevels(Project project, ApplicationUser user)
IssueSecurityLevelManagerIssueSecurityLevelManager.getUsersSecurityLevels(Issue, ApplicationUser).getUsersSecurityLevels in interface IssueSecurityLevelManagerproject - the project that the security is being checked foruser - The user used for the security checkIssueSecurityLevelManager.getUsersSecurityLevels(com.atlassian.jira.issue.Issue, ApplicationUser)public Collection<org.ofbiz.core.entity.GenericValue> getAllUsersSecurityLevels(ApplicationUser user) throws org.ofbiz.core.entity.GenericEntityException
IssueSecurityLevelManagergetAllUsersSecurityLevels in interface IssueSecurityLevelManageruser - The user used for the security checkorg.ofbiz.core.entity.GenericEntityException - Exception in the OFBiz persistence layer.@Nonnull public Collection<IssueSecurityLevel> getAllSecurityLevelsForUser(ApplicationUser user)
IssueSecurityLevelManagergetAllSecurityLevelsForUser in interface IssueSecurityLevelManageruser - The user used for the security checkpublic Collection<org.ofbiz.core.entity.GenericValue> getAllSecurityLevels() throws org.ofbiz.core.entity.GenericEntityException
IssueSecurityLevelManagergetAllSecurityLevels in interface IssueSecurityLevelManagerorg.ofbiz.core.entity.GenericEntityException - Exception in the OFBiz persistence layer.public Collection<IssueSecurityLevel> getAllIssueSecurityLevels()
IssueSecurityLevelManagergetAllIssueSecurityLevels in interface IssueSecurityLevelManagerpublic Collection<org.ofbiz.core.entity.GenericValue> getUsersSecurityLevelsByName(ApplicationUser user, String securityLevelName) throws org.ofbiz.core.entity.GenericEntityException
IssueSecurityLevelManagergetUsersSecurityLevelsByName in interface IssueSecurityLevelManageruser - the usersecurityLevelName - the name of the security level.org.ofbiz.core.entity.GenericEntityException - Exception in the OFBiz persistence layer.public Collection<IssueSecurityLevel> getSecurityLevelsForUserByName(ApplicationUser user, String securityLevelName)
IssueSecurityLevelManagergetSecurityLevelsForUserByName in interface IssueSecurityLevelManageruser - the usersecurityLevelName - the name of the security level.public Collection<org.ofbiz.core.entity.GenericValue> getSecurityLevelsByName(String securityLevelName) throws org.ofbiz.core.entity.GenericEntityException
IssueSecurityLevelManagergetSecurityLevelsByName in interface IssueSecurityLevelManagersecurityLevelName - the name of the security level.org.ofbiz.core.entity.GenericEntityException - Exception in the OFBiz persistence layer.public Collection<IssueSecurityLevel> getIssueSecurityLevelsByName(String securityLevelName)
IssueSecurityLevelManagergetIssueSecurityLevelsByName in interface IssueSecurityLevelManagersecurityLevelName - the name of the security level.public Long getSchemeDefaultSecurityLevel(org.ofbiz.core.entity.GenericValue project) throws org.ofbiz.core.entity.GenericEntityException
IssueSecurityLevelManagergetSchemeDefaultSecurityLevel in interface IssueSecurityLevelManagerproject - the Projectorg.ofbiz.core.entity.GenericEntityException - Exception in the OFBiz persistence layer.public Long getDefaultSecurityLevel(Project project)
IssueSecurityLevelManagergetDefaultSecurityLevel in interface IssueSecurityLevelManagerproject - the Projectpublic org.ofbiz.core.entity.GenericValue getIssueSecurityLevel(Long id)
IssueSecurityLevelManagergetIssueSecurityLevel in interface IssueSecurityLevelManagerid - the IDpublic void deleteSecurityLevel(Long levelId)
IssueSecurityLevelManagerdeleteSecurityLevel in interface IssueSecurityLevelManagerlevelId - Issue Security Level IDpublic void clearUsersLevels()
clearUsersLevels in interface IssueSecurityLevelManagerpublic void clearProjectLevels(Project project)
clearProjectLevels in interface IssueSecurityLevelManagerpublic Long getIssueCount(@Nullable Long issueSecurityLevelId, @Nonnull Long projectId)
IssueSecurityLevelManagergetIssueCount in interface IssueSecurityLevelManagerissueSecurityLevelId - Issue Security LevelprojectId - ProjectCopyright © 2002-2024 Atlassian. All Rights Reserved.