public abstract class AbstractCapability extends Object implements Capability
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCapability(String name,
boolean dynamic,
Set<String> requirements,
Set<String> optionalRequirements,
Set<String> runtimeOnlyRequirements,
Set<String> dynamicRequirements,
Set<String> dynamicOptionalRequirements,
Function<PathAddress,String[]> dynamicNameMapper)
Creates a new capability
|
| Modifier and Type | Method and Description |
|---|---|
static String[] |
addressValueToDynamicName(PathAddress pathAddress)
resolves dynamic name from path address that return last element value are result
|
boolean |
equals(Object o) |
String |
getDynamicName(PathAddress address) |
String |
getDynamicName(String dynamicNameElement)
Gets the full name of a capbility, including a dynamic element
|
Set<String> |
getDynamicOptionalRequirements()
Gets the names of other dynamically named capabilities upon a concrete instance of which this
capability will have an optional requirement once the full name is known.
|
Set<String> |
getDynamicRequirements()
Gets the names of other dynamically named capabilities upon a concrete instance of which this
capability will have a hard requirement once the full name is known.
|
String |
getName()
Gets the basic name of the capability.
|
Set<String> |
getOptionalRequirements()
Gets the names of other capabilities optionally required by this capability.
|
Set<String> |
getRequirements()
Gets the names of other capabilities required by this capability.
|
Set<String> |
getRuntimeOnlyRequirements()
Gets the names of other capabilities optionally used by this capability if they
are present in the runtime, but where the use of the other capability will never
be mandated by the persistent configuration.
|
int |
hashCode() |
boolean |
isDynamicallyNamed()
Gets whether this capability is a dynamically named one, whose runtime variants
will have a dynamic element added to the base name provided by
getName(). |
String |
toString() |
protected AbstractCapability(String name, boolean dynamic, Set<String> requirements, Set<String> optionalRequirements, Set<String> runtimeOnlyRequirements, Set<String> dynamicRequirements, Set<String> dynamicOptionalRequirements, Function<PathAddress,String[]> dynamicNameMapper)
name - the name of the capability. Cannot be nullrequirements - names of other capabilities upon which this capability has a hard requirement. May be nulloptionalRequirements - names of other capabilities upon which this capability has an optional requirement. May be nullruntimeOnlyRequirements - names of other capabilities upon which this capability has an optional, runtime-only requirement. May be nulldynamicRequirements - names of other dynamically named capabilities upon a concrete instance of which this
capability will have a hard requirement once the full name is known. May be nulldynamicOptionalRequirements - names of other dynamically named capabilities upon a concrete instance of which this
capability will have an optional requirement once the full name is known. May be nulldynamicNameMapper - public static String[] addressValueToDynamicName(PathAddress pathAddress)
pathAddress - public String getName()
isDynamicallyNamed() returns true
this will be the basic name of the capability, not including any dynamic portions.getName in interface CapabilitynullgetDynamicName(String)public Set<String> getRequirements()
getRequirements in interface Capabilitynull but may be empty.public Set<String> getOptionalRequirements()
getOptionalRequirements in interface Capabilitynull but may be empty.public Set<String> getRuntimeOnlyRequirements()
optional requirements
in that optional requirements may or may not be specified by the persistent
configuration, but if they are the capability must be present or the configuration
is invalid.getRuntimeOnlyRequirements in interface Capabilitynull but may be empty.public Set<String> getDynamicRequirements()
getDynamicRequirements in interface Capabilitynull but may be empty.public Set<String> getDynamicOptionalRequirements()
getDynamicOptionalRequirements in interface Capabilitynull but may be empty.public boolean isDynamicallyNamed()
getName().isDynamicallyNamed in interface Capabilitytrue if this capability is dynamically namedpublic String getDynamicName(String dynamicNameElement)
getDynamicName in interface CapabilitydynamicNameElement - the dynamic portion of the name. Cannot be nullIllegalStateException - if isDynamicallyNamed() returns falsepublic String getDynamicName(PathAddress address)
getDynamicName in interface Capabilitypublic boolean equals(Object o)
Copyright © 2017 JBoss by Red Hat. All rights reserved.