Package org.jboss.as.controller
Class SimpleResourceDefinition.Parameters
- java.lang.Object
-
- org.jboss.as.controller.ResourceDefinition.AbstractConfigurator<SimpleResourceDefinition.Parameters>
-
- org.jboss.as.controller.SimpleResourceDefinition.Parameters
-
- All Implemented Interfaces:
ResourceDefinition.Configurator<SimpleResourceDefinition.Parameters>
- Enclosing class:
- SimpleResourceDefinition
public static class SimpleResourceDefinition.Parameters extends ResourceDefinition.AbstractConfigurator<SimpleResourceDefinition.Parameters>
Parameters object for the SimpleResourceDefinition constructor
-
-
Constructor Summary
Constructors Constructor Description Parameters(PathElement pathElement, DescriptionProvider descriptionProvider)
Creates a Parameters objectParameters(PathElement pathElement, ResourceDescriptionResolver descriptionResolver)
Creates a Parameters objectParameters(ResourceRegistration registration, DescriptionProvider descriptionProvider)
Creates a Parameters objectParameters(ResourceRegistration registration, ResourceDescriptionResolver descriptionResolver)
Creates a Parameters object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleResourceDefinition.Parameters
addCapabilities(RuntimeCapability... capabilities)
Add possible capabilities for this resource to any that are already set.SimpleResourceDefinition.Parameters
addIncorporatingCapabilities(Set<RuntimeCapability> incorporatingCapabilities)
Adds incorporating capabilities to any that have already been set.SimpleResourceDefinition.Parameters
addRequirement(String baseDependentName, Function<PathAddress,String[]> dependentDynamicNameMapper, String baseRequirementName, Function<PathAddress,String[]> requirementDynamicNameMapper)
Add a required capability at the resource level, using the resource registration address and the nameMappers to resolve the required and dependant capabilities.protected SimpleResourceDefinition.Parameters
self()
SimpleResourceDefinition.Parameters
setAccessConstraints(AccessConstraintDefinition... accessConstraints)
Set access constraint definitions for this resourceSimpleResourceDefinition.Parameters
setAddHandler(OperationStepHandler addHandler)
Sets the add handler.SimpleResourceDefinition.Parameters
setAdditionalPackages(RuntimePackageDependency... additionalPackages)
Set the additional packages that this resource exposesSimpleResourceDefinition.Parameters
setAddRestartLevel(OperationEntry.Flag addRestartLevel)
Sets the add restart level.SimpleResourceDefinition.Parameters
setCapabilities(RuntimeCapability... capabilities)
set possible capabilities that this resource exposesSimpleResourceDefinition.Parameters
setDeprecatedSince(ModelVersion deprecatedSince)
Call to deprecate the resourceSimpleResourceDefinition.Parameters
setDeprecationData(DeprecationData deprecationData)
Call to deprecate the resourceSimpleResourceDefinition.Parameters
setDescriptionResolver(ResourceDescriptionResolver descriptionResolver)
Sets the description resolver to useSimpleResourceDefinition.Parameters
setFeature(boolean feature)
set the feature nature of this resourceSimpleResourceDefinition.Parameters
setIncorporatingCapabilities(Set<RuntimeCapability> incorporatingCapabilities)
Registers a set of capabilities that this resource does not directly provide but to which it contributes.SimpleResourceDefinition.Parameters
setMaxOccurs(int maxOccurs)
set the maximum number of occurrences for this resourceSimpleResourceDefinition.Parameters
setMinOccurs(int minOccurs)
set the minimum number of occurrences for this resourceSimpleResourceDefinition.Parameters
setOrderedChild()
Call to indicate that a resource is of a type where ordering matters amongst the siblings of the same type.SimpleResourceDefinition.Parameters
setRemoveHandler(OperationStepHandler removeHandler)
Sets the remove handler.SimpleResourceDefinition.Parameters
setRemoveRestartLevel(OperationEntry.Flag removeRestartLevel)
Sets the remove restart level.SimpleResourceDefinition.Parameters
setRuntime()
Call to indicate that a resource is runtime-only.SimpleResourceDefinition.Parameters
setRuntime(boolean isRuntime)
Call to indicate that a resource is runtime-only.-
Methods inherited from class org.jboss.as.controller.ResourceDefinition.AbstractConfigurator
addAccessConstraints, asNonFeature, asOrderedChild, asRuntime, withAccessConstraints, withMaxOccurance, withMinOccurance
-
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.ResourceDefinition.Configurator
addAccessConstraint, addAccessConstraints, withAccessConstraint, withAccessConstraints
-
-
-
-
Constructor Detail
-
Parameters
public Parameters(PathElement pathElement, ResourceDescriptionResolver descriptionResolver)
Creates a Parameters object- Parameters:
pathElement
- the path element of the created ResourceDefinition. Cannot benull
descriptionResolver
- the description resolver. Cannot benull
-
Parameters
public Parameters(ResourceRegistration registration, ResourceDescriptionResolver descriptionResolver)
Creates a Parameters object- Parameters:
pathElement
- the path element of the created ResourceDefinition. Cannot benull
descriptionResolver
- the description resolver. Cannot benull
-
Parameters
public Parameters(PathElement pathElement, DescriptionProvider descriptionProvider)
Creates a Parameters object- Parameters:
pathElement
- the path element of the created ResourceDefinition. Cannot benull
descriptionProvider
- the description provider. Cannot benull
-
Parameters
public Parameters(ResourceRegistration registration, DescriptionProvider descriptionProvider)
Creates a Parameters object- Parameters:
pathElement
- the path element of the created ResourceDefinition. Cannot benull
descriptionProvider
- the description provider. Cannot benull
-
-
Method Detail
-
self
protected SimpleResourceDefinition.Parameters self()
- Specified by:
self
in classResourceDefinition.AbstractConfigurator<SimpleResourceDefinition.Parameters>
-
setDescriptionResolver
public SimpleResourceDefinition.Parameters setDescriptionResolver(ResourceDescriptionResolver descriptionResolver)
Sets the description resolver to use- Parameters:
descriptionResolver
- the description resolver. Cannot benull
- Returns:
- this Parameters object
-
setAddHandler
public SimpleResourceDefinition.Parameters setAddHandler(OperationStepHandler addHandler)
Sets the add handler. This can also be added by overridingSimpleResourceDefinition.registerOperations(ManagementResourceRegistration)
- Parameters:
addHandler
- the add handler to use.- Returns:
- this Parameters object
-
setRemoveHandler
public SimpleResourceDefinition.Parameters setRemoveHandler(OperationStepHandler removeHandler)
Sets the remove handler. This can also be added by overridingSimpleResourceDefinition.registerOperations(ManagementResourceRegistration)
- Parameters:
removeHandler
- the add handler to use.- Returns:
- this Parameters object
-
setAddRestartLevel
public SimpleResourceDefinition.Parameters setAddRestartLevel(OperationEntry.Flag addRestartLevel)
Sets the add restart level. The default isOperationEntry.Flag.RESTART_NONE
- Parameters:
addRestartLevel
- the restart level- Returns:
- this Parameters object
- Throws:
IllegalArgumentException
- ifaddRestartLevel
isnull
or a flag that does not pertain to restarts
-
setRemoveRestartLevel
public SimpleResourceDefinition.Parameters setRemoveRestartLevel(OperationEntry.Flag removeRestartLevel)
Sets the remove restart level. The default isOperationEntry.Flag.RESTART_ALL_SERVICES
- Parameters:
removeRestartLevel
- the restart level- Returns:
- this Parameters object
- Throws:
IllegalArgumentException
- ifaddRestartLevel
isnull
or a flag that does not pertain to restarts
-
setRuntime
public SimpleResourceDefinition.Parameters setRuntime()
Call to indicate that a resource is runtime-only. If not called, the default isfalse
- Returns:
- this Parameters object
-
setRuntime
public SimpleResourceDefinition.Parameters setRuntime(boolean isRuntime)
Call to indicate that a resource is runtime-only. If not called, the default isfalse
- Returns:
- this Parameters object
-
setDeprecationData
public SimpleResourceDefinition.Parameters setDeprecationData(DeprecationData deprecationData)
Call to deprecate the resource- Parameters:
deprecationData
- Information describing deprecation of this resource.- Returns:
- this Parameters object
- Throws:
IllegalStateException
- if thedeprecationData
is null
-
setDeprecatedSince
public SimpleResourceDefinition.Parameters setDeprecatedSince(ModelVersion deprecatedSince)
Call to deprecate the resource- Parameters:
deprecatedSince
- version in which model was deprecated- Returns:
- this Parameters object
- Throws:
IllegalStateException
- if thedeprecationData
is null
-
setOrderedChild
public SimpleResourceDefinition.Parameters setOrderedChild()
Call to indicate that a resource is of a type where ordering matters amongst the siblings of the same type. If not called, the default isfalse
.- Returns:
- this Parameters object
-
setCapabilities
public SimpleResourceDefinition.Parameters setCapabilities(RuntimeCapability... capabilities)
set possible capabilities that this resource exposes- Parameters:
capabilities
- capabilities to register- Returns:
- Parameters object
-
setAdditionalPackages
public SimpleResourceDefinition.Parameters setAdditionalPackages(RuntimePackageDependency... additionalPackages)
Set the additional packages that this resource exposes- Parameters:
additionalPackages
- runtime packages to register- Returns:
- Parameters object
-
addCapabilities
public SimpleResourceDefinition.Parameters addCapabilities(RuntimeCapability... capabilities)
Add possible capabilities for this resource to any that are already set.- Parameters:
capabilities
- capabilities to register- Returns:
- Parameters object
-
setAccessConstraints
public SimpleResourceDefinition.Parameters setAccessConstraints(AccessConstraintDefinition... accessConstraints)
Set access constraint definitions for this resource- Parameters:
accessConstraints
- access constraint definitions for this resource- Returns:
- Parameters object
-
setMaxOccurs
public SimpleResourceDefinition.Parameters setMaxOccurs(int maxOccurs)
set the maximum number of occurrences for this resource- Parameters:
maxOccurs
- the maximum number of times this resource can occur- Returns:
- Parameters object
-
setMinOccurs
public SimpleResourceDefinition.Parameters setMinOccurs(int minOccurs)
set the minimum number of occurrences for this resource- Parameters:
minOccurs
- the minimum number of times this resource must occur- Returns:
- Parameters object
-
setFeature
public SimpleResourceDefinition.Parameters setFeature(boolean feature)
set the feature nature of this resource- Parameters:
feature
- true if this resource is a feature- Returns:
- Parameters object
-
setIncorporatingCapabilities
public SimpleResourceDefinition.Parameters setIncorporatingCapabilities(Set<RuntimeCapability> incorporatingCapabilities)
Registers a set of capabilities that this resource does not directly provide but to which it contributes. This will only include capabilities for which this resource does not control theregistration of the capability
. Any capabilities registered by this resource should instead be declared usingsetCapabilities(RuntimeCapability[])
.Use of this method is only necessary if the caller wishes to specifically record capability incorporation, instead of relying on the default resolution mechanism detailed in
ImmutableManagementResourceRegistration.getIncorporatingCapabilities()
, or if it wishes disable the default resolution mechanism and specifically declare that this resource does not contribute to parent capabilities. It does the latter by passing an empty set as thecapabilities
parameter. Passing an empty set is not necessary if this resource itself directlyprovides a capability
, as it is the contract ofImmutableManagementResourceRegistration.getIncorporatingCapabilities()
that in that case it must return an empty set.- Parameters:
incorporatingCapabilities
- set of capabilities, ornull
if default resolution of capabilities to which this resource contributes should be used; an empty set can be used to indicate this resource does not contribute to capabilities provided by its parent- Returns:
- Parameters object
-
addRequirement
public SimpleResourceDefinition.Parameters addRequirement(String baseDependentName, Function<PathAddress,String[]> dependentDynamicNameMapper, String baseRequirementName, Function<PathAddress,String[]> requirementDynamicNameMapper)
Add a required capability at the resource level, using the resource registration address and the nameMappers to resolve the required and dependant capabilities.- Parameters:
baseDependentName
- the dependent capability base name.dependentDynamicNameMapper
- the dependent capability name mapper.baseRequirementName
- the required capability base name.requirementDynamicNameMapper
- the required capability name mapper.- Returns:
- Parameters object.
-
addIncorporatingCapabilities
public SimpleResourceDefinition.Parameters addIncorporatingCapabilities(Set<RuntimeCapability> incorporatingCapabilities)
Adds incorporating capabilities to any that have already been set.- Parameters:
incorporatingCapabilities
- capabilities to add- Returns:
- Parameters object
-
-