public class ClusterPrivilegeResourceProvider extends PrivilegeResourceProvider<ClusterEntity>
AbstractResourceProvider.Command<T>
Modifier and Type | Field and Description |
---|---|
protected static String |
CLUSTER_NAME |
protected static String |
CLUSTER_NAME_PROPERTY_ID |
protected static ClusterDAO |
clusterDAO
Data access object used to obtain privilege entities.
|
PERMISSION_LABEL, PERMISSION_LABEL_PROPERTY_ID, PERMISSION_NAME, PERMISSION_NAME_PROPERTY_ID, permissionDAO, PRINCIPAL_NAME, PRINCIPAL_NAME_PROPERTY_ID, PRINCIPAL_TYPE, PRINCIPAL_TYPE_PROPERTY_ID, PRIVILEGE_ID, PRIVILEGE_ID_PROPERTY_ID, PRIVILEGE_INFO, TYPE_PROPERTY_ID, VERSION_PROPERTY_ID
LOG, PROPERTIES_ATTRIBUTES_REGEX
Constructor and Description |
---|
ClusterPrivilegeResourceProvider()
Construct an ClusterPrivilegeResourceProvider.
|
Modifier and Type | Method and Description |
---|---|
Map<Resource.Type,String> |
getKeyPropertyIds()
Get the key property ids for the resource type associated with this resource
provider.
|
protected PermissionEntity |
getPermission(String permissionName,
ResourceEntity resourceEntity) |
Map<Long,ClusterEntity> |
getResourceEntities(Map<String,Object> properties)
Get the entities for the owning resources from the given properties.
|
Long |
getResourceEntityId(Predicate predicate)
Get the id for the resource specified by predicate.
|
static void |
init(ClusterDAO dao)
Static initialization.
|
protected Resource |
toResource(PrivilegeEntity privilegeEntity,
Map<Long,UserEntity> userEntities,
Map<Long,GroupEntity> groupEntities,
Map<Long,PermissionEntity> roleEntities,
Map<Long,ClusterEntity> resourceEntities,
Set<String> requestedIds)
Convert the given privilege entity into a Resource.
|
checkResourceTypes, createResourcesAuthorized, deleteResourcesAuthorized, getPKPropertyIds, getResourcesAuthorized, init, toEntity, updateResourcesAuthorized
createResources, deleteResources, getRequiredCreateAuthorizations, getRequiredDeleteAuthorizations, getRequiredGetAuthorizations, getRequiredUpdateAuthorizations, getResourceId, getResources, getResourceType, isAuthorizedToCreateResources, isAuthorizedToDeleteResources, isAuthorizedToGetResources, isAuthorizedToUpdateResources, setRequiredCreateAuthorizations, setRequiredDeleteAuthorizations, setRequiredGetAuthorizations, setRequiredUpdateAuthorizations, updateResources
addObserver, createResources, getConfigurationRequests, getPropertyMaps, getPropertyMaps, getQueryParameterValue, getRequestStatus, getRequestStatus, getRequestStatus, getResources, modifyResources, notifyCreate, notifyDelete, notifyUpdate, parseProperties, updateObservers
checkCategory, checkConfigPropertyIds, checkPropertyIds, containsArguments, getCategoryIds, getPropertyIds, getRegexEntry, getRegexGroups, getRequestPropertyIds, isPatternKey, isPropertyCategoryRequested, isPropertyEntryRequested, isPropertyRequested, setResourceProperty
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkPropertyIds
protected static ClusterDAO clusterDAO
protected static final String CLUSTER_NAME_PROPERTY_ID
protected static final String CLUSTER_NAME
public ClusterPrivilegeResourceProvider()
public static void init(ClusterDAO dao)
dao
- the cluster data access objectpublic Map<Resource.Type,String> getKeyPropertyIds()
ResourceProvider
getKeyPropertyIds
in interface ResourceProvider
getKeyPropertyIds
in class AbstractResourceProvider
public Map<Long,ClusterEntity> getResourceEntities(Map<String,Object> properties)
PrivilegeResourceProvider
getResourceEntities
in class PrivilegeResourceProvider<ClusterEntity>
properties
- the set of propertiespublic Long getResourceEntityId(Predicate predicate)
PrivilegeResourceProvider
getResourceEntityId
in class PrivilegeResourceProvider<ClusterEntity>
predicate
- predicateprotected Resource toResource(PrivilegeEntity privilegeEntity, Map<Long,UserEntity> userEntities, Map<Long,GroupEntity> groupEntities, Map<Long,PermissionEntity> roleEntities, Map<Long,ClusterEntity> resourceEntities, Set<String> requestedIds)
PrivilegeResourceProvider
toResource
in class PrivilegeResourceProvider<ClusterEntity>
privilegeEntity
- the privilege entity to be converteduserEntities
- the map of user entities keyed by resource idgroupEntities
- the map of group entities keyed by resource idroleEntities
- the map of role entities keyed by resource idresourceEntities
- the map of resource entities keyed by resource idrequestedIds
- the requested property idsprotected PermissionEntity getPermission(String permissionName, ResourceEntity resourceEntity) throws org.apache.ambari.server.AmbariException
getPermission
in class PrivilegeResourceProvider<ClusterEntity>
org.apache.ambari.server.AmbariException
Copyright © 2022 Apache Software Foundation. All rights reserved.