From 906d2ccee47c5ca8efd0145325386300c9e4ade7 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Thu, 21 Nov 2024 16:39:05 -0600 Subject: [PATCH] [WFCORE-7066] Use ADs without alternatives for the upload-deployment-xxx op request parameters --- .../as/server/controller/resources/DeploymentAttributes.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/src/main/java/org/jboss/as/server/controller/resources/DeploymentAttributes.java b/server/src/main/java/org/jboss/as/server/controller/resources/DeploymentAttributes.java index bbaafad4052..05e893db771 100644 --- a/server/src/main/java/org/jboss/as/server/controller/resources/DeploymentAttributes.java +++ b/server/src/main/java/org/jboss/as/server/controller/resources/DeploymentAttributes.java @@ -402,6 +402,7 @@ public void marshallAsAttribute(AttributeDefinition attribute, ModelNode resourc //Upload deployment bytes definitions public static final AttributeDefinition BYTES_NOT_NULL = SimpleAttributeDefinitionBuilder.create(DeploymentAttributes.CONTENT_BYTES) .setRequired(true) + .setAlternatives() .build(); public static final OperationDefinition UPLOAD_BYTES_DEFINITION = new SimpleOperationDefinitionBuilder(ModelDescriptionConstants.UPLOAD_DEPLOYMENT_BYTES, DEPLOYMENT_RESOLVER) .setParameters(BYTES_NOT_NULL) @@ -421,6 +422,7 @@ public void marshallAsAttribute(AttributeDefinition attribute, ModelNode resourc public static final AttributeDefinition URL_NOT_NULL = SimpleAttributeDefinitionBuilder.create(DeploymentAttributes.CONTENT_URL) .setRequired(true) .addArbitraryDescriptor(WEB_URL, ModelNode.TRUE) + .setAlternatives() .build(); public static final OperationDefinition UPLOAD_URL_DEFINITION = new SimpleOperationDefinitionBuilder(ModelDescriptionConstants.UPLOAD_DEPLOYMENT_URL, DEPLOYMENT_RESOLVER) .setParameters(URL_NOT_NULL) @@ -439,6 +441,7 @@ public void marshallAsAttribute(AttributeDefinition attribute, ModelNode resourc //Upload deployment stream definition public static final AttributeDefinition INPUT_STREAM_INDEX_NOT_NULL = SimpleAttributeDefinitionBuilder.create(DeploymentAttributes.CONTENT_INPUT_STREAM_INDEX) .setRequired(true) + .setAlternatives() .build(); //public static Map UPLOAD_INPUT_STREAM_INDEX_ATTRIBUTES = Collections.singletonMap(INPUT_STREAM_INDEX_NOT_NULL.getName(), INPUT_STREAM_INDEX_NOT_NULL); public static final OperationDefinition UPLOAD_STREAM_ATTACHMENT_DEFINITION = new SimpleOperationDefinitionBuilder(ModelDescriptionConstants.UPLOAD_DEPLOYMENT_STREAM, DEPLOYMENT_RESOLVER)