Package org.wildfly.subsystem.resource
Class ResourceDescriptor.AbstractConfigurator<C extends ResourceDescriptor.Configurator<C>>
- java.lang.Object
-
- org.wildfly.subsystem.resource.ResourceDescriptor.AbstractConfigurator<C>
-
- All Implemented Interfaces:
ResourceDescriptor.Configurator<C>
- Direct Known Subclasses:
ResourceDescriptor.DefaultBuilder
- Enclosing interface:
- ResourceDescriptor
public abstract static class ResourceDescriptor.AbstractConfigurator<C extends ResourceDescriptor.Configurator<C>> extends Object implements ResourceDescriptor.Configurator<C>
An abstractResourceDescriptorconfigurator.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description CaddAttribute(org.jboss.as.controller.AttributeDefinition attribute, org.jboss.as.controller.OperationStepHandler writeAttributeHandler)Adds the attribute with the specified custom "write-attribute" operation handler.CaddAttributes(Collection<org.jboss.as.controller.AttributeDefinition> attributes)Adds the specified attributes to this resource descriptor.CaddCapabilities(Collection<org.jboss.as.controller.capability.RuntimeCapability<?>> capabilities, BiPredicate<org.jboss.as.controller.OperationContext,org.jboss.as.controller.registry.Resource> filter)Adds the specified runtime capabilities to this resource.CaddCapability(org.jboss.as.controller.capability.RuntimeCapability<?> capability, BiPredicate<org.jboss.as.controller.OperationContext,org.jboss.as.controller.registry.Resource> filter)Adds the specified conditionally-registered runtime capability to this resourceCaddModelOnlyAttributes(Collection<org.jboss.as.controller.AttributeDefinition> attributes)Adds the specified model-only attributes (i.e. with no runtime handling) to this resource descriptor.CaddReadOnlyAttributes(Collection<org.jboss.as.controller.AttributeDefinition> attributes)Adds the specified read-only attributes to this resource descriptor.CaddResourceCapabilityReferences(Collection<? extends ResourceCapabilityReference<?>> references)Adds a number of capability references that records requirements for this resource.<P extends Supplier<org.jboss.as.controller.AttributeDefinition>>
CprovideAttributes(Collection<P> providers)Adds the specified attribute providers to this resource descriptor.<P extends Supplier<org.jboss.as.controller.capability.RuntimeCapability<?>>>
CprovideCapabilities(Collection<P> providers, BiPredicate<org.jboss.as.controller.OperationContext,org.jboss.as.controller.registry.Resource> filter)Adds the specified conditionally-registered runtime capability providers to this resource descriptor.<P extends Supplier<org.jboss.as.controller.AttributeDefinition>>
CprovideModelOnlyAttributes(Collection<P> providers)Adds the specified model-only attribute providers to this resource descriptor.<P extends Supplier<org.jboss.as.controller.AttributeDefinition>>
CprovideReadOnlyAttributes(Collection<P> providers)Adds the specified read-only attribute providers to this resource descriptor.CrequireChildResources(Set<? extends org.jboss.as.controller.ResourceRegistration> children)Defines a set of required children of this resource.CrequireSingletonChildResources(Set<? extends org.jboss.as.controller.ResourceRegistration> children)Defines a set of required singleton children of this resource.protected abstract Cself()CtranslateAttribute(org.jboss.as.controller.AttributeDefinition attribute, AttributeTranslation translation)Specifies an attribute alias to another attribute of a potentially different resource.CwithAddOperationRestartFlag(org.jboss.as.controller.registry.OperationEntry.Flag restartFlag)Overrides the default restart flag for the "add" operation of this resource.CwithDeploymentChainContributor(Consumer<DeploymentProcessorTarget> contributor)Applies the specified deployment chain contributor to this resource's "add" operation.CwithOperationTransformation(UnaryOperator<org.jboss.as.controller.OperationStepHandler> transformation)Applies the specified transformation to all operations for this resource.CwithOperationTransformation(Set<String> operationNames, UnaryOperator<org.jboss.as.controller.OperationStepHandler> transformation)Applies the specified transformation to the specified operations for this resource.CwithRemoveOperationRestartFlag(org.jboss.as.controller.registry.OperationEntry.Flag restartFlag)Overrides the default restart flag for the "remove" operation of this resource.CwithResourceTransformation(UnaryOperator<org.jboss.as.controller.registry.Resource> transformation)Applies the specified transformation to theResourcecreated by this resource's "add" operation.CwithRuntimeHandler(ResourceOperationRuntimeHandler runtimeHandler)Applies the specified runtime handler to the operations of this resource.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.subsystem.resource.ResourceDescriptor.Configurator
addCapabilities, addCapability, addResourceCapabilityReference, provideCapabilities, provideRequiredChildren, provideRequiredSingletonChildren, renameAttribute, requireChild, requireChildren, requireChildResource, requireSingletonChild, requireSingletonChild, requireSingletonChildResource, withAddResourceOperationTransformation, withOperationTransformation
-
-
-
-
Method Detail
-
self
protected abstract C self()
-
withRuntimeHandler
public C withRuntimeHandler(ResourceOperationRuntimeHandler runtimeHandler)
Description copied from interface:ResourceDescriptor.ConfiguratorApplies the specified runtime handler to the operations of this resource.- Specified by:
withRuntimeHandlerin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
runtimeHandler- a runtime handler.- Returns:
- a reference to this configurator
-
withAddOperationRestartFlag
public C withAddOperationRestartFlag(org.jboss.as.controller.registry.OperationEntry.Flag restartFlag)
Description copied from interface:ResourceDescriptor.ConfiguratorOverrides the default restart flag for the "add" operation of this resource.- Specified by:
withAddOperationRestartFlagin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
restartFlag- a restart flag- Returns:
- a reference to this configurator
-
withRemoveOperationRestartFlag
public C withRemoveOperationRestartFlag(org.jboss.as.controller.registry.OperationEntry.Flag restartFlag)
Description copied from interface:ResourceDescriptor.ConfiguratorOverrides the default restart flag for the "remove" operation of this resource.- Specified by:
withRemoveOperationRestartFlagin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
restartFlag- a restart flag- Returns:
- a reference to this configurator
-
addAttributes
public C addAttributes(Collection<org.jboss.as.controller.AttributeDefinition> attributes)
Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified attributes to this resource descriptor.- Specified by:
addAttributesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
attributes- a collection of attributes- Returns:
- a reference to this configurator
-
addAttribute
public C addAttribute(org.jboss.as.controller.AttributeDefinition attribute, org.jboss.as.controller.OperationStepHandler writeAttributeHandler)
Description copied from interface:ResourceDescriptor.ConfiguratorAdds the attribute with the specified custom "write-attribute" operation handler.- Specified by:
addAttributein interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
attribute- an attributewriteAttributeHandler- custom "write-attribute" operation handler- Returns:
- a reference to this configurator
-
addModelOnlyAttributes
public C addModelOnlyAttributes(Collection<org.jboss.as.controller.AttributeDefinition> attributes)
Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified model-only attributes (i.e. with no runtime handling) to this resource descriptor.- Specified by:
addModelOnlyAttributesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
attributes- a collection of attributes- Returns:
- a reference to this configurator
-
addReadOnlyAttributes
public C addReadOnlyAttributes(Collection<org.jboss.as.controller.AttributeDefinition> attributes)
Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified read-only attributes to this resource descriptor.- Specified by:
addReadOnlyAttributesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
attributes- a collection of attributes- Returns:
- a reference to this configurator
-
translateAttribute
public C translateAttribute(org.jboss.as.controller.AttributeDefinition attribute, AttributeTranslation translation)
Description copied from interface:ResourceDescriptor.ConfiguratorSpecifies an attribute alias to another attribute of a potentially different resource.- Specified by:
translateAttributein interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
attribute- the alias attributetranslation- a description of the attribute translation- Returns:
- a reference to this configurator
-
addCapability
public C addCapability(org.jboss.as.controller.capability.RuntimeCapability<?> capability, BiPredicate<org.jboss.as.controller.OperationContext,org.jboss.as.controller.registry.Resource> filter)
Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified conditionally-registered runtime capability to this resource- Specified by:
addCapabilityin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
capability- a runtime capabilityfilter- a predicate used to determine when the specified capability should be registered- Returns:
- a reference to this configurator
-
addCapabilities
public C addCapabilities(Collection<org.jboss.as.controller.capability.RuntimeCapability<?>> capabilities, BiPredicate<org.jboss.as.controller.OperationContext,org.jboss.as.controller.registry.Resource> filter)
Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified runtime capabilities to this resource.- Specified by:
addCapabilitiesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
capabilities- a collection of runtime capabilitiesfilter- a predicate used to determine when the specified capability should be registered- Returns:
- a reference to this configurator
-
requireChildResources
public C requireChildResources(Set<? extends org.jboss.as.controller.ResourceRegistration> children)
Description copied from interface:ResourceDescriptor.ConfiguratorDefines a set of required children of this resource. Required children will be automatically added, if no child resource exists with the specified path.- Specified by:
requireChildResourcesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Returns:
- a reference to this configurator
-
requireSingletonChildResources
public C requireSingletonChildResources(Set<? extends org.jboss.as.controller.ResourceRegistration> children)
Description copied from interface:ResourceDescriptor.ConfiguratorDefines a set of required singleton children of this resource. Required singleton children will be automatically added, if no child resource exists with the same path key.- Specified by:
requireSingletonChildResourcesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
children- a set of paths of the required singleton child resources- Returns:
- a reference to this configurator
-
addResourceCapabilityReferences
public C addResourceCapabilityReferences(Collection<? extends ResourceCapabilityReference<?>> references)
Description copied from interface:ResourceDescriptor.ConfiguratorAdds a number of capability references that records requirements for this resource.- Specified by:
addResourceCapabilityReferencesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
references- a collection of capability reference recorders- Returns:
- a reference to this configurator
-
withOperationTransformation
public C withOperationTransformation(UnaryOperator<org.jboss.as.controller.OperationStepHandler> transformation)
Description copied from interface:ResourceDescriptor.ConfiguratorApplies the specified transformation to all operations for this resource.- Specified by:
withOperationTransformationin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
transformation- an operation handler transformation- Returns:
- a reference to this configurator
-
withOperationTransformation
public C withOperationTransformation(Set<String> operationNames, UnaryOperator<org.jboss.as.controller.OperationStepHandler> transformation)
Description copied from interface:ResourceDescriptor.ConfiguratorApplies the specified transformation to the specified operations for this resource.- Specified by:
withOperationTransformationin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>transformation- an operation handler transformation- Returns:
- a reference to this configurator
-
withResourceTransformation
public C withResourceTransformation(UnaryOperator<org.jboss.as.controller.registry.Resource> transformation)
Description copied from interface:ResourceDescriptor.ConfiguratorApplies the specified transformation to theResourcecreated by this resource's "add" operation.- Specified by:
withResourceTransformationin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
transformation- an operation handler transformation- Returns:
- a reference to this configurator
-
withDeploymentChainContributor
public C withDeploymentChainContributor(Consumer<DeploymentProcessorTarget> contributor)
Description copied from interface:ResourceDescriptor.ConfiguratorApplies the specified deployment chain contributor to this resource's "add" operation.- Specified by:
withDeploymentChainContributorin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
contributor- a deployment chain contribution- Returns:
- a reference to this configurator
-
provideAttributes
public <P extends Supplier<org.jboss.as.controller.AttributeDefinition>> C provideAttributes(Collection<P> providers)
Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified attribute providers to this resource descriptor.- Specified by:
provideAttributesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
providers- a collection of attribute providers- Returns:
- a reference to this configurator
-
provideModelOnlyAttributes
public <P extends Supplier<org.jboss.as.controller.AttributeDefinition>> C provideModelOnlyAttributes(Collection<P> providers)
Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified model-only attribute providers to this resource descriptor.- Specified by:
provideModelOnlyAttributesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
providers- a collection of attribute providers- Returns:
- a reference to this configurator
-
provideReadOnlyAttributes
public <P extends Supplier<org.jboss.as.controller.AttributeDefinition>> C provideReadOnlyAttributes(Collection<P> providers)
Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified read-only attribute providers to this resource descriptor.- Specified by:
provideReadOnlyAttributesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
providers- a collection of attribute providers- Returns:
- a reference to this configurator
-
provideCapabilities
public <P extends Supplier<org.jboss.as.controller.capability.RuntimeCapability<?>>> C provideCapabilities(Collection<P> providers, BiPredicate<org.jboss.as.controller.OperationContext,org.jboss.as.controller.registry.Resource> filter)
Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified conditionally-registered runtime capability providers to this resource descriptor.- Specified by:
provideCapabilitiesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
providers- a collection of runtime capability providersfilter- a predicate used to determine when the specified capability should be registered- Returns:
- a reference to this configurator
-
-