com.atlassian.jira.scheme
Class AbstractSchemeManager

java.lang.Object
  extended by com.atlassian.jira.scheme.AbstractSchemeManager
All Implemented Interfaces:
SchemeManager
Direct Known Subclasses:
DefaultNotificationSchemeManager, DefaultPermissionSchemeManager, DefaultWorkflowSchemeManager, IssueSecuritySchemeManagerImpl

public abstract class AbstractSchemeManager
extends Object
implements SchemeManager


Field Summary
protected  com.atlassian.event.api.EventPublisher eventPublisher
           
protected  ProjectManager projectManager
           
protected  SchemeFactory schemeFactory
           
protected  SecurityTypeManager securityTypeManager
           
 
Fields inherited from interface com.atlassian.jira.scheme.SchemeManager
PROJECT_ASSOCIATION
 
Constructor Summary
protected AbstractSchemeManager(ProjectManager projectManager, SecurityTypeManager securityTypeManager, PermissionContextFactory permissionContextFactory, SchemeFactory schemeFactory, NodeAssociationStore nodeAssociationStore, OfBizDelegator ofBizDelegator, GroupManager groupManager, com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.cache.CacheManager cacheManager)
           
 
Method Summary
 void addDefaultSchemeToProject(org.ofbiz.core.entity.GenericValue project)
          Adds the default scheme to a particular project
 void addDefaultSchemeToProject(Project project)
          Adds the default scheme to a particular project
 void addSchemeToProject(org.ofbiz.core.entity.GenericValue project, org.ofbiz.core.entity.GenericValue scheme)
          Deprecated. 
 void addSchemeToProject(Project project, Scheme scheme)
          Adds a scheme to a particular project
 org.ofbiz.core.entity.GenericValue copyScheme(org.ofbiz.core.entity.GenericValue oldScheme)
          Copys a scheme, giving the new scheme the same entities as the original one
 Scheme copyScheme(Scheme oldScheme)
          Copys a scheme, giving the new scheme the same entities as the original one
 org.ofbiz.core.entity.GenericValue createDefaultScheme()
          Creates a default scheme, with an id of 0
 org.ofbiz.core.entity.GenericValue createScheme(String name, String description)
          Creates a new scheme
protected abstract  AbstractSchemeAddedToProjectEvent createSchemeAddedToProjectEvent(Scheme scheme, Project project)
           
 Scheme createSchemeAndEntities(Scheme scheme)
           
protected abstract  AbstractSchemeCopiedEvent createSchemeCopiedEvent(Scheme oldScheme, Scheme newScheme)
           
protected abstract  AbstractSchemeEvent createSchemeCreatedEvent(Scheme scheme)
           
protected abstract  Object createSchemeEntityDeletedEvent(org.ofbiz.core.entity.GenericValue entity)
           
protected abstract  org.ofbiz.core.entity.GenericValue createSchemeEntityNoEvent(org.ofbiz.core.entity.GenericValue scheme, SchemeEntity schemeEntity)
           
protected  org.ofbiz.core.entity.GenericValue createSchemeGenericValue(Map<String,Object> values)
           
protected  org.ofbiz.core.entity.GenericValue createSchemeNoEvent(String name, String description)
           
 Scheme createSchemeObject(String name, String description)
          Creates a new scheme
protected abstract  AbstractSchemeRemovedFromProjectEvent createSchemeRemovedFromProjectEvent(Scheme scheme, Project project)
           
protected abstract  AbstractSchemeUpdatedEvent createSchemeUpdatedEvent(Scheme scheme, Scheme originalScheme)
           
 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()
           
protected  I18nHelper getApplicationI18n()
           
 List<Scheme> getAssociatedSchemes(boolean withEntitiesComparable)
          Gets all schemes of this type in the database taht are associated with at least one project.
 String getAssociationType()
          Deprecated. Just assume all schemes are project association schemes.
abstract  String getDefaultDescriptionKey()
           
abstract  String getDefaultNameKey()
           
 org.ofbiz.core.entity.GenericValue getDefaultScheme()
          Gets the default scheme.
 Scheme getDefaultSchemeObject()
          Gets the default scheme.
 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(String type, String parameter)
          Get all entity records with a particular parameter
 org.ofbiz.core.entity.GenericValue getEntity(Long id)
          Gets a scheme entity based on the id of the entity
