com.atlassian.jira.scheme
Interface SchemeManager

All Known Subinterfaces:
IssueSecuritySchemeManager, NotificationSchemeManager, PermissionSchemeManager, WorkflowSchemeManager
All Known Implementing Classes:
AbstractSchemeManager, DefaultNotificationSchemeManager, DefaultPermissionSchemeManager, DefaultWorkflowSchemeManager, IssueSecuritySchemeManagerImpl, WorkflowBasedPermissionSchemeManager

public interface SchemeManager


Field Summary
static String PROJECT_ASSOCIATION
          The one and only "association type".
 
Method Summary
 void addDefaultSchemeToProject(org.ofbiz.core.entity.GenericValue project)
           
 void addSchemeToProject(org.ofbiz.core.entity.GenericValue project, org.ofbiz.core.entity.GenericValue scheme)
           
 void addSchemeToProject(Project project, Scheme scheme)
           
 org.ofbiz.core.entity.GenericValue copyScheme(org.ofbiz.core.entity.GenericValue scheme)
           
 org.ofbiz.core.entity.GenericValue createDefaultScheme()
           
 org.ofbiz.core.entity.GenericValue createScheme(String name, String description)
           
 Scheme createSchemeAndEntities(Scheme scheme)
           
 org.ofbiz.core.entity.GenericValue createSchemeEntity(org.ofbiz.core.entity.GenericValue scheme, SchemeEntity entity)
           
 void deleteEntity(Long id)
           
 void deleteScheme(Long id)
           
 List<Scheme> getAssociatedSchemes(boolean withEntitiesComparable)
           
 org.ofbiz.core.entity.GenericValue getDefaultScheme()
          Gets the default scheme.
 List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue 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 entityTypeId, String parameter)
           
 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 entityTypeId)
           
 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)
           
 Collection<Group> getGroups(Long permissionId, org.ofbiz.core.entity.GenericValue project)
           
 List<org.ofbiz.core.entity.GenericValue> getProjects(org.ofbiz.core.entity.GenericValue scheme)
          Deprecated. use getProjects(Scheme) instead
 List<Project> getProjects(Scheme scheme)
           
 org.ofbiz.core.entity.GenericValue getScheme(Long id)
           
 org.ofbiz.core.entity.GenericValue getScheme(String name)
          Deprecated. use @{link #getSchemeObject(String)}
 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()
          Deprecated. use getSchemeObjects()
 List<org.ofbiz.core.entity.GenericValue> getSchemes(org.ofbiz.core.entity.GenericValue project)
           
 List<Scheme> getUnassociatedSchemes()
          Will return all @link Scheme objects that are not currently associated with any projects.
 Collection<User> getUsers(Long permissionId, org.ofbiz.core.entity.GenericValue issueOrProject)
          Deprecated. Use getUsers(Long, com.atlassian.jira.permission.PermissionContext) instead.
 Collection<User> getUsers(Long permissionId, PermissionContext ctx)
           
 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 entity, com.atlassian.crowd.embedded.api.User user, boolean issueCreation)
          Checks the given user's permission of the given permission type for the given entity.
 boolean removeEntities(org.ofbiz.core.entity.GenericValue scheme, Long permissionId)
           
 boolean removeEntities(String type, String parameter)
          Removes all scheme entities with this parameter and type
 void removeSchemesFromProject(org.ofbiz.core.entity.GenericValue project)
           
 void removeSchemesFromProject(Project project)
           
 boolean schemeExists(String name)
           
 void updateScheme(org.ofbiz.core.entity.GenericValue entity)
           
 void updateScheme(Scheme scheme)
           
 

Field Detail

PROJECT_ASSOCIATION

static final String PROJECT_ASSOCIATION
The one and only "association type".

See Also:
Constant Field Values
Method Detail

getScheme

org.ofbiz.core.entity.GenericValue getScheme(Long id)
                                             throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getSchemes

List<org.ofbiz.core.entity.GenericValue> getSchemes()
                                                    throws org.ofbiz.core.entity.GenericEntityException
Deprecated. use getSchemeObjects()

Returns:
Throws:
org.ofbiz.core.entity.GenericEntityException

getAssociatedSchemes

List<Scheme> getAssociatedSchemes(boolean withEntitiesComparable)
                                  throws DataAccessException
Throws:
DataAccessException

getScheme

org.ofbiz.core.entity.GenericValue getScheme(String name)
                                             throws org.ofbiz.core.entity.GenericEntityException
Deprecated. use @{link #getSchemeObject(String)}

Parameters:
name -
Returns:
Throws:
org.ofbiz.core.entity.GenericEntityException

getSchemes

List<org.ofbiz.core.entity.GenericValue> getSchemes(org.ofbiz.core.entity.GenericValue project)
                                                    throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

schemeExists

boolean schemeExists(String name)
                     throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

createScheme

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

createSchemeAndEntities

Scheme createSchemeAndEntities(Scheme scheme)
                               throws DataAccessException
Throws:
DataAccessException

getEntity

org.ofbiz.core.entity.GenericValue getEntity(Long id)
                                             throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getEntities

List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme)
                                                     throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getEntities

List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme,
                                                     Long entityTypeId)
                                                     throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getEntities

List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme,
                                                     Long entityTypeId,
                                                     String parameter)
                                                     throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getEntities

