Package org.jboss.as.controller
Class CapabilityReferenceRecorder.ContextDependencyRecorder
- java.lang.Object
-
- org.jboss.as.controller.CapabilityReferenceRecorder.ContextDependencyRecorder
-
- All Implemented Interfaces:
CapabilityReferenceRecorder
- 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 theOperationContext
. This assumes that theresource registration associated with currently executing step
will expose acapability 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCapabilityRequirements(OperationContext context, Resource resource, String attributeName, String... attributeValues)
Registers capability requirement information to the given context.String
getBaseDependentName()
String
getBaseRequirementName()
protected String
getRequirementName(OperationContext context, Resource resource, String attributeValue)
void
removeCapabilityRequirements(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, wait
-
Methods inherited from interface org.jboss.as.controller.CapabilityReferenceRecorder
getRequirementPatternSegments, isDynamicDependent
-
-
-
-
Method Detail
-
addCapabilityRequirements
public final void addCapabilityRequirements(OperationContext context, Resource resource, String attributeName, String... attributeValues)
Registers capability requirement information to the given context.- Specified by:
addCapabilityRequirements
in 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:
removeCapabilityRequirements
in 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
public String getBaseDependentName()
- Specified by:
getBaseDependentName
in interfaceCapabilityReferenceRecorder
- Returns:
- base name of dependant, usually name of the attribute that provides reference to capability
-
getBaseRequirementName
public String getBaseRequirementName()
- Specified by:
getBaseRequirementName
in interfaceCapabilityReferenceRecorder
- Returns:
- requirement name of the capability this reference depends on
-
-