abstract  String getEntityName()
           
 Collection<com.atlassian.crowd.embedded.api.Group> getGroups(Long entityTypeId, org.ofbiz.core.entity.GenericValue project)
           
 Collection<com.atlassian.crowd.embedded.api.Group> getGroups(Long entityTypeId, Project project)
           
 String getNameForCopy(String originalName, Integer abbreviateTo)
           
 List<org.ofbiz.core.entity.GenericValue> getProjects(org.ofbiz.core.entity.GenericValue scheme)
          Deprecated. 
 List<Project> getProjects(Scheme scheme)
          Gets all projects that are associated with that scheme
 org.ofbiz.core.entity.GenericValue getScheme(Long id)
          Gets a scheme based on the Id of the scheme
 org.ofbiz.core.entity.GenericValue getScheme(String name)
          Gets a scheme by name from the database.
abstract  String getSchemeDesc()
           
abstract  String getSchemeEntityName()
           
 Scheme getSchemeFor(Project project)
          Get the scheme of this type attached to the given project.
 Scheme getSchemeObject(Long id)
          Gets a scheme by id from the database.
 Scheme getSchemeObject(String name)
          Gets a scheme by name from the database.
 List<Scheme> getSchemeObjects()
          Gets all scheme objects in the database.
 List<org.ofbiz.core.entity.GenericValue> getSchemes()
          Gets all the Schemes (of the type defined by the subclass) from the database.
 List<org.ofbiz.core.entity.GenericValue> getSchemes(org.ofbiz.core.entity.GenericValue project)
          Get all schemes of this type attached to the given project.
 List<Scheme> getUnassociatedSchemes()
          Will return all @link Scheme objects that are not currently associated with any projects.
 Collection<com.atlassian.crowd.embedded.api.User> getUsers(Long permissionId, org.ofbiz.core.entity.GenericValue projectOrIssue)
           
 Collection<com.atlassian.crowd.embedded.api.User> getUsers(Long permissionId, Issue issue)
           
 Collection<com.atlassian.crowd.embedded.api.User> getUsers(Long permissionId, PermissionContext ctx)
           
 Collection<com.atlassian.crowd.embedded.api.User> getUsers(Long permissionId, Project project)
           
protected abstract  SchemeEntity makeSchemeEntity(org.ofbiz.core.entity.GenericValue schemeEntityGV)
           
 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)
          Removes all scheme entities with this parameter and type
 void removeSchemesFromProject(org.ofbiz.core.entity.GenericValue project)
          Deprecated. 
 void removeSchemesFromProject(Project project)
          Removes all schemes from a project
 boolean schemeExists(String name)
          Determine if the given scheme name exists.
 void updateScheme(org.ofbiz.core.entity.GenericValue entity)
          Updates any changes to the given scheme
 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
createSchemeEntity, getEntities, getEntities, getEntities, getEntities, hasSchemeAuthority, hasSchemeAuthority
 

Field Detail

projectManager

protected final ProjectManager projectManager

securityTypeManager

protected final SecurityTypeManager securityTypeManager

schemeFactory

protected final SchemeFactory schemeFactory

eventPublisher

protected final com.atlassian.event.api.EventPublisher eventPublisher
Constructor Detail

AbstractSchemeManager

protected AbstractSchemeManager(ProjectManager projectManager,
                                SecurityTypeManager securityTypeManager,
                                PermissionContextFactory permissionContextFactory,
                                SchemeFactory schemeFactory,
                                NodeAssociationStore nodeAssociationStore,
                                OfBizDelegator ofBizDelegator,
                                GroupManager groupManager,
                                com.atlassian.event.api.EventPublisher eventPublisher,
                                com.atlassian.cache.CacheManager cacheManager)
Method Detail

onClearCache

public void onClearCache(ClearCacheEvent event)

getSchemeEntityName

public abstract String getSchemeEntityName()

getEntityName

public abstract String getEntityName()

getSchemeDesc

public abstract String getSchemeDesc()

getDefaultNameKey

public abstract String getDefaultNameKey()

getDefaultDescriptionKey

public abstract String getDefaultDescriptionKey()

getAssociationType

@Deprecated
public String getAssociationType()
Deprecated. Just assume all schemes are project association schemes.

