public class AmbariPrivilegeResourceProvider extends PrivilegeResourceProvider<Object>
AbstractResourceProvider.Command<T>
Modifier and Type | Field and Description |
---|---|
protected static ClusterDAO |
clusterDAO
Data access object used to obtain privilege entities.
|
static String |
TYPE |
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 |
---|
AmbariPrivilegeResourceProvider()
Construct an AmbariPrivilegeResourceProvider.
|
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.
|
Map<Long,Object> |
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 clusterDao)
Static initialization.
|
protected Resource |
toResource(PrivilegeEntity privilegeEntity,
Map<Long,UserEntity> userEntities,
Map<Long,GroupEntity> groupEntities,
Map<Long,PermissionEntity> roleEntities,
Map<Long,Object> resourceEntities,
Set<String> requestedIds)
Convert the given privilege entity into a Resource.
|
checkResourceTypes, createResourcesAuthorized, deleteResourcesAuthorized, getPermission, 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
public static final String TYPE
protected static ClusterDAO clusterDAO
public AmbariPrivilegeResourceProvider()
public static void init(ClusterDAO clusterDao)
clusterDao
- the cluster data access objectpublic Map<Resource.Type,String> getKeyPropertyIds()
ResourceProvider
getKeyPropertyIds
in interface ResourceProvider
getKeyPropertyIds
in class AbstractResourceProvider
public Map<Long,Object> getResourceEntities(Map<String,Object> properties)
PrivilegeResourceProvider
getResourceEntities
in class PrivilegeResourceProvider<Object>
properties
- the set of propertiesprotected Resource toResource(PrivilegeEntity privilegeEntity, Map<Long,UserEntity> userEntities, Map<Long,GroupEntity> groupEntities, Map<Long,PermissionEntity> roleEntities, Map<Long,Object> resourceEntities, Set<String> requestedIds)
PrivilegeResourceProvider
toResource
in class PrivilegeResourceProvider<Object>
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 idspublic Long getResourceEntityId(Predicate predicate)
PrivilegeResourceProvider
getResourceEntityId
in class PrivilegeResourceProvider<Object>
predicate
- predicateCopyright © 2022 Apache Software Foundation. All rights reserved.