public class PermissionDAO extends Object
Constructor and Description |
---|
PermissionDAO() |
Modifier and Type | Method and Description |
---|---|
void |
create(PermissionEntity permissionEntity)
Create permission.
|
List<PermissionEntity> |
findAll()
Find all permission entities.
|
PermissionEntity |
findAmbariAdminPermission()
Find AMBARI.ADMINISTRATOR permission.
|
PermissionEntity |
findById(Integer id)
Find a permission entity with the given id.
|
PermissionEntity |
findByName(String name)
Find a permission entity with the given name.
|
PermissionEntity |
findClusterOperatePermission()
Find CLUSTER.ADMINISTRATOR permission.
|
PermissionEntity |
findClusterReadPermission()
Find CLUSTER.USER permission.
|
PermissionEntity |
findPermissionByNameAndType(String name,
ResourceTypeEntity resourceType)
Find a permission entity by name and type.
|
List<PermissionEntity> |
findPermissionsByPrincipal(List<PrincipalEntity> principalList)
Find the permission entities for the given list of principals
|
PermissionEntity |
findViewUsePermission()
Find VIEW.USER permission.
|
PermissionEntity |
merge(PermissionEntity permissionEntity)
Create or updates a permission.
|
public void create(PermissionEntity permissionEntity)
permissionEntity
- entity to storepublic PermissionEntity merge(PermissionEntity permissionEntity)
permissionEntity
- entity to create or updatepublic PermissionEntity findById(Integer id)
id
- type idpublic PermissionEntity findByName(String name)
name
- permission namepublic List<PermissionEntity> findPermissionsByPrincipal(List<PrincipalEntity> principalList)
principalList
- the list of principal entitiespublic List<PermissionEntity> findAll()
public PermissionEntity findPermissionByNameAndType(String name, ResourceTypeEntity resourceType)
name
- the permission nameresourceType
- the resource typepublic PermissionEntity findAmbariAdminPermission()
public PermissionEntity findViewUsePermission()
public PermissionEntity findClusterOperatePermission()
public PermissionEntity findClusterReadPermission()
Copyright © 2022 Apache Software Foundation. All rights reserved.