Identifies whether this scheme manager makes its schemes associated with projects or something else. This is here for historic reasons as schemes are now always associated with projects. This means you should not override this.

Returns:
@{link SchemeManager#PROJECT_ASSOCIATION}

createSchemeEntityNoEvent

protected abstract org.ofbiz.core.entity.GenericValue createSchemeEntityNoEvent(org.ofbiz.core.entity.GenericValue scheme,
                                                                                SchemeEntity schemeEntity)
                                                                         throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getScheme

public org.ofbiz.core.entity.GenericValue getScheme(Long id)
Description copied from interface: SchemeManager
Gets a scheme based on the Id of the scheme

Specified by:
getScheme in interface SchemeManager
Parameters:
id - Id of the scheme
Returns:
The scheme

getSchemeObject

public Scheme getSchemeObject(Long id)
                       throws DataAccessException
Description copied from interface: SchemeManager
Gets a scheme by id from the database.

Specified by:
getSchemeObject in interface SchemeManager
Parameters:
id - the id of the scheme to get.
Returns:
the Scheme
Throws:
DataAccessException - if there is trouble retrieving from the database.

getSchemeObject

public Scheme getSchemeObject(String name)
                       throws DataAccessException
Description copied from interface: SchemeManager
Gets a scheme by name from the database.

Specified by:
getSchemeObject in interface SchemeManager
Parameters:
name - the name of the scheme to get.
Returns:
the Scheme
Throws:
DataAccessException - if there is trouble retrieving from the database.

getScheme

public org.ofbiz.core.entity.GenericValue getScheme(String name)
                                             throws DataAccessException
Description copied from interface: SchemeManager
Gets a scheme by name from the database.

Specified by:
getScheme in interface SchemeManager
Parameters:
name - the name of the scheme to get.
Returns:
the Scheme
Throws:
DataAccessException

getSchemes

public List<org.ofbiz.core.entity.GenericValue> getSchemes()
                                                    throws DataAccessException
Description copied from interface: SchemeManager
Gets all the Schemes (of the type defined by the subclass) from the database.

Specified by:
getSchemes in interface SchemeManager
Returns:
the schemes.
Throws:
DataAccessException

getSchemeObjects

public List<Scheme> getSchemeObjects()
                              throws DataAccessException
Description copied from interface: SchemeManager
Gets all scheme objects in the database.

Specified by:
getSchemeObjects in interface SchemeManager
Returns:
the schemes.
Throws:
DataAccessException - if the database is down or equivalent.

getAssociatedSchemes

public List<Scheme> getAssociatedSchemes(boolean withEntitiesComparable)
                                  throws DataAccessException
Description copied from interface: SchemeManager
Gets all schemes of this type in the database taht are associated with at least one project.

Specified by:
getAssociatedSchemes in interface SchemeManager
Parameters:
withEntitiesComparable - if true then the scheme entites will be logically comparable (they will not include database specific information such as the pk id). Otherwise the object will be a full representation of the row stored in the database.
Returns:
List of associated schemes
Throws:
DataAccessException

getUnassociatedSchemes

public List<Scheme> getUnassociatedSchemes()
                                    throws DataAccessException
Description copied from interface: SchemeManager
Will return all @link Scheme objects that are not currently associated with any projects.

Specified by:
getUnassociatedSchemes in interface SchemeManager
Returns:
list of @link Scheme objects
Throws:
DataAccessException - if the database is down or equivalent.

getSchemes

public List<org.ofbiz.core.entity.GenericValue> getSchemes(org.ofbiz.core.entity.GenericValue project)
                                                    throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: SchemeManager
Get all schemes of this type attached to the given project.

Specified by:
getSchemes in interface SchemeManager
Parameters:
project - The project that the schemes are attached to
Returns:
List of schemes
Throws:
org.ofbiz.core.entity.GenericEntityException - If a DB error occurs

getSchemeFor

public Scheme getSchemeFor(Project project)
Description copied from interface: SchemeManager
Get the scheme of this type attached to the given project.

Specified by:
getSchemeFor in interface SchemeManager
Parameters:
project - The project
Returns:
Thoe associated schem for this project.

getEntity

public org.ofbiz.core.entity.GenericValue getEntity(Long id)
                                             throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: SchemeManager
Gets a scheme entity based on the id of the entity

Specified by:
getEntity in interface SchemeManager
Parameters:
id - The id of the entity
Returns:
The scheme entity object
Throws:
org.ofbiz.core.entity.GenericEntityException - If a DB error occurs

getEntities

public List<org.ofbiz.core.entity.GenericValue> getEntities(String type,
                                                            String parameter)
                                                     throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: SchemeManager
Get all entity records with a particular parameter

Specified by:
getEntities in interface SchemeManager
Parameters:
type - The type of entity you wish to retrieve, eg 'user', 'group', 'projectrole'
parameter - The parameter in the entity
Returns:
List of (GenericValue) entities
Throws:
org.ofbiz.core.entity.GenericEntityException - If a DB error occurs

getEntities

public List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme)
                                                     throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: SchemeManager
