public interface CapabilityContext
capability is available.
The GLOBAL context can be used for most cases. A Host Controller will use a different implementation
of this interface for capabilities that are limited to some subset of the domain-wide model, e.g. a single
profile.
Implementations of this interface should override #equals(Object) and #hashCode() such that
logically equivalent but non-identical instances can function as keys in a hash map.
| Modifier and Type | Field and Description |
|---|---|
static CapabilityContext |
GLOBAL
A
CapabilityContext that can satisfy any dependent context. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canSatisfyRequirement(CapabilityId dependent,
String required,
CapabilityResolutionContext context)
Gets whether a given capability associated with this context can satisfy the given requirement.
|
default Set<CapabilityContext> |
getIncludingContexts(CapabilityResolutionContext context)
Gets any contexts that logically include this one, i.e.
|
String |
getName()
Gets a descriptive name of the context
|
boolean |
requiresConsistencyCheck()
Gets whether a consistency check must be performed when other capabilities depend on capabilities
in this context.
|
static final CapabilityContext GLOBAL
CapabilityContext that can satisfy any dependent context. Meant for capabilities that are present
regardless of any context, or for convenience use in cases where there is only one context.boolean canSatisfyRequirement(CapabilityId dependent, String required, CapabilityResolutionContext context)
dependent - id of the dependent capability. Cannot be nullrequired - name of the capability associated with this capability context. May be null if the
dependent name is not known.context - resolution context in use for this resolution runtrue if the requirement can be satisfied from this context; false otherwiseboolean requiresConsistencyCheck()
true if a consistency check is requiredString getName()
nulldefault Set<CapabilityContext> getIncludingContexts(CapabilityResolutionContext context)
context - resolution context in use for this resolution runnull but may be empty.Copyright © 2015 JBoss by Red Hat. All rights reserved.