public static class CapabilityReferenceRecorder.ContextDependencyRecorder extends Object implements CapabilityReferenceRecorder
CapabilityReferenceRecorder that determines the dependent capability from
the OperationContext. This assumes that the
resource registration associated with currently executing step
will expose a capability set including
one and only one capability. This recorder cannot be used with attributes associated with resources
that do not meet this requirement.CapabilityReferenceRecorder.CompositeAttributeDependencyRecorder, CapabilityReferenceRecorder.ContextDependencyRecorder, CapabilityReferenceRecorder.DefaultCapabilityReferenceRecorder, CapabilityReferenceRecorder.ResourceNameCompositeDependencyRecorder| Constructor and Description |
|---|
ContextDependencyRecorder(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.
|
void |
addCapabilityRequirements(OperationContext context,
String attributeName,
String... attributeValues)
Registers capability requirement information to the given context.
|
String |
getBaseDependentName()
|
String |
getBaseRequirementName() |
protected RuntimeCapability |
getDependentCapability(OperationContext context) |
protected String |
getDependentName(RuntimeCapability cap,
OperationContext context) |
protected String |
getRequirementName(OperationContext context,
Resource resource,
String attributeValue) |
boolean |
isDynamicDependent()
|
protected void |
processCapabilityRequirement(OperationContext context,
Resource resource,
String attributeName,
boolean remove,
String... attributeValues) |
void |
removeCapabilityRequirements(OperationContext context,
Resource resource,
String attributeName,
String... attributeValues)
Deregisters capability requirement information from the given context.
|
void |
removeCapabilityRequirements(OperationContext context,
String attributeName,
String... attributeValues)
Deregisters capability requirement information from the given context.
|
public ContextDependencyRecorder(String baseRequirementName)
public void addCapabilityRequirements(OperationContext context, String attributeName, String... attributeValues)
CapabilityReferenceRecorderaddCapabilityRequirements in interface CapabilityReferenceRecordercontext - the contextattributeName - the name of the attributeattributeValues - the values of the attribute, which may contain nullpublic void removeCapabilityRequirements(OperationContext context, String attributeName, String... attributeValues)
CapabilityReferenceRecorderremoveCapabilityRequirements in interface CapabilityReferenceRecordercontext - the contextattributeName - the name of the attributeattributeValues - the values of the attribute, which may contain nullpublic final void addCapabilityRequirements(OperationContext context, Resource resource, String attributeName, String... attributeValues)
addCapabilityRequirements 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 nullAssertionError - if the requirements discussed in the class javadoc are not fulfilledpublic final void removeCapabilityRequirements(OperationContext context, Resource resource, String attributeName, String... attributeValues)
removeCapabilityRequirements 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 nullAssertionError - if the requirements discussed in the class javadoc are not fulfilledprotected void processCapabilityRequirement(OperationContext context, Resource resource, String attributeName, boolean remove, String... attributeValues)
protected RuntimeCapability getDependentCapability(OperationContext context)
protected String getDependentName(RuntimeCapability cap, OperationContext context)
protected String getRequirementName(OperationContext context, Resource resource, String attributeValue)
public String getBaseDependentName()
getBaseDependentName in interface CapabilityReferenceRecorderpublic String getBaseRequirementName()
getBaseRequirementName in interface CapabilityReferenceRecorderpublic boolean isDynamicDependent()
isDynamicDependent in interface CapabilityReferenceRecorderCopyright © 2017 JBoss by Red Hat. All rights reserved.