Get all Scheme entity records for a particular scheme

Specified by:
getEntities in interface SchemeManager
Parameters:
scheme - The scheme that the entities belong to
Returns:
List of (GenericValue) entities
Throws:
org.ofbiz.core.entity.GenericEntityException - If a DB error occurs

schemeExists

public boolean schemeExists(String name)
Description copied from interface: SchemeManager
Determine if the given scheme name exists.

Specified by:
schemeExists in interface SchemeManager
Parameters:
name - The name of the scheme
Returns:
true is the schem exists.

createScheme

public org.ofbiz.core.entity.GenericValue createScheme(String name,
                                                       String description)
                                                throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: SchemeManager
Creates a new scheme

Specified by:
createScheme in interface SchemeManager
Parameters:
name - The name of the new scheme
description - The description of the new scheme
Returns:
The new scheme object
Throws:
org.ofbiz.core.entity.GenericEntityException - If a DB error occurs

createSchemeNoEvent

protected org.ofbiz.core.entity.GenericValue createSchemeNoEvent(String name,
                                                                 String description)
                                                          throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

createSchemeCreatedEvent

protected abstract AbstractSchemeEvent createSchemeCreatedEvent(Scheme scheme)

createSchemeObject

public Scheme createSchemeObject(String name,
                                 String description)
Description copied from interface: SchemeManager
Creates a new scheme

Specified by:
createSchemeObject in interface SchemeManager
Parameters:
name - The name of the new scheme
description - The description of the new scheme
Returns:
The new scheme object

createSchemeAndEntities

public Scheme createSchemeAndEntities(Scheme scheme)
                               throws DataAccessException
Specified by:
createSchemeAndEntities in interface SchemeManager
Throws:
DataAccessException

createSchemeUpdatedEvent

protected abstract AbstractSchemeUpdatedEvent createSchemeUpdatedEvent(Scheme scheme,
                                                                       Scheme originalScheme)

updateScheme

public void updateScheme(org.ofbiz.core.entity.GenericValue entity)
                  throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: SchemeManager
Updates any changes to the given scheme

Specified by:
updateScheme in interface SchemeManager
Parameters:
entity - The modified scheme
Throws:
org.ofbiz.core.entity.GenericEntityException - If a DB error occurs

updateScheme

public void updateScheme(Scheme scheme)
                  throws DataAccessException
Description copied from interface: SchemeManager
Updates any changes to the scheme object. This does not include changes to the scheme entities.

Specified by:
updateScheme in interface SchemeManager
Parameters:
scheme - The modified scheme object
Throws:
DataAccessException

deleteScheme

public void deleteScheme(Long id)
                  throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: SchemeManager
Deletes a scheme from the database

Specified by:
deleteScheme in interface SchemeManager
Parameters:
id - Id of the scheme to be deleted
Throws:
org.ofbiz.core.entity.GenericEntityException - If a DB error occurs

addSchemeToProject

@Deprecated
public void addSchemeToProject(org.ofbiz.core.entity.GenericValue project,
                                          org.ofbiz.core.entity.GenericValue scheme)
                        throws org.ofbiz.core.entity.GenericEntityException
Deprecated. 

Description copied from interface: SchemeManager
Adds a scheme to a particular project

Specified by:
addSchemeToProject in interface SchemeManager
Parameters:
project - The project that the scheme is to be added to
scheme - The scheme to be added
Throws:
org.ofbiz.core.entity.GenericEntityException - If a DB error occurs