List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme,
                                                     String type,
                                                     Long entityTypeId)
                                                     throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getEntities

List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme,
                                                     String entityTypeId)
                                                     throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

updateScheme

void updateScheme(org.ofbiz.core.entity.GenericValue entity)
                  throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

updateScheme

void updateScheme(Scheme scheme)
                  throws DataAccessException
Throws:
DataAccessException

deleteScheme

void deleteScheme(Long id)
                  throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

addSchemeToProject

void addSchemeToProject(org.ofbiz.core.entity.GenericValue project,
                        org.ofbiz.core.entity.GenericValue scheme)
                        throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

addSchemeToProject

void addSchemeToProject(Project project,
                        Scheme scheme)
                        throws DataAccessException
Throws:
DataAccessException

removeSchemesFromProject

void removeSchemesFromProject(org.ofbiz.core.entity.GenericValue project)
                              throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

removeSchemesFromProject

void removeSchemesFromProject(Project project)
                              throws DataAccessException
Throws:
DataAccessException

createSchemeEntity

org.ofbiz.core.entity.GenericValue createSchemeEntity(org.ofbiz.core.entity.GenericValue scheme,
                                                      SchemeEntity entity)
                                                      throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

deleteEntity

void deleteEntity(Long id)
                  throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getProjects

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

Get the generic value projects.

Parameters:
scheme -
Returns:
Throws:
org.ofbiz.core.entity.GenericEntityException

getProjects

List<Project> getProjects(Scheme scheme)
                          throws DataAccessException
Throws:
DataAccessException

createDefaultScheme

org.ofbiz.core.entity.GenericValue createDefaultScheme()
                                                       throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getDefaultScheme

org.ofbiz.core.entity.GenericValue getDefaultScheme()
                                                    throws org.ofbiz.core.entity.GenericEntityException
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.

Returns:
The default scheme
Throws:
org.ofbiz.core.entity.GenericEntityException

addDefaultSchemeToProject

void addDefaultSchemeToProject(org.ofbiz.core.entity.GenericValue project)
                               throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

copyScheme

org.ofbiz.core.entity.GenericValue copyScheme(org.ofbiz.core.entity.GenericValue scheme)
                                              throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

hasSchemeAuthority

boolean hasSchemeAuthority(Long entityType,
                           org.ofbiz.core.entity.GenericValue entity)
Checks anonymous permission of the given permission type for the given entity.

Parameters:
entityType - permission type.
entity - the entity to which permission is being checked.
Returns:
true only if the anonymous user is permitted.

hasSchemeAuthority

boolean hasSchemeAuthority(Long entityType,
                           org.ofbiz.core.entity.GenericValue entity,
                           com.atlassian.crowd.embedded.api.User user,
                           boolean issueCreation)
Checks the given user's permission of the given permission type for the given entity.

Parameters:
entityType - permission type.
entity - the entity to which permission is being checked.
user - the user.
issueCreation - whether the permission is for creating an issue.
Returns:
true only if the user is permitted.

removeEntities

boolean removeEntities(org.ofbiz.core.entity.GenericValue scheme,
                       Long permissionId)
                       throws RemoveException
Throws:
RemoveException

getEntities

List<org.ofbiz.core.entity.GenericValue> getEntities(String type,
                                                     String parameter)
                                                     throws org.ofbiz.core.entity.GenericEntityException
Get all entity records with a particular parameter

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

removeEntities

boolean removeEntities(String type,
                       String parameter)
                       throws RemoveException
Removes all scheme entities with this parameter and type

Parameters:
type - the 'type' of entity you are deleting, eg 'group', 'user', 'projectrole'
parameter - must NOT be null
Throws:
RemoveException

getGroups

Collection<Group> getGroups(Long permissionId,
                            org.ofbiz.core.entity.GenericValue project)

getUsers

@Deprecated
Collection<User> getUsers(Long permissionId,
                                     org.ofbiz.core.entity.GenericValue issueOrProject)
Deprecated. Use getUsers(Long, com.atlassian.jira.permission.PermissionContext) instead.


getUsers

Collection<User> getUsers(Long permissionId,
                          PermissionContext ctx)

getUnassociatedSchemes

List<Scheme> getUnassociatedSchemes()
                                    throws DataAccessException
Will return all @link Scheme objects that are not currently associated with any projects.

Returns:
list of @link Scheme objects
Throws:
DataAccessException - if the database is down or equivalent.

getSchemeObject

Scheme getSchemeObject(Long id)
                       throws DataAccessException
Gets a scheme by id from the database.

Parameters:
id - the id of the scheme to get.
Returns:
the Scheme
Throws:
DataAccessException - if the database is down or equivalent.

getSchemeObject

Scheme getSchemeObject(String name)
                       throws DataAccessException
Gets a scheme by name from the database.

Parameters:
name - the name of the scheme to get.
Returns:
the Scheme
Throws:
DataAccessException - if the database is down or equivalent.

getSchemeObjects

List<Scheme> getSchemeObjects()
                              throws DataAccessException
Gets all scheme objects in the database.

Returns:
the schemes.
Throws:
DataAccessException - if the database is down or equivalent.


Copyright © 2002-2011 Atlassian. All Rights Reserved.