Interface ResourceRegistrationXMLElement.Builder<T extends ResourceRegistrationXMLElement,B extends ResourceRegistrationXMLElement.Builder<T,B>>
- All Superinterfaces:
AttributeDefinitionXMLConfiguration.Configurator<B>,ResourceXMLContainer.Builder<T,,B> XMLContainer.Builder<Map.Entry<PathAddress,,Map<PathAddress, org.jboss.dmr.ModelNode>>, org.jboss.dmr.ModelNode, T, B> XMLParticle.Builder<Map.Entry<PathAddress,Map<PathAddress, org.jboss.dmr.ModelNode>>, org.jboss.dmr.ModelNode, T, B>
- All Known Subinterfaces:
NamedResourceRegistrationXMLElement.Builder,SingletonResourceRegistrationXMLElement.Builder,SubsystemResourceRegistrationXMLElement.Builder
- All Known Implementing Classes:
NamedResourceRegistrationXMLElement.DefaultBuilder,ResourceRegistrationXMLElement.AbstractBuilder,SingletonResourceRegistrationXMLElement.DefaultBuilder,SubsystemResourceRegistrationXMLElement.DefaultBuilder
- Enclosing interface:
- ResourceRegistrationXMLElement
public static interface ResourceRegistrationXMLElement.Builder<T extends ResourceRegistrationXMLElement,B extends ResourceRegistrationXMLElement.Builder<T,B>>
extends ResourceXMLContainer.Builder<T,B>
-
Method Summary
Modifier and TypeMethodDescriptiondefault BIndicates that the operation associated with this resource should be discarded.default BwithDefaultValues(Map<AttributeDefinition, org.jboss.dmr.ModelNode> overrides) Specifies an operation transformation that applies the specified default values for the specified attributes, if otherwise undefined.withElementLocalName(String localName) Overrides the local name of the XML element for this resource.withElementLocalName(Function<PathElement, String> localName) Overrides the logic used to determine the local name of the XML element for this resource.withElementName(Function<PathElement, QName> name) Overrides the logic used to determine the element local name of this resource.default BwithElementName(QName name) Overrides the logic used to determine the local element name of this resource.withOperationKey(PathElement operationKey) Overrides the key used to index the generated operation.withOperationTransformation(BiConsumer<Map<PathAddress, org.jboss.dmr.ModelNode>, PathAddress> transformation) Specifies an operation transformation function, applied after this resource and any children are parsed into an "add" operation.default BwithOperationTransformation(BiFunction<PathAddress, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode> remappingFunction) Specifies an operation remapping function, applied after this resource and any children are parsed into an "add" operation.default BwithOperationTransformation(UnaryOperator<org.jboss.dmr.ModelNode> transformer) Specifies an operation transformation function, applied after this resource and any children are parsed into an "add" operation.Methods inherited from interface org.jboss.as.controller.persistence.xml.AttributeDefinitionXMLConfiguration.Configurator
withLocalNames, withMarshallers, withNames, withParsersMethods inherited from interface org.jboss.as.controller.persistence.xml.ResourceXMLContainer.Builder
addAttribute, addAttributes, ignoreAttributeLocalNames, ignoreAttributeNames, provideAttributesMethods inherited from interface org.jboss.as.controller.xml.XMLContainer.Builder
withContent, withContent, withContent, withContentMethods inherited from interface org.jboss.as.controller.xml.XMLParticle.Builder
build, withCardinality
-
Method Details
-
withOperationKey
Overrides the key used to index the generated operation.- Parameters:
operationKey- an operation key- Returns:
- a reference to this builder.
-
withElementLocalName
Overrides the local name of the XML element for this resource.- Parameters:
localName- the local element name override.- Returns:
- a reference to this builder.
-
withElementLocalName
Overrides the logic used to determine the local name of the XML element for this resource.- Parameters:
localName- a function returning the element local name for a given path.- Returns:
- a reference to this builder.
-
withElementName
Overrides the logic used to determine the local element name of this resource.- Parameters:
function- a function returning the qualified element name for a given path.- Returns:
- a reference to this builder.
-
withElementName
Overrides the logic used to determine the element local name of this resource.- Parameters:
name- a function returning the qualified element name for a given path.- Returns:
- a reference to this builder.
-
thenDiscardOperation
Indicates that the operation associated with this resource should be discarded.- Returns:
- a reference to this builder.
-
withOperationTransformation
Specifies an operation transformation function, applied after this resource and any children are parsed into an "add" operation. Defaults toUnaryOperator.identity()if unspecified. If this operator returns null, the "add" operation will be discarded.- Parameters:
transformer- an operation transformer- Returns:
- a reference to this builder.
-
withOperationTransformation
default B withOperationTransformation(BiFunction<PathAddress, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode> remappingFunction) Specifies an operation remapping function, applied after this resource and any children are parsed into an "add" operation. If this function returns null, the "add" operation will be discarded.- Parameters:
remappingFunction- a remapping function for the current operation- Returns:
- a reference to this builder.
-
withOperationTransformation
B withOperationTransformation(BiConsumer<Map<PathAddress, org.jboss.dmr.ModelNode>, PathAddress> transformation) Specifies an operation transformation function, applied after this resource and any children are parsed into an "add" operation. Defaults toFunctions.discardingBiConsumer()if unspecified.- Parameters:
transformation- a consumer accepting all operations and the key of the current operation- Returns:
- a reference to this builder.
-
withDefaultValues
Specifies an operation transformation that applies the specified default values for the specified attributes, if otherwise undefined. Used to apply legacy default values to older versions of a schema, e.g. when the default value for an attribute has since changed.- Parameters:
attributes- a map of values per attribute.- Returns:
- a reference to this builder
-