Package org.jboss.as.controller
Class CapabilityReferenceRecorder.ContextDependencyRecorder
java.lang.Object
org.jboss.as.controller.CapabilityReferenceRecorder.ContextDependencyRecorder
- All Implemented Interfaces:
CapabilityReferenceRecorder,Feature
- Direct Known Subclasses:
CapabilityReferenceRecorder.CompositeAttributeDependencyRecorder,CapabilityReferenceRecorder.DefaultCapabilityReferenceRecorder
- Enclosing interface:
- CapabilityReferenceRecorder
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.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jboss.as.controller.CapabilityReferenceRecorder
CapabilityReferenceRecorder.CompositeAttributeDependencyRecorder, CapabilityReferenceRecorder.ContextDependencyRecorder, CapabilityReferenceRecorder.DefaultCapabilityReferenceRecorder, CapabilityReferenceRecorder.ResourceCapabilityReferenceRecorder -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddCapabilityRequirements(OperationContext context, Resource resource, String attributeName, String... attributeValues) Registers capability requirement information to the given context.protected StringgetRequirementName(OperationContext context, Resource resource, String attributeValue) final voidremoveCapabilityRequirements(OperationContext context, Resource resource, String attributeName, String... attributeValues) Deregisters capability requirement information from the given context.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.as.controller.CapabilityReferenceRecorder
getRequirementPatternSegments, isDynamicDependentMethods inherited from interface org.jboss.as.controller.Feature
getStability
-
Method Details
-
addCapabilityRequirements
public final void addCapabilityRequirements(OperationContext context, Resource resource, String attributeName, String... attributeValues) Registers capability requirement information to the given context.- Specified by:
addCapabilityRequirementsin interfaceCapabilityReferenceRecorder- Parameters:
context- the contextresource- the resource on which requirements are gatheredattributeName- the name of the attributeattributeValues- the values of the attribute, which may contain null- Throws:
AssertionError- if the requirements discussed in the class javadoc are not fulfilled
-
removeCapabilityRequirements
public final void removeCapabilityRequirements(OperationContext context, Resource resource, String attributeName, String... attributeValues) Deregisters capability requirement information from the given context.- Specified by:
removeCapabilityRequirementsin interfaceCapabilityReferenceRecorder- Parameters:
context- the contextresource- the resource on which requirements are gatheredattributeName- the name of the attributeattributeValues- the values of the attribute, which may contain null- Throws:
AssertionError- if the requirements discussed in the class javadoc are not fulfilled
-
getRequirementName
protected String getRequirementName(OperationContext context, Resource resource, String attributeValue) -
getBaseDependentName
- Specified by:
getBaseDependentNamein interfaceCapabilityReferenceRecorder- Returns:
- base name of dependant, usually name of the attribute that provides reference to capability
-
getBaseRequirementName
- Specified by:
getBaseRequirementNamein interfaceCapabilityReferenceRecorder- Returns:
- requirement name of the capability this reference depends on
-