public class ConfigGroupResourceProvider extends AbstractControllerResourceProvider implements ResourcePredicateEvaluator
AbstractResourceProvider.Command<T>
Modifier and Type | Field and Description |
---|---|
static String |
CLUSTER_NAME |
static String |
CLUSTER_NAME_PROPERTY_ID |
static String |
CONFIG_GROUP |
static String |
DESCRIPTION |
static String |
DESCRIPTION_PROPERTY_ID |
static String |
DESIRED_CONFIGS |
static String |
DESIRED_CONFIGS_PROPERTY_ID |
static String |
GROUP_NAME |
static String |
GROUP_NAME_PROPERTY_ID |
static String |
HOST_NAME |
static String |
HOST_NAME_PROPERTY_ID |
static String |
HOSTS |
static String |
HOSTS_HOST_NAME |
static String |
HOSTS_HOSTNAME_PROPERTY_ID |
static String |
HOSTS_PROPERTY_ID |
static String |
ID |
static String |
ID_PROPERTY_ID |
static String |
SERVICE_CONFIG_VERSION_NOTE |
static String |
SERVICE_CONFIG_VERSION_NOTE_PROPERTY_ID |
static String |
SERVICE_NAME |
static String |
SERVICE_NAME_PROPERTY_ID |
static String |
TAG |
static String |
TAG_PROPERTY_ID |
static String |
VERSION_TAGS |
static String |
VERSION_TAGS_PROPERTY_ID |
PROPERTIES_ATTRIBUTES_REGEX
Modifier | Constructor and Description |
---|---|
protected |
ConfigGroupResourceProvider(AmbariManagementController managementController)
Create a new resource provider for the given management controller.
|
Modifier and Type | Method and Description |
---|---|
Set<String> |
checkPropertyIds(Set<String> propertyIds)
Check whether the set of given property ids is supported by this resource
provider.
|
RequestStatus |
createResources(Set<ConfigGroupRequest> requests)
Create configuration group resources based on set of config group requests.
|
RequestStatus |
createResourcesAuthorized(Request request)
Create the resources defined by the properties in the given request object if authorization was
granted to the authenticated user.
|
RequestStatus |
deleteResourcesAuthorized(Request request,
Predicate predicate)
Delete the resources selected by the given predicate if the authenticated user is authorized
to do so.
|
boolean |
evaluate(Predicate predicate,
Resource resource)
Bypassing predicate evaluation for the lack of a matcher for a
non-scalar resource
|
protected Set<String> |
getPKPropertyIds()
Get the set of property ids that uniquely identify the resources
of this provider.
|
Set<Resource> |
getResourcesAuthorized(Request request,
Predicate predicate)
Get a set of
resources based on the given request and predicate
information if the authenticated user is authorized to do so. |
RequestStatus |
updateResources(Set<ConfigGroupRequest> requests) |
RequestStatus |
updateResourcesAuthorized(Request request,
Predicate predicate)
Update the resources selected by the given predicate with the properties from the given request
object if the authenticated user is authorized to do so.
|
getClusterId, getClusterResourceId, getClusterResourceId, getManagementController, getResourceProvider, getResourceProvider, init
createResources, deleteResources, getRequiredCreateAuthorizations, getRequiredDeleteAuthorizations, getRequiredGetAuthorizations, getRequiredUpdateAuthorizations, getResourceId, getResources, getResourceType, isAuthorizedToCreateResources, isAuthorizedToDeleteResources, isAuthorizedToGetResources, isAuthorizedToUpdateResources, setRequiredCreateAuthorizations, setRequiredDeleteAuthorizations, setRequiredGetAuthorizations, setRequiredUpdateAuthorizations, updateResources
addObserver, createResources, getConfigurationRequests, getKeyPropertyIds, getPropertyMaps, getPropertyMaps, getQueryParameterValue, getRequestStatus, getRequestStatus, getRequestStatus, getResources, modifyResources, notifyCreate, notifyDelete, notifyUpdate, parseProperties, updateObservers
checkCategory, checkConfigPropertyIds, containsArguments, getCategoryIds, getPropertyIds, getRegexEntry, getRegexGroups, getRequestPropertyIds, isPatternKey, isPropertyCategoryRequested, isPropertyEntryRequested, isPropertyRequested, setResourceProperty
public static final String CONFIG_GROUP
public static final String CLUSTER_NAME_PROPERTY_ID
public static final String ID_PROPERTY_ID
public static final String GROUP_NAME_PROPERTY_ID
public static final String TAG_PROPERTY_ID
public static final String SERVICE_NAME_PROPERTY_ID
public static final String DESCRIPTION_PROPERTY_ID
public static final String SERVICE_CONFIG_VERSION_NOTE_PROPERTY_ID
public static final String HOST_NAME_PROPERTY_ID
public static final String HOSTS_HOSTNAME_PROPERTY_ID
public static final String HOSTS_PROPERTY_ID
public static final String DESIRED_CONFIGS_PROPERTY_ID
public static final String VERSION_TAGS_PROPERTY_ID
public static final String CLUSTER_NAME
public static final String ID
public static final String GROUP_NAME
public static final String TAG
public static final String SERVICE_NAME
public static final String DESCRIPTION
public static final String SERVICE_CONFIG_VERSION_NOTE
public static final String HOST_NAME
public static final String HOSTS_HOST_NAME
public static final String HOSTS
public static final String DESIRED_CONFIGS
public static final String VERSION_TAGS
protected ConfigGroupResourceProvider(AmbariManagementController managementController)
managementController
- the management controllerprotected Set<String> getPKPropertyIds()
AbstractResourceProvider
getPKPropertyIds
in class AbstractResourceProvider
public RequestStatus createResourcesAuthorized(Request request) throws SystemException, UnsupportedPropertyException, ResourceAlreadyExistsException, NoSuchParentResourceException
AbstractAuthorizedResourceProvider
AbstractAuthorizedResourceProvider.createResources(Request)
is not overwritten.createResourcesAuthorized
in class AbstractAuthorizedResourceProvider
request
- the request object which defines the set of properties for the resources to be createdSystemException
- an internal system exception occurredAuthorizationException
- if the authenticated user is not authorized to perform this operationUnsupportedPropertyException
- the request contains unsupported property idsResourceAlreadyExistsException
- attempted to create a resource which already existsNoSuchParentResourceException
- a parent resource of the resource to create doesn't existAbstractAuthorizedResourceProvider.createResources(Request)
public Set<Resource> getResourcesAuthorized(Request request, Predicate predicate) throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException
AbstractAuthorizedResourceProvider
resources
based on the given request and predicate
information if the authenticated user is authorized to do so.
This method must be overwritten if AbstractAuthorizedResourceProvider.getResources(Request, Predicate)
is not overwritten.getResourcesAuthorized
in class AbstractAuthorizedResourceProvider
request
- the request object which defines the desired set of propertiespredicate
- the predicate object which can be used to filter which resources are returnedSystemException
- an internal system exception occurredAuthorizationException
- if the authenticated user is not authorized to perform this operationUnsupportedPropertyException
- the request contains unsupported property idsNoSuchResourceException
- the requested resource instance doesn't existNoSuchParentResourceException
- a parent resource of the requested resource doesn't existAbstractAuthorizedResourceProvider.getResources(Request, Predicate)
public RequestStatus updateResourcesAuthorized(Request request, Predicate predicate) throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException
AbstractAuthorizedResourceProvider
AbstractAuthorizedResourceProvider.updateResources(Request, Predicate)
is not overwritten.updateResourcesAuthorized
in class AbstractAuthorizedResourceProvider
request
- the request object which defines the set of properties for the resources to be updatedpredicate
- the predicate object which can be used to filter which resources are updatedSystemException
- an internal system exception occurredAuthorizationException
- if the authenticated user is not authorized to perform this operationUnsupportedPropertyException
- the request contains unsupported property idsNoSuchResourceException
- the resource instance to be updated doesn't existNoSuchParentResourceException
- a parent resource of the resource doesn't existAbstractAuthorizedResourceProvider.updateResources(Request, Predicate)
public RequestStatus deleteResourcesAuthorized(Request request, Predicate predicate) throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException
AbstractAuthorizedResourceProvider
ResourceProvider.deleteResources(Request, Predicate)
is not overwritten.deleteResourcesAuthorized
in class AbstractAuthorizedResourceProvider
predicate
- the predicate object which can be used to filter which resources are deletedSystemException
- an internal system exception occurredAuthorizationException
- if the authenticated user is not authorized to perform this operationUnsupportedPropertyException
- the request contains unsupported property idsNoSuchResourceException
- the resource instance to be deleted doesn't existNoSuchParentResourceException
- a parent resource of the resource doesn't existResourceProvider.deleteResources(Request, Predicate)
public Set<String> checkPropertyIds(Set<String> propertyIds)
ResourceProvider
checkPropertyIds
in interface ResourceProvider
checkPropertyIds
in class BaseProvider
public RequestStatus createResources(Set<ConfigGroupRequest> requests) throws SystemException, UnsupportedPropertyException, ResourceAlreadyExistsException, NoSuchParentResourceException
requests
- set of config group requestsSystemException
- an internal system exception occurredUnsupportedPropertyException
- the request contains unsupported property idsResourceAlreadyExistsException
- attempted to create a resource which already existsNoSuchParentResourceException
- a parent resource of the resource to create doesn't existpublic RequestStatus updateResources(Set<ConfigGroupRequest> requests) throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException
public boolean evaluate(Predicate predicate, Resource resource)
evaluate
in interface ResourcePredicateEvaluator
predicate
- the predicateresource
- the resourceCopyright © 2022 Apache Software Foundation. All rights reserved.