Skip to content

Commit

Permalink
[WFCORE-7066] Use ADs without alternatives for the upload-deployment-…
Browse files Browse the repository at this point in the history
…xxx op request parameters
  • Loading branch information
bstansberry committed Nov 22, 2024
1 parent 6f974db commit 906d2cc
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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<String, AttributeDefinition> 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)
Expand Down

0 comments on commit 906d2cc

Please sign in to comment.