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 java.lang.String PROJECT_ASSOCIATION
           
 
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(java.lang.String name, java.lang.String description)
           
 Scheme createSchemeAndEntities(Scheme scheme)
           
 org.ofbiz.core.entity.GenericValue createSchemeEntity(org.ofbiz.core.entity.GenericValue scheme, SchemeEntity entity)
           
 void deleteEntity(java.lang.Long id)
           
 void deleteScheme(java.lang.Long id)
           
 java.util.List<Scheme> getAssociatedSchemes(boolean withEntitiesComparable)
           
 org.ofbiz.core.entity.GenericValue getDefaultScheme()
          Gets the default scheme.
 java.util.List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme)
           
 java.util.List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, java.lang.Long entityTypeId)
           
 java.util.List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, java.lang.Long entityTypeId, java.lang.String parameter)
           
 java.util.List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, java.lang.String entityTypeId)
           
 java.util.List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, java.lang.String type, java.lang.Long entityTypeId)
           
 java.util.List<org.ofbiz.core.entity.GenericValue> getEntities(java.lang.String type, java.lang.String parameter)
          Get all entity records with a particular parameter
 org.ofbiz.core.entity.GenericValue getEntity(java.lang.Long id)
           
 java.util.Collection<com.opensymphony.user.Group> getGroups(java.lang.Long permissionId, org.ofbiz.core.entity.GenericValue project)
           
 java.util.List<org.ofbiz.core.entity.GenericValue> getProjects(org.ofbiz.core.entity.GenericValue scheme)
          Deprecated. use getProjects(Scheme) instead
 java.util.List<Project> getProjects(Scheme scheme)
           
 org.ofbiz.core.entity.GenericValue getScheme(java.lang.Long id)
           
 org.ofbiz.core.entity.GenericValue getScheme(java.lang.String name)
           
 java.util.List<org.ofbiz.core.entity.GenericValue> getSchemes()
           
 java.util.List<org.ofbiz.core.entity.GenericValue> getSchemes(org.ofbiz.core.entity.GenericValue project)
           
 java.util.List<Scheme> getUnassociatedSchemes()
          Will return all @link Scheme objects that are not currently associated with any projects.
 java.util.Collection<com.opensymphony.user.User> getUsers(java.lang.Long permissionId, org.ofbiz.core.entity.GenericValue issueOrProject)
          Deprecated. Use getUsers(Long, com.atlassian.jira.permission.PermissionContext) instead.
 java.util.Collection<com.opensymphony.user.User> getUsers(java.lang.Long permissionId, PermissionContext ctx)
           
 boolean hasSchemeAuthority(java.lang.Long entityType, org.ofbiz.core.entity.GenericValue entity)
          Checks anonymous permission of the given permission type for the given entity.
 boolean hasSchemeAuthority(java.lang.Long entityType, org.ofbiz.core.entity.GenericValue entity, com.opensymphony.user.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, java.lang.Long permissionId)
           
 boolean removeEntities(java.lang.String type, java.lang.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(java.lang.String name)
           
 void updateScheme(org.ofbiz.core.entity.GenericValue entity)
           
 void updateScheme(Scheme scheme)
           
 

Field Detail

PROJECT_ASSOCIATION

static final java.lang.String PROJECT_ASSOCIATION
See Also:
Constant Field Values
Method Detail

getScheme

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

getSchemes

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

getAssociatedSchemes

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

getScheme

org.ofbiz.core.entity.GenericValue getScheme(java.lang.String name)
                                             throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getSchemes

java.util.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(java.lang.String name)
                     throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

createScheme

org.ofbiz.core.entity.GenericValue createScheme(java.lang.String name,
                                                java.lang.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(java.lang.Long id)
                                             throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getEntities

java.util.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

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

getEntities

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

getEntities

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

getEntities

java.util.List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme,
                                                               java.lang.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(java.lang.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(java.lang.Long id)
                  throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getProjects

@Deprecated
java.util.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

java.util.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(java.lang.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(java.lang.Long entityType,
                           org.ofbiz.core.entity.GenericValue entity,
                           com.opensymphony.user.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,
                       java.lang.Long permissionId)
                       throws RemoveException
Throws:
RemoveException

getEntities

java.util.List<org.ofbiz.core.entity.GenericValue> getEntities(java.lang.String type,
                                                               java.lang.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(java.lang.String type,
                       java.lang.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

java.util.Collection<com.opensymphony.user.Group> getGroups(java.lang.Long permissionId,
                                                            org.ofbiz.core.entity.GenericValue project)

getUsers

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


getUsers

java.util.Collection<com.opensymphony.user.User> getUsers(java.lang.Long permissionId,
                                                          PermissionContext ctx)

getUnassociatedSchemes

java.util.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


Copyright © 2002-2010 Atlassian. All Rights Reserved.