public class StackVersionResourceProvider extends ReadOnlyResourceProvider
AbstractResourceProvider.Command<T>
Modifier and Type | Field and Description |
---|---|
static String |
STACK_VERSION_PROPERTY_ID |
LOG
Modifier | Constructor and Description |
---|---|
protected |
StackVersionResourceProvider(Set<String> propertyIds,
Map<Resource.Type,String> keyPropertyIds,
AmbariManagementController managementController) |
Modifier and Type | Method and Description |
---|---|
protected Set<String> |
getPKPropertyIds()
Get the set of property ids that uniquely identify the resources
of this provider.
|
Set<Resource> |
getResources(Request request,
Predicate predicate)
Get a set of
resources based on the given request and predicate
information. |
createResources, deleteResources, updateResources
getManagementController, getQueryParameterValue, getResourceProvider, init
addObserver, createResources, getConfigurationRequest, getKeyPropertyIds, getPropertyMaps, getPropertyMaps, getRequestStatus, getRequestStatus, getResources, modifyResources, notifyCreate, notifyDelete, notifyUpdate, updateObservers
checkConfigPropertyIds, checkPropertyIds, containsArguments, getPropertyIds, getRegexGroups, getRegExpKey, getRequestPropertyIds, isPatternKey, setResourceProperty
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkPropertyIds
public static final String STACK_VERSION_PROPERTY_ID
protected StackVersionResourceProvider(Set<String> propertyIds, Map<Resource.Type,String> keyPropertyIds, AmbariManagementController managementController)
public Set<Resource> getResources(Request request, Predicate predicate) throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException
ResourceProvider
resources
based on the given request and predicate
information.
Note that it is not required for this resource provider to completely filter
the set of resources based on the given predicate. It may not be possible
since some of the properties involved may be provided by another
provider
. This partial filtering is allowed because
the predicate will always be applied by the calling cluster controller. The
predicate is made available at this level so that some pre-filtering can be done
as an optimization.
A simple implementation of a resource provider may choose to just return all of
the resources of a given type and allow the calling cluster controller to filter
based on the predicate.getResources
in interface ResourceProvider
getResources
in class ReadOnlyResourceProvider
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 occurredUnsupportedPropertyException
- the request contains unsupported property idsNoSuchResourceException
- the requested resource instance doesn't existNoSuchParentResourceException
- a parent resource of the requested resource doesn't existprotected Set<String> getPKPropertyIds()
AbstractResourceProvider
getPKPropertyIds
in class AbstractResourceProvider
Copyright © 2017. All rights reserved.