public static class CapabilityReferenceRecorder.ResourceCapabilityReferenceRecorder extends Object implements CapabilityReferenceRecorder
CapabilityReferenceRecorder that determines the dependent and required capability from the
PathAddress of the resource registration.CapabilityReferenceRecorder.CompositeAttributeDependencyRecorder, CapabilityReferenceRecorder.ContextDependencyRecorder, CapabilityReferenceRecorder.DefaultCapabilityReferenceRecorder, CapabilityReferenceRecorder.ResourceCapabilityReferenceRecorder| Constructor and Description |
|---|
ResourceCapabilityReferenceRecorder(Function<PathAddress,String[]> dynamicDependentNameMapper,
String baseDependentName,
Function<PathAddress,String[]> dynamicRequirementNameMapper,
String baseRequirementName) |
ResourceCapabilityReferenceRecorder(String baseDependentName,
Function<PathAddress,String[]> dynamicRequirementNameMapper,
String baseRequirementName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCapabilityRequirements(OperationContext context,
Resource resource,
String attributeName,
String... attributeValues)
Registers capability requirement information to the given context.
|
String |
getBaseDependentName() |
String |
getBaseRequirementName() |
String[] |
getRequirementPatternSegments(String dynamicElement,
PathAddress registrationAddress)
Returns the elements to be added to the baseRequirementName to build the capability name pattern.
|
boolean |
isDynamicDependent() |
void |
removeCapabilityRequirements(OperationContext context,
Resource resource,
String attributeName,
String... attributeValues)
Deregisters capability requirement information from the given context.
|
public ResourceCapabilityReferenceRecorder(Function<PathAddress,String[]> dynamicDependentNameMapper, String baseDependentName, Function<PathAddress,String[]> dynamicRequirementNameMapper, String baseRequirementName)
public ResourceCapabilityReferenceRecorder(String baseDependentName, Function<PathAddress,String[]> dynamicRequirementNameMapper, String baseRequirementName)
public void addCapabilityRequirements(OperationContext context, Resource resource, String attributeName, String... attributeValues)
CapabilityReferenceRecorderaddCapabilityRequirements in interface CapabilityReferenceRecordercontext - the contextresource - the resource on which requirements are gatheredattributeName - the name of the attributeattributeValues - the values of the attribute, which may contain nullpublic void removeCapabilityRequirements(OperationContext context, Resource resource, String attributeName, String... attributeValues)
CapabilityReferenceRecorderremoveCapabilityRequirements in interface CapabilityReferenceRecordercontext - the contextresource - the resource on which requirements are gatheredattributeName - the name of the attributeattributeValues - the values of the attribute, which may contain nullpublic String getBaseDependentName()
getBaseDependentName in interface CapabilityReferenceRecorderpublic String getBaseRequirementName()
getBaseRequirementName in interface CapabilityReferenceRecorderpublic boolean isDynamicDependent()
isDynamicDependent in interface CapabilityReferenceRecorderpublic String[] getRequirementPatternSegments(String dynamicElement, PathAddress registrationAddress)
CapabilityReferenceRecordergetRequirementPatternSegments in interface CapabilityReferenceRecorderdynamicElement - the name of the attribute.registrationAddress - the registration address of the resource definition that has the capability and its requirement.Copyright © 2021 JBoss by Red Hat. All rights reserved.