addSchemeToProject

public void addSchemeToProject(Project project,
                               Scheme scheme)
                        throws DataAccessException
Description copied from interface: SchemeManager
Adds a scheme to a particular project

Specified by:
addSchemeToProject in interface SchemeManager
Parameters:
project - The project that the scheme is to be added to
scheme - The scheme to be added
Throws:
DataAccessException

createSchemeAddedToProjectEvent

@Nonnull
protected abstract AbstractSchemeAddedToProjectEvent createSchemeAddedToProjectEvent(Scheme scheme,
                                                                                             Project project)

removeSchemesFromProject

public void removeSchemesFromProject(Project project)
                              throws DataAccessException
Description copied from interface: SchemeManager
Removes all schemes from a project

Specified by:
removeSchemesFromProject in interface SchemeManager
Parameters:
project - The project that all schemes are to be deleted from
Throws:
DataAccessException

removeSchemesFromProject

@Deprecated
public void removeSchemesFromProject(org.ofbiz.core.entity.GenericValue project)
                              throws org.ofbiz.core.entity.GenericEntityException
Deprecated. 

Description copied from interface: SchemeManager
Removes all schemes from a project

Specified by:
removeSchemesFromProject in interface SchemeManager
Parameters:
project - The project that all schemes are to be deleted from
Throws:
org.ofbiz.core.entity.GenericEntityException - If a DB error occurs

createSchemeRemovedFromProjectEvent

@Nonnull
protected abstract AbstractSchemeRemovedFromProjectEvent createSchemeRemovedFromProjectEvent(Scheme scheme,
                                                                                                     Project project)

deleteEntity

public void deleteEntity(Long id)
                  throws DataAccessException
Description copied from interface: SchemeManager
Deletes an entity with the given id from the database.

Specified by:
deleteEntity in interface SchemeManager
Parameters:
id - The id of the entity to be deleted
Throws:
DataAccessException

makeSchemeEntity

protected abstract SchemeEntity makeSchemeEntity(org.ofbiz.core.entity.GenericValue schemeEntityGV)

createSchemeEntityDeletedEvent

@Nullable
protected abstract Object createSchemeEntityDeletedEvent(org.ofbiz.core.entity.GenericValue entity)

getProjects

@Deprecated
public List<org.ofbiz.core.entity.GenericValue> getProjects(org.ofbiz.core.entity.GenericValue scheme)
                                                     throws org.ofbiz.core.entity.GenericEntityException
Deprecated. 

Description copied from interface: SchemeManager
Gets all projects that are associated with that scheme

Specified by:
getProjects in interface SchemeManager
Parameters:
scheme - The scheme used to get all projects
Returns:
List of (GenericValue) projects
Throws:
org.ofbiz.core.entity.GenericEntityException - If a DB error occurs

getProjects

public List<Project> getProjects(Scheme scheme)
                          throws DataAccessException
Description copied from interface: SchemeManager
Gets all projects that are associated with that scheme

Specified by:
getProjects in interface SchemeManager
Parameters:
scheme - The scheme used to get all projects
Returns:
List of Project's
Throws:
DataAccessException

createDefaultScheme

public org.ofbiz.core.entity.GenericValue createDefaultScheme()
                                                       throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: SchemeManager
Creates a default scheme, with an id of 0

Specified by:
createDefaultScheme in interface SchemeManager
Returns:
The new permission scheme object
Throws:
org.ofbiz.core.entity.GenericEntityException - If a DB error occurs

removeEntities

public boolean removeEntities(String type,
                              String parameter)
                       throws RemoveException
Description copied from interface: SchemeManager
Removes all scheme entities with this parameter and type

Specified by:
removeEntities in interface SchemeManager
Parameters:
type - the 'type' of entity you are deleting, eg 'group', 'user', 'projectrole'
parameter - must NOT be null
Returns:
true always (legacy)
Throws:
RemoveException - if the delete fails (DB error)

removeEntities

public boolean removeEntities(org.ofbiz.core.entity.GenericValue scheme,
                              Long entityTypeId)
                       throws RemoveException
Description copied from interface: SchemeManager
Retrieves all the entites for this permission and then removes them.

Specified by:
removeEntities in interface SchemeManager
Parameters:
scheme - to remove entites from must NOT be null
entityTypeId - to remove
Returns:
True all the time (legacy)
Throws:
RemoveException - if the delete fails (DB error)

