SYNOPSIS

  Covering all the actions and options in one line is difficult to compose
  correctly and difficult to read and understand. Instead, the synopsis
  will be described for each action in the DESCRIPTION section.

DESCRIPTION

  Deployment overlays are a way of 'overlaying' content into an existing deployment, 
  without physically modifying the contents of the deployment archive. 
  Possible use cases include swapping out deployment descriptors, 
  modifying static web resources to change the branding of an application, 
  or even replacing jar libraries with different versions.

  The command supports the following actions (action is always the first
  argument of the command): add, link, list-content, list-links,
  list-content, list-links, redeploy-affected, remove, upload.

  NOTE: When you modify or create an overlay it will not affect existing deployments, 
        they must be redeployed in order to take effect.
 
  NOTE: --server-group, --all-server-groups and --all-relevant-server-groups
        arguments in all the descriptions below are shown as optional
        in brackets, in fact, their appearance depends on the mode:
        one of them is allowed or required in the domain mode
        but in the standalone mode none of them is allowed.
      
ACTION: add

  Depending on the arguments the action
  - always creates a new overlay with content;
  - optionally links it to the specified deployments. Referenced deployments are
    not required to exist.
  - also optionally re-deploys the affected (linked) deployments.

  deployment-overlay add --name=overlay_name
      --content=archive_path=fs_path(,archive_path=fs_path)*
      [--server-groups=server_group_name(,server-group-name)* |
       --all-server-groups]
      [--deployments=deployment_name(,deployment_name)*]
      [--redeploy-affected]
      [--headers={operation_header (;operation_header)*}]

ACTION: remove

  Depending on the arguments the action may:
  - unlink deployments (if --deployments);
  - remove content (if --content argument is specified);
  - remove the overlay altogether with its content and links;
  - re-deploy affected deployments.
    
  deployment-overlay remove --name=overlay_name
      [--content=archive_path(,archive_path)*]
      [--server-groups=server_group_name(,server_group_name)* |
       --all-relevant-server-groups]
      [--deployments=deployment_name(,deployment_name)*]
      [--redeploy-affected]
      [--headers={operation_header (;operation_header)*}]
        
  If the remove command specifies only the name of the overlay, the overlay
  will be removed including its content and deployment links (from all server
  groups in the domain mode). 

  If in the domain mode remove command contains only --name and --server-groups
  (or --all-relevant-server-groups), all the links to the overlay will be
  removed from the specified server groups. The content will remain untouched.

  --content and --deployments target specific content and links
  to the specified deployments.

ACTION: upload

  Adds content to an existing overlay and optionally re-deploys the linked
  deployments.

  deployment-overlay upload --name=overlay_name
      --content=archive_path=fs_path(,archive_path=fs_path)*
      [--redeploy-affected]
      [--headers={operation_header (;operation_header)*}]

ACTION: link

  Creates links between an overlay and deployments and optionally
  re-deploys existing linked deployments. Referenced deployments are not required
  to exist.

  deployment-overlay link --name=overlay_name
      [--server-groups=server_group_name(,server_group_name)* |
       --all-server-groups]
      --deployment=deployment_name(,deployment_name)*
      [--redeploy-affected]
      [--headers={operation_header (;operation_header)*}]

ACTION: redeploy-affected

  Re-deploys all the linked deployments.
    
  deployment-overlay redeploy-affected --name=overlay_name
        [--headers={operation_header (;operation_header)*}]

ACTION: list-content

  Lists content of the overlay.
    
  deployment-overlay list-content --name=overlay_name [-l]

ACTION: list-links

  Lists deployments the overlay is linked to.
    
  deployment-overlay list-links --name=overlay_name [-l]
        [--server-groups=server_group_name(,server_group_name)*]

NOTE: deployment-overlay executed without an action lists existing overlay
      names.

    deployment-overlay [-l]


DESCRIPTION

    The command is used to manage deployment overlays, specifically to:
    - create new deployment overlays;
    - add new deployment content to an existing overlay;
    - remove existing content from an overlay;
    - link an overlay to existing deployments;
    - unlink an overlay from deployments;
    - remove an existing overlay.


ARGUMENTS

 --name              - required by any action, identifies a deployment overlay
                       to perform the action on;

 --content           - specifies the deployment overlay content.
 
                           If used with 'add' or 'upload' action, the format
                       will be of the value a comma-separated list of
                       archive_path=fs_path pairs,
                       where archive_path is the path as it will appear
                       in the linked deployment archive and fs_path is
                       the filesystem path to the file which should be
                       uploaded and become the actual content for
                       the archive_path.
                       
                           If used with 'remove' action, the format will be
                       a comma-separated list of archive_path that should be
                       removed from the overlay.

                       NOTE: In non-interactive mode, the list must be surrounded
                       by square brackets e.g.
                       [/WEB-INF/web.xml=test1.xml,/WEB-INF/ejb-jar.xml=test2.xml].

 --server-groups     - may appear only in the domain mode and is not allowed
                       in the standalone. The value is a comma-separated list
                       of the target server groups.

                       NOTE: In non-interactive mode, the list must be surrounded
                       by square brackets e.g. [group1, group2].

 --all-server-groups - may appear only in the domain mode and is not allowed
                       in the standalone. The argument does not expect any
                       value. It signifies that all the available server
                       groups should be targeted by the command.

 --all-relevant-server-groups  - may appear only in the domain mode and is not
                                 allowed in the standalone. The argument
                       does not expect any value. It signifies that all the
                       relevant (according to the other specified arguments)
                       server groups should be targeted.

 --deployments       - a comma-separated list of deployment runtime names that,
                       depending on the action, should be linked to or
                       unlinked from the specified overlay.

                       NOTE: In non-interactive mode the list must be surrounded
                       by square brackets e.g. [test.war,*-admin.war].

 --redeploy-affected - signifies that in addition to the specified action,
                       all the affected by the action deployments should
                       also be re-deployed as part of the command.
 
 -l                  - lists items one per line instead of organizing
                       them in columns;
                       
 --headers           - a list of operation headers separated by a semicolon.
                       For the list of supported headers, please, refer to
                       the domain management documentation or use
                       tab-completion.
