org.wildfly.plugin.core

## Class DeploymentOperations

- java.lang.Object
- - org.wildfly.plugin.core.DeploymentOperations

-     public class DeploymentOperations
      extends Object

  A helper to create deployment operations.

  Note that when creating operations deployment operations the deployments server-groups are used to determine if the deployment is for a managed domain. If the server groups are is empty the standalone deployment operations will be created. Otherwise deployment operations for managed domains will be created.

  All operations create will be composite operations for consistency of parsing the result of executing the operation.

  Author:
    James R. Perkins

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DeploymentOperations()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static org.jboss.as.controller.client.Operation` | `createAddDeploymentOperation(Deployment deployment)` Creates an operation to add deployment content to a running server.
    `static org.jboss.as.controller.client.Operation` | `createAddDeploymentOperation(Set<Deployment> deployments)` Creates an operation to add deployment content to a running server for each deployment.
    `static org.jboss.as.controller.client.Operation` | `createDeployOperation(DeploymentDescription deployment)` Creates an operation to deploy existing deployment content to the runtime.
    `static org.jboss.as.controller.client.Operation` | `createDeployOperation(Set<DeploymentDescription> deployments)` Creates an option to deploy existing content to the runtime for each deployment
    `static org.jboss.as.controller.client.Operation` | `createRedeployOperation(DeploymentDescription deployment)` Creates a redeploy operation for the deployment.
    `static org.jboss.as.controller.client.Operation` | `createRedeployOperation(Set<DeploymentDescription> deployments)` Creates a redeploy operation for the deployment.
    `static org.jboss.as.controller.client.Operation` | `createReplaceOperation(Deployment deployment)` Creates an operation to replace deployment content to a running server.
    `static org.jboss.as.controller.client.Operation` | `createReplaceOperation(Set<Deployment> deployments)` Creates an operation to replace deployment content to a running server.
    `static org.jboss.as.controller.client.Operation` | `createUndeployOperation(Set<UndeployDescription> undeployDescriptions)` Creates an undeploy operation for each deployment description.
    `static org.jboss.as.controller.client.Operation` | `createUndeployOperation(UndeployDescription undeployDescription)` Creates an undeploy operation.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DeploymentOperations

          public DeploymentOperations()

  - ### Method Detail

    - #### createAddDeploymentOperation

          public static org.jboss.as.controller.client.Operation createAddDeploymentOperation(Deployment deployment)

      Creates an operation to add deployment content to a running server. If the deployment is set to be enabled the content will also be deployed.
      Parameters:
        `deployment` - the deployment to deploy
      Returns:
        the deploy operation
      See Also:
        `createDeployOperation(DeploymentDescription)`

    - #### createAddDeploymentOperation

          public static org.jboss.as.controller.client.Operation createAddDeploymentOperation(Set<Deployment> deployments)

      Creates an operation to add deployment content to a running server for each deployment. If the deployment is set to be enabled the content will also be deployed.
      Parameters:
        `deployments` - a set of deployments to deploy
      Returns:
        the deploy operation
      See Also:
        `createDeployOperation(Set)`

    - #### createDeployOperation

          public static org.jboss.as.controller.client.Operation createDeployOperation(DeploymentDescription deployment)

      Creates an operation to deploy existing deployment content to the runtime.
      Parameters:
        `deployment` - the deployment to deploy
      Returns:
        the deploy operation

    - #### createDeployOperation

          public static org.jboss.as.controller.client.Operation createDeployOperation(Set<DeploymentDescription> deployments)

      Creates an option to deploy existing content to the runtime for each deployment
      Parameters:
        `deployments` - a set of deployments to deploy
      Returns:
        the deploy operation

    - #### createReplaceOperation

          public static org.jboss.as.controller.client.Operation createReplaceOperation(Deployment deployment)

      Creates an operation to replace deployment content to a running server. The previous content is undeployed, then the new content is deployed, followed by the previous content being removed.
      Parameters:
        `deployment` - the deployment used to replace an existing deployment
      Returns:
        the deploy operation

    - #### createReplaceOperation

          public static org.jboss.as.controller.client.Operation createReplaceOperation(Set<Deployment> deployments)

      Creates an operation to replace deployment content to a running server. The previous content is undeployed, then the new content is deployed, followed by the previous content being removed.
      Parameters:
        `deployments` - the set deployment used to replace existing deployments which match the same name
      Returns:
        the deploy operation

    - #### createRedeployOperation

          public static org.jboss.as.controller.client.Operation createRedeployOperation(DeploymentDescription deployment)

      Creates a redeploy operation for the deployment.

      Note this does not upload new content. To add new content and deploy the new content see `createReplaceOperation(Deployment)`.

      Parameters:
        `deployment` - the deployment to redeploy
      Returns:
        the redeploy operation

    - #### createRedeployOperation

          public static org.jboss.as.controller.client.Operation createRedeployOperation(Set<DeploymentDescription> deployments)

      Creates a redeploy operation for the deployment.

      Note this does not upload new content. To add new content and deploy the new content see `createReplaceOperation(Set)`.

      Parameters:
        `deployments` - the set of deployments to redeploy
      Returns:
        the redeploy operation

    - #### createUndeployOperation

          public static org.jboss.as.controller.client.Operation createUndeployOperation(UndeployDescription undeployDescription)

      Creates an undeploy operation.

      If the `UndeployDescription.isRemoveContent()` returns `true` the content will also be removed from the content repository. Otherwise the content will remain on the server and only the `undeploy` operation will be executed.

      Note that the `failOnMissing` is ignored and the operation will fail if any deployments being undeployed are missing.

      Parameters:
        `undeployDescription` - the description used to crate the operation
      Returns:
        the undeploy operation

    - #### createUndeployOperation

          public static org.jboss.as.controller.client.Operation createUndeployOperation(Set<UndeployDescription> undeployDescriptions)

      Creates an undeploy operation for each deployment description.

      If the `UndeployDescription.isRemoveContent()` returns `true` the content will also be removed from the content repository. Otherwise the content will remain on the server and only the `undeploy` operation will be executed.

      Note that the `failOnMissing` is ignored and the operation will fail if any deployments being undeployed are missing.

      Parameters:
        `undeployDescriptions` - the set of descriptions used to crate the operation
      Returns:
        the undeploy operation

Copyright © 2021 JBoss by Red Hat. All rights reserved.