public class UserPermissionDAOHibernate extends HibernateDao<InternalGrantedPermission> implements InternalUserPermissionDAO
batchFinder, batchProcessor, logger, statelessSessionBatchProcessor, timeSource
sessionFactory
Constructor and Description |
---|
UserPermissionDAOHibernate() |
Modifier and Type | Method and Description |
---|---|
boolean |
exists(InternalGrantedPermission grantedPermission)
Return true if the InternalGrantedPermission has been explicitly granted.
|
List<InternalGrantedPermission> |
findAllInternalGrantedPermissions()
This is used in the backup procedure
|
List<InternalGrantedPermission> |
findAllPermissionsForGroup(String groupName,
long directoryId)
Find all permission entries for this group.
|
List<PermittedGroup> |
findHighestPermissionPerGroup(int start,
int limit)
Find all groups with an explicit permission, and return their highest permission
|
List<PermittedGroup> |
findHighestPermissionPerGroupByPrefix(String prefix,
int start,
int limit)
Find all groups with an explicit permission, and return their highest permission
|
Collection<PermittedGroup> |
getGrantedPermissions(UserPermission permission)
Find all groups that have been explicitly (not implicitly) granted the provided permission
|
Collection<PermittedGroup> |
getGrantedPermissions(UserPermission permission,
Application application)
Find all groups that have been explicitly (not implicitly) granted the provided permission
|
Class<InternalGrantedPermission> |
getPersistentClass()
All subclasses of HibernateDao must implement this method for
HibernateDao.load(Serializable) to work
correctly. |
void |
grant(InternalGrantedPermission permission)
Grant the explicit permission to the group.
|
boolean |
revoke(InternalGrantedPermission permission)
Remove the explicit permission from the group.
|
int |
revokeAll(DirectoryMapping directoryMapping)
Revokes all permissions associated with the specified directory mapping
|
createDeleteQuery, createDeleteQuery, createQuery, createQuery, executeHQLQuery, findAllInternal, findByProperties, findByPropertiesOptional, findByProperty, findByProperty, findByPropertyOptional, findByPropertyOrThrow, getCountByProperties, load, load, loadOptional, loadReference, loadReference, remove, removeByIdIfPresent, save, saveOrUpdate, session, setBatchFinder, setBatchProcessor, setClock, setStatelessSessionBatchProcessor, toPredicates, update
setSessionFactory, withStatelessSession
public Class<InternalGrantedPermission> getPersistentClass()
HibernateDao
HibernateDao.load(Serializable)
to work
correctly.getPersistentClass
in class HibernateDao<InternalGrantedPermission>
public void grant(InternalGrantedPermission permission)
InternalUserPermissionDAO
grant
in interface InternalUserPermissionDAO
permission
- the group/permission pair to createpublic Collection<PermittedGroup> getGrantedPermissions(UserPermission permission)
InternalUserPermissionDAO
getGrantedPermissions
in interface InternalUserPermissionDAO
permission
- permission to search forpublic Collection<PermittedGroup> getGrantedPermissions(UserPermission permission, Application application)
InternalUserPermissionDAO
getGrantedPermissions
in interface InternalUserPermissionDAO
permission
- permission to search forapplication
- application the permission should apply topublic List<PermittedGroup> findHighestPermissionPerGroupByPrefix(String prefix, int start, int limit)
InternalUserPermissionDAO
findHighestPermissionPerGroupByPrefix
in interface InternalUserPermissionDAO
prefix
- prefix return only groups whose names start with this prefixstart
- index to start page atlimit
- max number of results to return, 0 for all resultspublic List<PermittedGroup> findHighestPermissionPerGroup(int start, int limit)
InternalUserPermissionDAO
findHighestPermissionPerGroup
in interface InternalUserPermissionDAO
start
- index to start page atlimit
- max number of results to return, 0 for all resultspublic List<InternalGrantedPermission> findAllPermissionsForGroup(String groupName, long directoryId)
InternalUserPermissionDAO
findAllPermissionsForGroup
in interface InternalUserPermissionDAO
groupName
- name of group to searchpublic List<InternalGrantedPermission> findAllInternalGrantedPermissions()
public boolean revoke(InternalGrantedPermission permission)
InternalUserPermissionDAO
revoke
in interface InternalUserPermissionDAO
permission
- the group/permission pair to removepublic int revokeAll(DirectoryMapping directoryMapping)
InternalUserPermissionDAO
revokeAll
in interface InternalUserPermissionDAO
directoryMapping
- the directory mapping to revoke permissions forpublic boolean exists(InternalGrantedPermission grantedPermission)
InternalUserPermissionDAO
exists
in interface InternalUserPermissionDAO
grantedPermission
- the group/permission pair to search forCopyright © 2021 Atlassian. All rights reserved.