public class ClusterStackVersionResourceProvider extends AbstractControllerResourceProvider
AbstractResourceProvider.Command<T>
PROPERTIES_ATTRIBUTES_REGEX
Constructor and Description |
---|
ClusterStackVersionResourceProvider(AmbariManagementController managementController)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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. |
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, updateResourcesAuthorized
addObserver, createResources, getConfigurationRequests, getKeyPropertyIds, 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 final String CLUSTER_STACK_VERSION_ID_PROPERTY_ID
protected static final String CLUSTER_STACK_VERSION_CLUSTER_NAME_PROPERTY_ID
protected static final String CLUSTER_STACK_VERSION_STACK_PROPERTY_ID
protected static final String CLUSTER_STACK_VERSION_VERSION_PROPERTY_ID
protected static final String CLUSTER_STACK_VERSION_STATE_PROPERTY_ID
protected static final String CLUSTER_STACK_VERSION_HOST_STATES_PROPERTY_ID
protected static final String CLUSTER_STACK_VERSION_REPO_SUMMARY_PROPERTY_ID
protected static final String CLUSTER_STACK_VERSION_REPO_SUPPORTS_REVERT
protected static final String CLUSTER_STACK_VERSION_REPO_REVERT_UPGRADE_ID
protected static final String CLUSTER_STACK_VERSION_REPOSITORY_VERSION_PROPERTY_ID
protected static final String CLUSTER_STACK_VERSION_STAGE_SUCCESS_FACTOR
protected static final String CLUSTER_STACK_VERSION_FORCE
HostVersionEntity
s to a specific
RepositoryVersionState
. When used during the creation of
HostVersionEntity
s, this will set the state to
RepositoryVersionState.INSTALLED
. When used during the update of a
cluster stack version, this will force all entities to
RepositoryVersionState.CURRENT
.protected static final String INSTALL_PACKAGES_ACTION
protected static final String INSTALL_PACKAGES_FULL_NAME
@Inject public ClusterStackVersionResourceProvider(AmbariManagementController managementController)
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 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 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)
protected Set<String> getPKPropertyIds()
AbstractResourceProvider
getPKPropertyIds
in class AbstractResourceProvider
Copyright © 2022 Apache Software Foundation. All rights reserved.