|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.scheme.AbstractSchemeManager
public abstract class AbstractSchemeManager
| Field Summary | |
|---|---|
protected ProjectManager |
projectManager
|
| Fields inherited from interface com.atlassian.jira.scheme.SchemeManager |
|---|
PROJECT_ASSOCIATION |
| Constructor Summary | |
|---|---|
protected |
AbstractSchemeManager(ProjectManager projectManager,
AbstractSchemeTypeManager typeManager,
PermissionContextFactory permissionContextFactory,
SchemeFactory schemeFactory,
AssociationManager associationManager,
OfBizDelegator ofBizDelegator)
|
| Method Summary | |
|---|---|
void |
addDefaultSchemeToProject(org.ofbiz.core.entity.GenericValue project)
Adds the default scheme to a particular project |
void |
addDefaultSchemeToProject(Project project)
|
void |
addSchemeToProject(org.ofbiz.core.entity.GenericValue project,
org.ofbiz.core.entity.GenericValue scheme)
Deprecated. should use addSchemeToProject(Project, Scheme) instead |
void |
addSchemeToProject(Project project,
Scheme scheme)
Adds a scheme to a particular project |
org.ofbiz.core.entity.GenericValue |
copyScheme(org.ofbiz.core.entity.GenericValue scheme)
Copys a scheme, giving the new scheme the same entities as the original one |
abstract org.ofbiz.core.entity.GenericValue |
copySchemeEntity(org.ofbiz.core.entity.GenericValue scheme,
org.ofbiz.core.entity.GenericValue entity)
|
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 |
Scheme |
createSchemeAndEntities(Scheme scheme)
|
protected org.ofbiz.core.entity.GenericValue |
createSchemeGenericValue(Map<String,Object> values)
|
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()
|
List<Scheme> |
getAssociatedSchemes(boolean withEntitiesComparable)
Gets all associated schemes of a certain type in the database. |
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. |
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<Group> |
getGroups(Long entityTypeId,
org.ofbiz.core.entity.GenericValue project)
|
List<org.ofbiz.core.entity.GenericValue> |
getProjects(org.ofbiz.core.entity.GenericValue scheme)
Deprecated. you should now use getProject(Scheme) |
List<Project> |
getProjects(Scheme scheme)
Gets all projects that are associated with that scheme |
org.ofbiz.core.entity.GenericValue |
getScheme(Long id)
Deprecated. use {link #getSchemeObject(Long)} |
org.ofbiz.core.entity.GenericValue |
getScheme(String name)
Deprecated. use getSchemeObject(String) |
abstract String |
getSchemeDesc()
|
abstract String |
getSchemeEntityName()
|
Scheme |
getSchemeObject(Long id)
Gets the given scheme by id from the underlying permanent store. |
Scheme |
getSchemeObject(String name)
Gets the given scheme by name from the underlying permanent store. |
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 a certain type attached to a 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 projectOrIssue)
Deprecated. Use getUsers(Long, com.atlassian.jira.permission.PermissionContext) instead. |
Collection<User> |
getUsers(Long permissionId,
PermissionContext ctx)
Retrieves a list of Users that have current permission in a project (e.g. |
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 |
void |
removeSchemesFromProject(org.ofbiz.core.entity.GenericValue project)
Deprecated. should use removeSchemesFromProject(Project) instead |
void |
removeSchemesFromProject(Project project)
Removes all schemes from a project |
boolean |
schemeExists(String name)
Determine if the scheme exists |
void |
updateScheme(org.ofbiz.core.entity.GenericValue entity)
Updates any changes to the 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 |
|---|
protected final ProjectManager projectManager
| Constructor Detail |
|---|
protected AbstractSchemeManager(ProjectManager projectManager,
AbstractSchemeTypeManager typeManager,
PermissionContextFactory permissionContextFactory,
SchemeFactory schemeFactory,
AssociationManager associationManager,
OfBizDelegator ofBizDelegator)
| Method Detail |
|---|
public void onClearCache(ClearCacheEvent event)
public abstract String getSchemeEntityName()
public abstract String getEntityName()
public abstract String getSchemeDesc()
public abstract String getDefaultNameKey()
public abstract String getDefaultDescriptionKey()
@Deprecated public String getAssociationType()
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.
public abstract org.ofbiz.core.entity.GenericValue copySchemeEntity(org.ofbiz.core.entity.GenericValue scheme,
org.ofbiz.core.entity.GenericValue entity)
throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
public org.ofbiz.core.entity.GenericValue getScheme(Long id)
throws org.ofbiz.core.entity.GenericEntityException
getScheme in interface SchemeManagerid - Id of the scheme
org.ofbiz.core.entity.GenericEntityException
public Scheme getSchemeObject(Long id)
throws DataAccessException
getSchemeObject in interface SchemeManagerid - the id of the scheme.
DataAccessException - if there is trouble retrieving from the database.
public Scheme getSchemeObject(String name)
throws DataAccessException
getSchemeObject in interface SchemeManagername - the name of the scheme.
DataAccessException - if there is trouble retrieving from the database.
public org.ofbiz.core.entity.GenericValue getScheme(String name)
throws DataAccessException
getSchemeObject(String)
getScheme in interface SchemeManagername - Name of the scheme
DataAccessException
public List<org.ofbiz.core.entity.GenericValue> getSchemes()
throws DataAccessException
getSchemes in interface SchemeManagerDataAccessException
public List<Scheme> getSchemeObjects()
throws DataAccessException
SchemeManager
getSchemeObjects in interface SchemeManagerDataAccessException - if the database is down or equivalent.
public List<Scheme> getAssociatedSchemes(boolean withEntitiesComparable)
throws DataAccessException
getAssociatedSchemes in interface SchemeManagerwithEntitiesComparable - 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.
DataAccessException
public List<Scheme> getUnassociatedSchemes()
throws DataAccessException
SchemeManager
getUnassociatedSchemes in interface SchemeManagerDataAccessException - if the database is down or equivalent.
public List<org.ofbiz.core.entity.GenericValue> getSchemes(org.ofbiz.core.entity.GenericValue project)
throws org.ofbiz.core.entity.GenericEntityException
getSchemes in interface SchemeManagerproject - The project that the schemes are attached to
org.ofbiz.core.entity.GenericEntityException
public org.ofbiz.core.entity.GenericValue getEntity(Long id)
throws org.ofbiz.core.entity.GenericEntityException
getEntity in interface SchemeManagerid - The id of the entity
org.ofbiz.core.entity.GenericEntityException
public List<org.ofbiz.core.entity.GenericValue> getEntities(String type,
String parameter)
throws org.ofbiz.core.entity.GenericEntityException
getEntities in interface SchemeManagertype - The type of the scheme you wish to get, eg. 'user', 'group', 'projectrole'parameter - The parameter in the entity
org.ofbiz.core.entity.GenericEntityException
public List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme)
throws org.ofbiz.core.entity.GenericEntityException
getEntities in interface SchemeManagerscheme - The scheme that the entities belong to
org.ofbiz.core.entity.GenericEntityException
public boolean schemeExists(String name)
throws org.ofbiz.core.entity.GenericEntityException
schemeExists in interface SchemeManagername - The name of the scheme
org.ofbiz.core.entity.GenericEntityException
public org.ofbiz.core.entity.GenericValue createScheme(String name,
String description)
throws org.ofbiz.core.entity.GenericEntityException
createScheme in interface SchemeManagername - The name of the new schemedescription - The description of the new scheme
org.ofbiz.core.entity.GenericEntityException
public Scheme createSchemeAndEntities(Scheme scheme)
throws DataAccessException
createSchemeAndEntities in interface SchemeManagerDataAccessException
public void updateScheme(org.ofbiz.core.entity.GenericValue entity)
throws org.ofbiz.core.entity.GenericEntityException
updateScheme in interface SchemeManagerentity - The modified scheme
org.ofbiz.core.entity.GenericEntityException
public void updateScheme(Scheme scheme)
throws DataAccessException
updateScheme in interface SchemeManagerscheme - The modified scheme object
DataAccessException
public void deleteScheme(Long id)
throws org.ofbiz.core.entity.GenericEntityException
deleteScheme in interface SchemeManagerid - Id of the scheme to be deleted
org.ofbiz.core.entity.GenericEntityException
@Deprecated
public void addSchemeToProject(org.ofbiz.core.entity.GenericValue project,
org.ofbiz.core.entity.GenericValue scheme)
throws org.ofbiz.core.entity.GenericEntityException
addSchemeToProject in interface SchemeManagerproject - The project that the scheme is to be added toscheme - The scheme to be added
org.ofbiz.core.entity.GenericEntityException
public void addSchemeToProject(Project project,
Scheme scheme)
throws DataAccessException
addSchemeToProject in interface SchemeManagerproject - The project that the scheme is to be added toscheme - The scheme to be added
DataAccessException
public void removeSchemesFromProject(Project project)
throws DataAccessException
removeSchemesFromProject in interface SchemeManagerproject - The project that all schemes are to be deleted from
DataAccessException
@Deprecated
public void removeSchemesFromProject(org.ofbiz.core.entity.GenericValue project)
throws org.ofbiz.core.entity.GenericEntityException
removeSchemesFromProject in interface SchemeManagerproject - The project that all schemes are to be deleted from
org.ofbiz.core.entity.GenericEntityException
public void deleteEntity(Long id)
throws DataAccessException
deleteEntity in interface SchemeManagerid - The id of the entity to be deleted
DataAccessException
@Deprecated
public List<org.ofbiz.core.entity.GenericValue> getProjects(org.ofbiz.core.entity.GenericValue scheme)
throws org.ofbiz.core.entity.GenericEntityException
getProjects in interface SchemeManagerscheme - The scheme used to get all projects
org.ofbiz.core.entity.GenericEntityException
public List<Project> getProjects(Scheme scheme)
throws DataAccessException
getProjects in interface SchemeManagerscheme - The scheme used to get all projects
Project's
DataAccessException
public org.ofbiz.core.entity.GenericValue createDefaultScheme()
throws org.ofbiz.core.entity.GenericEntityException
createDefaultScheme in interface SchemeManagerorg.ofbiz.core.entity.GenericEntityException
public boolean removeEntities(String type,
String parameter)
throws RemoveException
removeEntities in interface SchemeManagerparameter - must NOT be nulltype - the 'type' of entity you are deleting, eg 'group', 'user', 'projectrole'
RemoveException
public boolean removeEntities(org.ofbiz.core.entity.GenericValue scheme,
Long entityTypeId)
throws RemoveException
removeEntities in interface SchemeManagerscheme - to remove entites from must NOT be nullentityTypeId - to remove
RemoveException
public org.ofbiz.core.entity.GenericValue getDefaultScheme()
throws org.ofbiz.core.entity.GenericEntityException
getDefaultScheme in interface SchemeManagerorg.ofbiz.core.entity.GenericEntityException
public void addDefaultSchemeToProject(org.ofbiz.core.entity.GenericValue project)
throws org.ofbiz.core.entity.GenericEntityException
addDefaultSchemeToProject in interface SchemeManagerproject - The project that the scheme is to be added to
org.ofbiz.core.entity.GenericEntityException
public void addDefaultSchemeToProject(Project project)
throws DataAccessException
DataAccessException
public org.ofbiz.core.entity.GenericValue copyScheme(org.ofbiz.core.entity.GenericValue scheme)
throws org.ofbiz.core.entity.GenericEntityException
copyScheme in interface SchemeManagerscheme - The permission scheme to be copied
org.ofbiz.core.entity.GenericEntityExceptionprotected void flushProjectSchemes()
public Collection<Group> getGroups(Long entityTypeId,
org.ofbiz.core.entity.GenericValue project)
getGroups in interface SchemeManager
public Collection<User> getUsers(Long permissionId,
PermissionContext ctx)
Users that have current permission in a project (e.g. projects
schemes)
getUsers in interface SchemeManagerpermissionId - Permission ID.ctx - Context for evaluating permission request. Includes issue or project object.
User objects.
@Deprecated
public Collection<User> getUsers(Long permissionId,
org.ofbiz.core.entity.GenericValue projectOrIssue)
getUsers(Long, com.atlassian.jira.permission.PermissionContext) instead.
getUsers in interface SchemeManager
protected org.ofbiz.core.entity.GenericValue createSchemeGenericValue(Map<String,Object> values)
throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||