com.aurel.track.dao
Interface AccessControlListDAO

All Known Implementing Classes:
TAccessControlListPeer

public interface AccessControlListDAO

This is the Data Access Object (DAO) class for access control lists. All access permissions in projects are controlled via access control lists.

Author:
Adrian Bojani

Method Summary
 void deleteByProjectRolePerson1(java.lang.Integer projectID, java.lang.Integer roleID, java.lang.Integer personID)
          Deletes an AccessControlList
 void filterReportBeans(java.lang.Integer personOID, java.util.List reportBeanList, int right, boolean projectAdmin, boolean verifyRoles)
          Verifies whether a person has a specific right for a list of reportBeanLists.
 java.util.List getCreateExplicitOptionsForField(java.lang.Integer configID, java.lang.Integer personOID, int[] projects)
          Returns the available create options from a list for a person in a project
 java.util.List getEditExplicitOptionsForField(java.lang.Integer configID, java.lang.Integer personOID, int[] projectOIDs, java.lang.Integer[] currentOption)
          Returns the available edit options from a list for a person in a project
 java.util.Map getFieldRestrictions(java.lang.Integer personOID, TWorkItemBean issueBean, int[] roleFlags, java.util.Set presentFields, boolean edit)
          Returns the fields restrictions for a person for a certain TWorkItem (issue).
 java.util.Set getPersonIDsWithRightInAllOfTheProjects(java.lang.Integer[] projects, int[] arrRights)
          Returns a set of personIDs which have one of the specified rights in all projects
 java.util.Set getPersonIDsWithRightInAnyOfTheProjects(java.lang.Integer[] projectOIDs, int[] arrRights)
          Returns a set of personIDs which have one of the specified rights in any project from projects
 java.util.Map getProjectFieldsNoRead(java.lang.Integer personOID)
          Returns a map with the fields with no read right for all the projects the user has any role in.
 boolean hasPersonRightInProject1(java.lang.Integer personOID, java.lang.Integer projectOID, java.lang.Integer issueTypeOID, int right, boolean projetcAdmin)
          Returns whether a person has a specific right in a project for the given issue type.
 void insertByProjectRolePerson1(java.lang.Integer projectID, java.lang.Integer roleID, java.lang.Integer personID)
          Inserts a new entry in the AccessControlList table
 java.util.List loadAccessControlListByProject(java.lang.Integer projectKey, java.lang.Integer[] departments, java.lang.Integer[] selectedRoles)
          Loads the list of AccessControlListBeans with the directly assigned persons/groups for a project filtered by departments (in case of persons, because groups are not linked to deparments) and by roles
 java.util.List loadAccessControlListDirect(java.lang.Integer[] selectedPersons, java.lang.Integer[] selectedProjects, java.lang.Integer[] selectedRoles)
          Loads a list of AccessControlListBeans with the directly assigned persons/groups
 

Method Detail

filterReportBeans

void filterReportBeans(java.lang.Integer personOID,
                       java.util.List reportBeanList,
                       int right,
                       boolean projectAdmin,
                       boolean verifyRoles)
Verifies whether a person has a specific right for a list of reportBeanLists. Specific right means either an assigned role with a right or a RACI role. If the person does not have the right, the reportBean is removed from the list. It filters out also the private issues (accessLevel=1) if the originator of that issue does not match the current users Id (personOID).

Parameters:
personOID - the object identifier of the person using this method
reportBeanList - list of reportBean which needs to be checked
right -
projectAdmin - true, if this user is a project administrator
verifyRoles - whether the assigned roles and RACI roles should be verified (for my-, responsible-, manager- issues not needed)

getFieldRestrictions

java.util.Map getFieldRestrictions(java.lang.Integer personOID,
                                   TWorkItemBean issueBean,
                                   int[] roleFlags,
                                   java.util.Set presentFields,
                                   boolean edit)
Returns the fields restrictions for a person for a certain TWorkItem (issue). By convention a field will be returned only if it is restricted (either no read, and consequently no modify, or no modify right).

