com.atlassian.jira.issue.security
Class IssueLevelSecurities

java.lang.Object
  extended by com.atlassian.jira.issue.security.IssueLevelSecurities
All Implemented Interfaces:
IssueSecurityLevelManager

public class IssueLevelSecurities
extends Object
implements IssueSecurityLevelManager

This class gets a list of all the security that can be part of a issue security scheme


Field Summary
protected  org.apache.log4j.Logger log
           
 
Constructor Summary
IssueLevelSecurities(IssueSecuritySchemeManager issueSecuritySchemeManager, SecurityTypeManager securityTypeManager, ProjectManager projectManager)
           
 
Method Summary
 void clearProjectLevels(org.ofbiz.core.entity.GenericValue project)
          Clears the User security Level Map.
 void clearUsersLevels()
          Clears the User security Level Map.
 void deleteSecurityLevel(Long levelId)
           
 org.ofbiz.core.entity.GenericValue getIssueSecurity(Long id)
           
 String getIssueSecurityDescription(Long id)
           
 org.ofbiz.core.entity.GenericValue getIssueSecurityLevel(Long id)
           
 String getIssueSecurityName(Long id)
          Get the name of the issue security
 Long getSchemeDefaultSecurityLevel(org.ofbiz.core.entity.GenericValue project)
           
 List getSchemeIssueSecurityLevels(Long schemeId)
          Returns the list of Security Levels for the given Issue Security Level Scheme.
 List getUsersSecurityLevels(org.ofbiz.core.entity.GenericValue entity, User user)
          Get the different levels of security that can be set for this issue.
 boolean schemeIssueSecurityExists(Long id)
          Checks to see if the issue security exists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.apache.log4j.Logger log
Constructor Detail

IssueLevelSecurities

public IssueLevelSecurities(IssueSecuritySchemeManager issueSecuritySchemeManager,
                            SecurityTypeManager securityTypeManager,
                            ProjectManager projectManager)
Method Detail

getSchemeIssueSecurityLevels

public List getSchemeIssueSecurityLevels(Long schemeId)
Description copied from interface: IssueSecurityLevelManager
Returns the list of Security Levels for the given Issue Security Level Scheme.

Specified by:
getSchemeIssueSecurityLevels in interface IssueSecurityLevelManager
Parameters:
schemeId - ID of the Issue Security Level Scheme.
Returns:
the list of Security Levels for the given Issue Security Level Scheme.

schemeIssueSecurityExists

public boolean schemeIssueSecurityExists(Long id)
Checks to see if the issue security exists

Specified by:
schemeIssueSecurityExists in interface IssueSecurityLevelManager
Parameters:
id - The security Id
Returns:
True / False

getIssueSecurityName

public String getIssueSecurityName(Long id)
Get the name of the issue security

Specified by:
getIssueSecurityName in interface IssueSecurityLevelManager
Parameters:
id - The security Id
Returns:
The name of the security

getIssueSecurityDescription

public String getIssueSecurityDescription(Long id)
Specified by:
getIssueSecurityDescription in interface IssueSecurityLevelManager

getIssueSecurity

public org.ofbiz.core.entity.GenericValue getIssueSecurity(Long id)
Specified by:
getIssueSecurity in interface IssueSecurityLevelManager

getUsersSecurityLevels

public List getUsersSecurityLevels(org.ofbiz.core.entity.GenericValue entity,
                                   User user)
                            throws org.ofbiz.core.entity.GenericEntityException
Get the different levels of security that can be set for this issue. TODO: JRA-14323 This method can return incorrect results because of a bug in caching.

When editing an Issue, then you would pass in the GenericValue for the Issue. When creating an Issue, the project is passed in.

Specified by:
getUsersSecurityLevels in interface IssueSecurityLevelManager
Parameters:
entity - This is the issue or the project that the security is being checked for
user - The user used for the security check
Returns:
an unmodifiable List containing the security levels
Throws:
org.ofbiz.core.entity.GenericEntityException

getSchemeDefaultSecurityLevel

public Long getSchemeDefaultSecurityLevel(org.ofbiz.core.entity.GenericValue project)
                                   throws org.ofbiz.core.entity.GenericEntityException
Specified by:
getSchemeDefaultSecurityLevel in interface IssueSecurityLevelManager
Throws:
org.ofbiz.core.entity.GenericEntityException

getIssueSecurityLevel

public org.ofbiz.core.entity.GenericValue getIssueSecurityLevel(Long id)
                                                         throws org.ofbiz.core.entity.GenericEntityException
Specified by:
getIssueSecurityLevel in interface IssueSecurityLevelManager
Throws:
org.ofbiz.core.entity.GenericEntityException

deleteSecurityLevel

public void deleteSecurityLevel(Long levelId)
                         throws org.ofbiz.core.entity.GenericEntityException
Specified by:
deleteSecurityLevel in interface IssueSecurityLevelManager
Throws:
org.ofbiz.core.entity.GenericEntityException

clearUsersLevels

public void clearUsersLevels()
Clears the User security Level Map. This is done when security records are added or deleted

Specified by:
clearUsersLevels in interface IssueSecurityLevelManager

clearProjectLevels

public void clearProjectLevels(org.ofbiz.core.entity.GenericValue project)
Clears the User security Level Map. This is done when security records are added or deleted

Specified by:
clearProjectLevels in interface IssueSecurityLevelManager


Copyright © 2002-2009 Atlassian. All Rights Reserved.