public class ViewPrivilegeResourceProvider extends PrivilegeResourceProvider<ViewInstanceEntity>
AbstractResourceProvider.Command<T>| Modifier and Type | Field and Description |
|---|---|
static String |
INSTANCE_NAME |
static String |
INSTANCE_NAME_PROPERTY_ID |
static String |
VERSION |
static String |
VERSION_PROPERTY_ID |
static String |
VIEW_NAME |
static String |
VIEW_NAME_PROPERTY_ID |
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_IDLOG, PROPERTIES_ATTRIBUTES_REGEX| Constructor and Description |
|---|
ViewPrivilegeResourceProvider()
Construct an ViewPrivilegeResourceProvider.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkResourceTypes(PrivilegeEntity entity)
Check to see if the given privilege entity's permission is allowable for the
resource type.
|
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,ViewInstanceEntity> |
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.
|
protected Resource |
toResource(PrivilegeEntity privilegeEntity,
Map<Long,UserEntity> userEntities,
Map<Long,GroupEntity> groupEntities,
Map<Long,PermissionEntity> roleEntities,
Map<Long,ViewInstanceEntity> resourceEntities,
Set<String> requestedIds)
Convert the given privilege entity into a Resource.
|
createResourcesAuthorized, deleteResourcesAuthorized, getPKPropertyIds, getResourcesAuthorized, init, toEntity, updateResourcesAuthorizedcreateResources, deleteResources, getRequiredCreateAuthorizations, getRequiredDeleteAuthorizations, getRequiredGetAuthorizations, getRequiredUpdateAuthorizations, getResourceId, getResources, getResourceType, isAuthorizedToCreateResources, isAuthorizedToDeleteResources, isAuthorizedToGetResources, isAuthorizedToUpdateResources, setRequiredCreateAuthorizations, setRequiredDeleteAuthorizations, setRequiredGetAuthorizations, setRequiredUpdateAuthorizations, updateResourcesaddObserver, createResources, getConfigurationRequests, getPropertyMaps, getPropertyMaps, getQueryParameterValue, getRequestStatus, getRequestStatus, getRequestStatus, getResources, modifyResources, notifyCreate, notifyDelete, notifyUpdate, parseProperties, updateObserverscheckCategory, checkConfigPropertyIds, checkPropertyIds, containsArguments, getCategoryIds, getPropertyIds, getRegexEntry, getRegexGroups, getRequestPropertyIds, isPatternKey, isPropertyCategoryRequested, isPropertyEntryRequested, isPropertyRequested, setResourcePropertyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckPropertyIdspublic static final String VIEW_NAME_PROPERTY_ID
public static final String VERSION_PROPERTY_ID
public static final String INSTANCE_NAME_PROPERTY_ID
public static final String VIEW_NAME
public static final String VERSION
public static final String INSTANCE_NAME
public ViewPrivilegeResourceProvider()
public Map<Resource.Type,String> getKeyPropertyIds()
ResourceProvidergetKeyPropertyIds in interface ResourceProvidergetKeyPropertyIds in class AbstractResourceProviderpublic Map<Long,ViewInstanceEntity> getResourceEntities(Map<String,Object> properties) throws org.apache.ambari.server.AmbariException
PrivilegeResourceProvidergetResourceEntities in class PrivilegeResourceProvider<ViewInstanceEntity>properties - the set of propertiesorg.apache.ambari.server.AmbariException - if resource entities were not foundpublic Long getResourceEntityId(Predicate predicate)
PrivilegeResourceProvidergetResourceEntityId in class PrivilegeResourceProvider<ViewInstanceEntity>predicate - predicateprotected boolean checkResourceTypes(PrivilegeEntity entity) throws org.apache.ambari.server.AmbariException
PrivilegeResourceProvidercheckResourceTypes in class PrivilegeResourceProvider<ViewInstanceEntity>entity - the privilege entityorg.apache.ambari.server.AmbariException - if the the privilege permission is not allowable for the resource typeprotected Resource toResource(PrivilegeEntity privilegeEntity, Map<Long,UserEntity> userEntities, Map<Long,GroupEntity> groupEntities, Map<Long,PermissionEntity> roleEntities, Map<Long,ViewInstanceEntity> resourceEntities, Set<String> requestedIds)
PrivilegeResourceProvidertoResource in class PrivilegeResourceProvider<ViewInstanceEntity>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<ViewInstanceEntity>org.apache.ambari.server.AmbariExceptionCopyright © 2022 Apache Software Foundation. All rights reserved.