Interface Capability
-
- All Known Implementing Classes:
AbstractCapability
,RuntimeCapability
public interface Capability
Basic description of a capability.- Author:
- Tomaz Cerar (c) 2015 Red Hat Inc.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Set<String>
getAdditionalRequiredPackages()
String
getDynamicName(String dynamicNameElement)
Gets the full name of a capability, including a dynamic elementString
getDynamicName(PathAddress address)
Set<String>
getDynamicOptionalRequirements()
Deprecated.Never returns anything but an empty set and likely will be removed in the next release.Set<String>
getDynamicRequirements()
Deprecated.Never returns anything but an empty set and likely will be removed in the next release.String
getName()
Gets the basic name of the capability.Set<String>
getOptionalRequirements()
Deprecated.Never returns anything but an empty set and likely will be removed in the next release.Set<String>
getRequirements()
Gets the names of other capabilities required by this capability.Set<String>
getRuntimeOnlyRequirements()
Deprecated.Never returns anything but an empty set and likely will be removed in the next release.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 bygetName()
.
-
-
-
Method Detail
-
getName
String getName()
Gets the basic name of the capability. IfisDynamicallyNamed()
returnstrue
this will be the basic name of the capability, not including any dynamic portions.- Returns:
- the name. Will not be
null
- See Also:
getDynamicName(String)
-
getRequirements
Set<String> getRequirements()
Gets the names of other capabilities required by this capability. These are static requirements.- Returns:
- the capability names. Will not be
null
but may be empty.
-
getOptionalRequirements
@Deprecated Set<String> getOptionalRequirements()
Deprecated.Never returns anything but an empty set and likely will be removed in the next release.Gets the names of other capabilities optionally required by this capability. Whether this capability will actually require the other capabilities is not statically known but rather depends on this capability's own configuration.- Returns:
- the capability names. Will not be
null
but may be empty.
-
getRuntimeOnlyRequirements
@Deprecated Set<String> getRuntimeOnlyRequirements()
Deprecated.Never returns anything but an empty set and likely will be removed in the next release.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. Differs fromoptional 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.- Returns:
- the capability names. Will not be
null
but may be empty.
-
getDynamicRequirements
@Deprecated Set<String> getDynamicRequirements()
Deprecated.Never returns anything but an empty set and likely will be removed in the next release.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. It is statically known that some variant of these base capability names will be required, but the exact name will not be known until this capability's configuration is read.- Returns:
- the capability names. Will not be
null
but may be empty.
-
getDynamicOptionalRequirements
@Deprecated Set<String> getDynamicOptionalRequirements()
Deprecated.Never returns anything but an empty set and likely will be removed in the next release.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. Whether this capability will actually require the other capabilities is not statically known but rather depends on this capability's own configuration.- Returns:
- the capability names. Will not be
null
but may be empty.
-
isDynamicallyNamed
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 bygetName()
.- Returns:
true
if this capability is dynamically named
-
getDynamicName
String getDynamicName(String dynamicNameElement)
Gets the full name of a capability, including a dynamic element- Parameters:
dynamicNameElement
- the dynamic portion of the name. Cannot benull
- Returns:
- the full capability name
- Throws:
IllegalStateException
- ifisDynamicallyNamed()
returnsfalse
-
getDynamicName
String getDynamicName(PathAddress address)
-
getAdditionalRequiredPackages
@Deprecated Set<String> getAdditionalRequiredPackages()
Gets the names of any "additional" Galleon packages that must be installed in order for this capability to function. The purpose of providing this information is to make it available to the Galleon tooling that produces Galleon feature-specs, in order to allow the tooling to include the package information in the relevant spec.A package is "additional" if it is not one of the "standard" packages that must be installed. The names of "standard" packages should not be returned. The "standard" packages are:
- The root package for the process type; i.e. the package that provides the main module whose name is passed to JBoss Modules when the process is launched.
-
If this capability is provided by an
Extension
, the package that installs the module that provides the extension. -
Any package that is listed as an additional required package by capability
upon which this capability has a
requirement
. - Any package that is non-optionally required, either directly or transitively, by one of the other types of standard packages.
- Returns:
- the additional package names. Will not return
null
but may be empty
-
-