public interface CapabilityScope
capability
is available.
The GLOBAL
scope 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 | Interface and Description |
---|---|
static class |
CapabilityScope.Factory
Factory for creating a
CapabilityScope |
Modifier and Type | Field and Description |
---|---|
static CapabilityScope |
GLOBAL
A
CapabilityScope that can satisfy any dependent scope. |
Modifier and Type | Method and Description |
---|---|
boolean |
canSatisfyRequirement(String requiredName,
CapabilityScope dependentScope,
CapabilityResolutionContext context)
Gets whether a given capability associated with this scope can satisfy the given requirement.
|
default Set<CapabilityScope> |
getIncludingScopes(CapabilityResolutionContext context)
Gets any scope that logically include this one, i.e.
|
String |
getName()
Gets a descriptive name of the scope
|
boolean |
requiresConsistencyCheck()
Gets whether a consistency check must be performed when other capabilities depend on capabilities
in this scope.
|
static final CapabilityScope GLOBAL
CapabilityScope
that can satisfy any dependent scope. Meant for capabilities that are present
regardless of any scope, or for convenience use in cases where there is only one scope.boolean canSatisfyRequirement(String requiredName, CapabilityScope dependentScope, CapabilityResolutionContext context)
requiredName
- the name of the required capabilitydependentScope
- the scope of the dependent capabilitycontext
- resolution context in use for this resolution runtrue
if the requirement can be satisfied from this scope; false
otherwiseboolean requiresConsistencyCheck()
true
if a consistency check is requiredString getName()
null
default Set<CapabilityScope> getIncludingScopes(CapabilityResolutionContext context)
context
- resolution context in use for this resolution runnull
but may be empty.Copyright © 2023 JBoss by Red Hat. All rights reserved.