getDefaultScheme

public org.ofbiz.core.entity.GenericValue getDefaultScheme()
                                                    throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: SchemeManager
Gets the default scheme. This should have an id of 0 This does not work for the Default Notification scheme as it does not have an id of 0.

Specified by:
getDefaultScheme in interface SchemeManager
Returns:
The default scheme
Throws:
org.ofbiz.core.entity.GenericEntityException - If a DB error occurs

getDefaultSchemeObject

public Scheme getDefaultSchemeObject()
Description copied from interface: SchemeManager
Gets the default scheme. This should have an id of 0 This does not work for the Default Notification scheme as it does not have an id of 0.

Specified by:
getDefaultSchemeObject in interface SchemeManager
Returns:
The default scheme

addDefaultSchemeToProject

public void addDefaultSchemeToProject(org.ofbiz.core.entity.GenericValue project)
                               throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: SchemeManager
Adds the default scheme to a particular project

Specified by:
addDefaultSchemeToProject in interface SchemeManager
Parameters:
project - The project that the scheme is to be added to
Throws:
org.ofbiz.core.entity.GenericEntityException - If a DB error occurs

addDefaultSchemeToProject

public void addDefaultSchemeToProject(Project project)
                               throws DataAccessException
Description copied from interface: SchemeManager
Adds the default scheme to a particular project

Specified by:
addDefaultSchemeToProject in interface SchemeManager
Parameters:
project - The project that the scheme is to be added to
Throws:
DataAccessException

copyScheme

public org.ofbiz.core.entity.GenericValue copyScheme(org.ofbiz.core.entity.GenericValue oldScheme)
                                              throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: SchemeManager
Copys a scheme, giving the new scheme the same entities as the original one

Specified by:
copyScheme in interface SchemeManager
Parameters:
oldScheme - The permission scheme to be copied
Returns:
The new permission scheme
Throws:
org.ofbiz.core.entity.GenericEntityException - If a DB error occurs

getNameForCopy

public String getNameForCopy(String originalName,
                             Integer abbreviateTo)

createSchemeCopiedEvent

@Nonnull
protected abstract AbstractSchemeCopiedEvent createSchemeCopiedEvent(@Nonnull
                                                                             Scheme oldScheme,
                                                                             @Nonnull
                                                                             Scheme newScheme)

copyScheme

public Scheme copyScheme(Scheme oldScheme)
Description copied from interface: SchemeManager
Copys a scheme, giving the new scheme the same entities as the original one

Specified by:
copyScheme in interface SchemeManager
Parameters:
oldScheme - The permission scheme to be copied
Returns:
The new permission scheme

flushProjectSchemes

protected void flushProjectSchemes()

getGroups

public Collection<com.atlassian.crowd.embedded.api.Group> getGroups(Long entityTypeId,
                                                                    Project project)
Specified by:
getGroups in interface SchemeManager

getGroups

public Collection<com.atlassian.crowd.embedded.api.Group> getGroups(Long entityTypeId,
                                                                    org.ofbiz.core.entity.GenericValue project)
Specified by:
getGroups in interface SchemeManager

getUsers

public Collection<com.atlassian.crowd.embedded.api.User> getUsers(Long permissionId,
                                                                  org.ofbiz.core.entity.GenericValue projectOrIssue)
Specified by:
getUsers in interface SchemeManager

getUsers

public Collection<com.atlassian.crowd.embedded.api.User> getUsers(Long permissionId,
                                                                  Project project)
Specified by:
getUsers in interface SchemeManager

getUsers

public Collection<com.atlassian.crowd.embedded.api.User> getUsers(Long permissionId,
                                                                  Issue issue)
Specified by:
getUsers in interface SchemeManager

getUsers

public Collection<com.atlassian.crowd.embedded.api.User> getUsers(Long permissionId,
                                                                  PermissionContext ctx)
Specified by:
getUsers in interface SchemeManager

createSchemeGenericValue

protected org.ofbiz.core.entity.GenericValue createSchemeGenericValue(Map<String,Object> values)
                                                               throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getApplicationI18n

protected I18nHelper getApplicationI18n()


Copyright © 2002-2014 Atlassian. All Rights Reserved.