Parameters:
personOID - the object identifier of the person
issueBean - the issue
roleFlags - read and/or modify or is project admin
edit - whether we are in an editing (edit/create issue) mode or only read only mode (print issue, email sending)
Returns:
map with key: fieldID, value: accessRight

getProjectFieldsNoRead

java.util.Map getProjectFieldsNoRead(java.lang.Integer personOID)
Returns a map with the fields with no read right for all the projects the user has any role in.

Parameters:
personOID - the object identifier of the person
Returns:
map with fields

getCreateExplicitOptionsForField

java.util.List getCreateExplicitOptionsForField(java.lang.Integer configID,
                                                java.lang.Integer personOID,
                                                int[] projects)
Returns the available create options from a list for a person in a project

Parameters:
configID -
personOID - the object identifier of the person
projects -
Returns:
list with create options

getEditExplicitOptionsForField

java.util.List getEditExplicitOptionsForField(java.lang.Integer configID,
                                              java.lang.Integer personOID,
                                              int[] projectOIDs,
                                              java.lang.Integer[] currentOption)
Returns the available edit options from a list for a person in a project

Parameters:
configID -
personOID - the object identifier of the person
projectOIDs - the object identifier of the projects
currentOption -
Returns:
list with edit options

getPersonIDsWithRightInAnyOfTheProjects

java.util.Set getPersonIDsWithRightInAnyOfTheProjects(java.lang.Integer[] projectOIDs,
                                                      int[] arrRights)
Returns a set of personIDs which have one of the specified rights in any project from projects

Parameters:
projectOIDs - an array with project object identifiers
arrRights - an array of rights, null means any right
Returns:
set with persons object IDs

getPersonIDsWithRightInAllOfTheProjects

java.util.Set getPersonIDsWithRightInAllOfTheProjects(java.lang.Integer[] projects,
                                                      int[] arrRights)
Returns a set of personIDs which have one of the specified rights in all projects

Parameters:
projects -
arrRights - an array of rights, null means any right
Returns:

hasPersonRightInProject1

boolean hasPersonRightInProject1(java.lang.Integer personOID,
                                 java.lang.Integer projectOID,
                                 java.lang.Integer issueTypeOID,
                                 int right,
                                 boolean projetcAdmin)
Returns whether a person has a specific right in a project for the given issue type.

Parameters:
personOID - the object identifier of the person
projectOID - the object identifier of the project
issueTypeOID - if null, it does not matter (for example project admin role doesn't depend on list type)
right -
Returns:
true if person has specific right in this project and issue type

loadAccessControlListDirect

java.util.List loadAccessControlListDirect(java.lang.Integer[] selectedPersons,
                                           java.lang.Integer[] selectedProjects,
                                           java.lang.Integer[] selectedRoles)
Loads a list of AccessControlListBeans with the directly assigned persons/groups

Parameters:
selectedPersons - when null or of length 0 it will be no filtered
selectedProjects - when null or of length 0 no results
selectedRoles - when null or of length 0 it will be no filtered
Returns:

loadAccessControlListByProject

java.util.List loadAccessControlListByProject(java.lang.Integer projectKey,
                                              java.lang.Integer[] departments,
                                              java.lang.Integer[] selectedRoles)
Loads the list of AccessControlListBeans with the directly assigned persons/groups for a project filtered by departments (in case of persons, because groups are not linked to deparments) and by roles

Parameters:
projectKey -
departments -
selectedRoles -
Returns:

insertByProjectRolePerson1

void insertByProjectRolePerson1(java.lang.Integer projectID,
                                java.lang.Integer roleID,
                                java.lang.Integer personID)
Inserts a new entry in the AccessControlList table

Parameters:
projKey -
roleKey -
personKey -

deleteByProjectRolePerson1

void deleteByProjectRolePerson1(java.lang.Integer projectID,
                                java.lang.Integer roleID,
                                java.lang.Integer personID)
Deletes an AccessControlList

Parameters:
projKey -
roleKey -
personKey -


Issue Tracking with Track+: Home Page      Copyright © 2008 Trackplus. All Rights Reserved.