|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.scheme.AbstractSchemeManager
com.atlassian.jira.issue.security.IssueSecuritySchemeManagerImpl
public class IssueSecuritySchemeManagerImpl
| Field Summary |
|---|
| Fields inherited from class com.atlassian.jira.scheme.AbstractSchemeManager |
|---|
projectManager, schemeFactory |
| Fields inherited from interface com.atlassian.jira.scheme.SchemeManager |
|---|
PROJECT_ASSOCIATION |
| Constructor Summary | |
|---|---|
IssueSecuritySchemeManagerImpl(ProjectManager projectManager,
PermissionTypeManager permissionTypeManager,
PermissionContextFactory permissionContextFactory,
SchemeFactory schemeFactory,
com.atlassian.event.api.EventPublisher eventPublisher,
AssociationManager associationManager,
OfBizDelegator ofBizDelegator,
GroupManager groupManager)
|
|
| Method Summary | |
|---|---|
org.ofbiz.core.entity.GenericValue |
copyScheme(org.ofbiz.core.entity.GenericValue scheme)
This method overrides the AbstractSchemeManager because within Issue Security schemes there is an extra level, which is the table that holds the Security Levels for that Scheme. |
Scheme |
copyScheme(Scheme scheme)
Copys a scheme, giving the new scheme the same entities as the original one |
org.ofbiz.core.entity.GenericValue |
copySchemeEntity(org.ofbiz.core.entity.GenericValue scheme,
org.ofbiz.core.entity.GenericValue entity)
|
org.ofbiz.core.entity.GenericValue |
createScheme(String name,
String description)
Creates a new scheme |
org.ofbiz.core.entity.GenericValue |
createSchemeEntity(org.ofbiz.core.entity.GenericValue scheme,
SchemeEntity schemeEntity)
|
Scheme |
createSchemeObject(String name,
String description)
Creates a new scheme |
void |
deleteEntity(Long id)
Deletes an entity with the given id from the database. |
void |
deleteScheme(Long id)
Deletes a scheme from the database |
protected void |
flushProjectSchemes()
|
String |
getDefaultDescriptionKey()
|
String |
getDefaultNameKey()
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme)
Get all Scheme entity records for a particular scheme |
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
Long entityTypeId)
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
Long schemeTypeId,
String parameter)
Get all Generic Value permission records for a particular scheme and permission Id |
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
String entityTypeId)
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
String type,
Long schemeTypeId)
Get all Generic Value issue security records for a particular scheme, type and Id |
List<org.ofbiz.core.entity.GenericValue> |
getEntitiesBySecurityLevel(Long securityLevelId)
|
String |
getEntityName()
|
String |
getSchemeDesc()
|
String |
getSchemeEntityName()
|
Collection<org.ofbiz.core.entity.GenericValue> |
getSchemesContainingEntity(String type,
String parameter)
This is a method that is meant to quickly get you all the schemes that contain an entity of the specified type and parameter. |
boolean |
hasSchemeAuthority(Long entityType,
org.ofbiz.core.entity.GenericValue entity)
Checks anonymous permission of the given permission type for the given entity. |
boolean |
hasSchemeAuthority(Long entityType,
org.ofbiz.core.entity.GenericValue issue,
com.atlassian.crowd.embedded.api.User user,
boolean issueCreation)
Checks to see if the user has access to issues of this security level. |
void |
onClearCache(ClearCacheEvent event)
|
boolean |
removeEntities(org.ofbiz.core.entity.GenericValue scheme,
Long entityTypeId)
Retrieves all the entites for this permission and then removes them. |
boolean |
removeEntities(String type,
String parameter)
This method overrides the super implemntation in order to clear cache. |
void |
start()
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework. |
void |
updateScheme(Scheme scheme)
Updates any changes to the scheme object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.atlassian.jira.scheme.SchemeManager |
|---|
addDefaultSchemeToProject, addDefaultSchemeToProject, addSchemeToProject, addSchemeToProject, createDefaultScheme, createSchemeAndEntities, getAssociatedSchemes, getDefaultScheme, getDefaultSchemeObject, getEntities, getEntity, getGroups, getGroups, getProjects, getProjects, getScheme, getScheme, getSchemeFor, getSchemeObject, getSchemeObject, getSchemeObjects, getSchemes, getSchemes, getUnassociatedSchemes, getUsers, getUsers, getUsers, getUsers, removeSchemesFromProject, removeSchemesFromProject, schemeExists, updateScheme |
| Constructor Detail |
|---|
public IssueSecuritySchemeManagerImpl(ProjectManager projectManager,
PermissionTypeManager permissionTypeManager,
PermissionContextFactory permissionContextFactory,
SchemeFactory schemeFactory,
com.atlassian.event.api.EventPublisher eventPublisher,
AssociationManager associationManager,
OfBizDelegator ofBizDelegator,
GroupManager groupManager)
| Method Detail |
|---|
public void start()
throws Exception
Startable
start in interface StartableException - Allows implementations to throw an Exception.@EventListener public void onClearCache(ClearCacheEvent event)
onClearCache in class AbstractSchemeManagerpublic String getSchemeEntityName()
getSchemeEntityName in class AbstractSchemeManagerpublic String getEntityName()
getEntityName in class AbstractSchemeManagerpublic String getSchemeDesc()
getSchemeDesc in class AbstractSchemeManagerpublic String getDefaultNameKey()
getDefaultNameKey in class AbstractSchemeManagerpublic String getDefaultDescriptionKey()
getDefaultDescriptionKey in class AbstractSchemeManager
public List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme)
throws org.ofbiz.core.entity.GenericEntityException
SchemeManager
getEntities in interface SchemeManagergetEntities in class AbstractSchemeManagerscheme - The scheme that the entities belong to
org.ofbiz.core.entity.GenericEntityException - If a DB error occurs
public List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme,
Long entityTypeId)
throws org.ofbiz.core.entity.GenericEntityException
getEntities in interface SchemeManagerorg.ofbiz.core.entity.GenericEntityException
public List<org.ofbiz.core.entity.GenericValue> getEntitiesBySecurityLevel(Long securityLevelId)
throws org.ofbiz.core.entity.GenericEntityException
getEntitiesBySecurityLevel in interface IssueSecuritySchemeManagerorg.ofbiz.core.entity.GenericEntityException
public Collection<org.ofbiz.core.entity.GenericValue> getSchemesContainingEntity(String type,
String parameter)
IssueSecuritySchemeManager
getSchemesContainingEntity in interface IssueSecuritySchemeManagertype - is the entity typeparameter - is the scheme entries parameter value
public List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme,
Long schemeTypeId,
String parameter)
throws org.ofbiz.core.entity.GenericEntityException
getEntities in interface SchemeManagerscheme - The scheme that the permissions belong toschemeTypeId - The Id of the permissionparameter - The permission parameter (group name etc)
org.ofbiz.core.entity.GenericEntityException
public List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme,
String entityTypeId)
throws org.ofbiz.core.entity.GenericEntityException
getEntities in interface SchemeManagerorg.ofbiz.core.entity.GenericEntityException
public List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme,
String type,
Long schemeTypeId)
throws org.ofbiz.core.entity.GenericEntityException
getEntities in interface SchemeManagerscheme - The scheme that the permissions belong totype - The type of the permission(Group, Current Reporter etc)schemeTypeId - The Id of the permission
org.ofbiz.core.entity.GenericEntityException
public org.ofbiz.core.entity.GenericValue createSchemeEntity(org.ofbiz.core.entity.GenericValue scheme,
SchemeEntity schemeEntity)
throws org.ofbiz.core.entity.GenericEntityException
createSchemeEntity in interface SchemeManagerorg.ofbiz.core.entity.GenericEntityException
public org.ofbiz.core.entity.GenericValue copySchemeEntity(org.ofbiz.core.entity.GenericValue scheme,
org.ofbiz.core.entity.GenericValue entity)
throws org.ofbiz.core.entity.GenericEntityException
copySchemeEntity in class AbstractSchemeManagerorg.ofbiz.core.entity.GenericEntityException
public org.ofbiz.core.entity.GenericValue copyScheme(org.ofbiz.core.entity.GenericValue scheme)
throws org.ofbiz.core.entity.GenericEntityException
copyScheme in interface SchemeManagercopyScheme in class AbstractSchemeManagerscheme - The permission scheme to be copied
org.ofbiz.core.entity.GenericEntityException - If a DB error occurspublic Scheme copyScheme(Scheme scheme)
SchemeManager
copyScheme in interface SchemeManagercopyScheme in class AbstractSchemeManagerscheme - The permission scheme to be copied
public boolean hasSchemeAuthority(Long entityType,
org.ofbiz.core.entity.GenericValue entity)
SchemeManager
hasSchemeAuthority in interface SchemeManagerentityType - permission type.entity - the entity to which permission is being checked.
public boolean hasSchemeAuthority(Long entityType,
org.ofbiz.core.entity.GenericValue issue,
com.atlassian.crowd.embedded.api.User user,
boolean issueCreation)
hasSchemeAuthority in interface SchemeManagerentityType - The security level to check againstissue - The issueuser - The user to check for the permission. User must NOT be nullissueCreation -
public void updateScheme(Scheme scheme)
throws DataAccessException
SchemeManager
updateScheme in interface SchemeManagerupdateScheme in class AbstractSchemeManagerscheme - The modified scheme object
DataAccessException
public void deleteScheme(Long id)
throws org.ofbiz.core.entity.GenericEntityException
deleteScheme in interface SchemeManagerdeleteScheme in class AbstractSchemeManagerid - Id of the scheme to be deleted
org.ofbiz.core.entity.GenericEntityException
public void deleteEntity(Long id)
throws DataAccessException
SchemeManager
deleteEntity in interface SchemeManagerdeleteEntity in class AbstractSchemeManagerid - The id of the entity to be deleted
DataAccessException
public boolean removeEntities(org.ofbiz.core.entity.GenericValue scheme,
Long entityTypeId)
throws RemoveException
SchemeManager
removeEntities in interface SchemeManagerremoveEntities in class AbstractSchemeManagerscheme - to remove entites from must NOT be nullentityTypeId - to remove
RemoveException - if the delete fails (DB error)
public org.ofbiz.core.entity.GenericValue createScheme(String name,
String description)
throws org.ofbiz.core.entity.GenericEntityException
SchemeManager
createScheme in interface SchemeManagercreateScheme in class AbstractSchemeManagername - The name of the new schemedescription - The description of the new scheme
org.ofbiz.core.entity.GenericEntityException - If a DB error occurs
public Scheme createSchemeObject(String name,
String description)
SchemeManager
createSchemeObject in interface SchemeManagercreateSchemeObject in class AbstractSchemeManagername - The name of the new schemedescription - The description of the new scheme
protected void flushProjectSchemes()
flushProjectSchemes in class AbstractSchemeManager
public boolean removeEntities(String type,
String parameter)
throws RemoveException
removeEntities in interface SchemeManagerremoveEntities in class AbstractSchemeManagertype - typeparameter - parameter
RemoveException - if super method throws it
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||