Package org.wildfly.subsystem.resource
Class ResourceDescriptor.DefaultResourceDescriptor
- java.lang.Object
-
- org.wildfly.subsystem.resource.ResourceDescriptor.DefaultResourceDescriptor
-
- All Implemented Interfaces:
AddResourceOperationStepHandlerDescriptor,OperationStepHandlerDescriptor,ResourceDescriptor
- Enclosing interface:
- ResourceDescriptor
public static class ResourceDescriptor.DefaultResourceDescriptor extends Object implements ResourceDescriptor
DefaultResourceDescriptorimplementation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.wildfly.subsystem.resource.ResourceDescriptor
ResourceDescriptor.AbstractConfigurator<C extends ResourceDescriptor.Configurator<C>>, ResourceDescriptor.Builder, ResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>, ResourceDescriptor.DefaultBuilder, ResourceDescriptor.DefaultResourceDescriptor
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OperationEntry.FlaggetAddOperationRestartFlag()Returns the restart flag for the "add"} operation of this resource.UnaryOperator<OperationStepHandler>getAddOperationTransformation()Returns a transformer for the add operation handler.Iterable<AttributeDefinition>getAttributes()Attributes of the the resource affecting runtime.AttributeTranslationgetAttributeTranslation(AttributeDefinition attribute)Returns the attribute translation for the specified attribute, or null if none existsSet<RuntimeCapability<?>>getCapabilities()The capabilities provided by this resourceBiPredicate<OperationContext,Resource>getCapabilityFilter(RuntimeCapability<?> capability)Returns the resource model filter used to determine whether the specified capability should be [un]registered.Optional<Consumer<DeploymentProcessorTarget>>getDeploymentChainContributor()Returns an optional consumer of aDeploymentProcessorTarget, used to add deployment unit processors to the deployment chain.OperationEntry.FlaggetRemoveOperationRestartFlag()Returns the restart flag for the "remove" operation of this resource.Set<PathElement>getRequiredChildren()Returns the required child resources for this resource description.Set<PathElement>getRequiredSingletonChildren()Returns the required singleton child resources for this resource description.Set<ResourceCapabilityReferenceRecorder<?>>getResourceCapabilityReferences()Returns a mapping of capability references to an ancestor resource.ResourceDescriptionResolvergetResourceDescriptionResolver()The description resolver for the operation.UnaryOperator<OperationStepHandler>getResourceOperationTransformation()Returns a transformer to be applied to all operations that operate on an existing resource.UnaryOperator<Resource>getResourceTransformation()Returns a transformation for a newly created resource.Optional<ResourceOperationRuntimeHandler>getRuntimeHandler()Returns the optional runtime handling for this resource.OperationStepHandlergetWriteAttributeOperationStepHandler(AttributeDefinition attribute)Returns custom operation handler for the specified attribute.
-
-
-
Method Detail
-
getResourceDescriptionResolver
public ResourceDescriptionResolver getResourceDescriptionResolver()
Description copied from interface:ResourceDescriptorThe description resolver for the operation.- Specified by:
getResourceDescriptionResolverin interfaceResourceDescriptor- Returns:
- a description resolver
-
getRuntimeHandler
public Optional<ResourceOperationRuntimeHandler> getRuntimeHandler()
Description copied from interface:OperationStepHandlerDescriptorReturns the optional runtime handling for this resource.- Specified by:
getRuntimeHandlerin interfaceOperationStepHandlerDescriptor- Returns:
- an optional runtime handler
-
getCapabilities
public Set<RuntimeCapability<?>> getCapabilities()
Description copied from interface:ResourceDescriptorThe capabilities provided by this resource- Specified by:
getCapabilitiesin interfaceResourceDescriptor- Returns:
- a set of capabilities
-
getCapabilityFilter
public BiPredicate<OperationContext,Resource> getCapabilityFilter(RuntimeCapability<?> capability)
Description copied from interface:OperationStepHandlerDescriptorReturns the resource model filter used to determine whether the specified capability should be [un]registered.- Specified by:
getCapabilityFilterin interfaceOperationStepHandlerDescriptor- Parameters:
capability- a runtime capability- Returns:
- a resource model predicate
-
getResourceCapabilityReferences
public Set<ResourceCapabilityReferenceRecorder<?>> getResourceCapabilityReferences()
Description copied from interface:ResourceDescriptorReturns a mapping of capability references to an ancestor resource.- Specified by:
getResourceCapabilityReferencesin interfaceResourceDescriptor- Returns:
- a tuple of capability references and requirement resolvers.
-
getResourceOperationTransformation
public UnaryOperator<OperationStepHandler> getResourceOperationTransformation()
Description copied from interface:ResourceDescriptorReturns a transformer to be applied to all operations that operate on an existing resource. This is typically used to adapt legacy operations to conform to the current version of the model.- Specified by:
getResourceOperationTransformationin interfaceResourceDescriptor- Returns:
- an operation handler transformer.
-
getAttributes
public Iterable<AttributeDefinition> getAttributes()
Description copied from interface:ResourceDescriptorAttributes of the the resource affecting runtime.- Specified by:
getAttributesin interfaceResourceDescriptor- Returns:
- a collection of attributes
-
getAttributeTranslation
public AttributeTranslation getAttributeTranslation(AttributeDefinition attribute)
Description copied from interface:AddResourceOperationStepHandlerDescriptorReturns the attribute translation for the specified attribute, or null if none exists- Specified by:
getAttributeTranslationin interfaceAddResourceOperationStepHandlerDescriptor- Returns:
- an attribute translation, or null if none exists
-
getWriteAttributeOperationStepHandler
public OperationStepHandler getWriteAttributeOperationStepHandler(AttributeDefinition attribute)
Description copied from interface:ResourceDescriptorReturns custom operation handler for the specified attribute.- Specified by:
getWriteAttributeOperationStepHandlerin interfaceResourceDescriptor- Returns:
- a "write-attribute" operation handler
-
getRequiredChildren
public Set<PathElement> getRequiredChildren()
Description copied from interface:AddResourceOperationStepHandlerDescriptorReturns the required child resources for this resource description.- Specified by:
getRequiredChildrenin interfaceAddResourceOperationStepHandlerDescriptor- Returns:
- a collection of resource paths
-
getRequiredSingletonChildren
public Set<PathElement> getRequiredSingletonChildren()
Description copied from interface:AddResourceOperationStepHandlerDescriptorReturns the required singleton child resources for this resource description. This means only one child resource should exist for the given child type.- Specified by:
getRequiredSingletonChildrenin interfaceAddResourceOperationStepHandlerDescriptor- Returns:
- a collection of resource paths
-
getAddOperationTransformation
public UnaryOperator<OperationStepHandler> getAddOperationTransformation()
Description copied from interface:ResourceDescriptorReturns a transformer for the add operation handler. This is typically used to adapt legacy operations to conform to the current version of the model.- Specified by:
getAddOperationTransformationin interfaceResourceDescriptor- Returns:
- an operation handler transformer.
-
getResourceTransformation
public UnaryOperator<Resource> getResourceTransformation()
Description copied from interface:AddResourceOperationStepHandlerDescriptorReturns a transformation for a newly created resource.- Specified by:
getResourceTransformationin interfaceAddResourceOperationStepHandlerDescriptor- Returns:
- a resource transformation
-
getDeploymentChainContributor
public Optional<Consumer<DeploymentProcessorTarget>> getDeploymentChainContributor()
Description copied from interface:AddResourceOperationStepHandlerDescriptorReturns an optional consumer of aDeploymentProcessorTarget, used to add deployment unit processors to the deployment chain.- Specified by:
getDeploymentChainContributorin interfaceAddResourceOperationStepHandlerDescriptor- Returns:
- an optional
DeploymentProcessorTargetconsumer
-
getAddOperationRestartFlag
public OperationEntry.Flag getAddOperationRestartFlag()
Description copied from interface:ResourceDescriptorReturns the restart flag for the "add"} operation of this resource.- Specified by:
getAddOperationRestartFlagin interfaceResourceDescriptor- Returns:
- an operation flag
-
getRemoveOperationRestartFlag
public OperationEntry.Flag getRemoveOperationRestartFlag()
Description copied from interface:ResourceDescriptorReturns the restart flag for the "remove" operation of this resource.- Specified by:
getRemoveOperationRestartFlagin interfaceResourceDescriptor- Returns:
- an operation flag
-
-