org.wildfly.swarm.spi.api

## Interface JBossDeploymentStructureContainer<T extends <any>>

- All Known Subinterfaces:
    JARArchive, JAXRSArchive, WARArchive, WebXmlContainer<T>

      public interface JBossDeploymentStructureContainer<T extends <any>>

  An archive mix-in capable of adding JBoss Module dependencies.

  This mix-in provides support for creating and modifying an internal `jboss-deployment-structure.xml`.

  Author:
    Bob McWhirter, Ken Finnigan

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `PRIMARY_JBOSS_DEPLOYMENT_DESCRIPTOR_PATH`
    `static String` | `SECONDARY_JBOSS_DEPLOYMENT_DESCRIPTOR_PATH`

  - ### Method Summary

    All Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default Module` | `addModule(String name)` Add a dependency on a given module, presuming the `main` slot.
    `default Module` | `addModule(String name, String slot)` Add a dependency on a given module, with the specified slot.
    `default T` | `excludeModule(String name)` Exclude a module dependency, presuming the `main` slot.
    `default T` | `excludeModule(String name, String slot)` Exclude a module dependency, with the specified slot.
    `default JBossDeploymentStructureAsset` | `getDescriptorAsset()` Retrieve the underlying `jboss-deployment-structure.xml` descriptor asset.

- - ### Field Detail

    - #### PRIMARY_JBOSS_DEPLOYMENT_DESCRIPTOR_PATH

          static final String PRIMARY_JBOSS_DEPLOYMENT_DESCRIPTOR_PATH

      See Also:
        Constant Field Values

    - #### SECONDARY_JBOSS_DEPLOYMENT_DESCRIPTOR_PATH

          static final String SECONDARY_JBOSS_DEPLOYMENT_DESCRIPTOR_PATH

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### addModule

          default Module addModule(String name)

      Add a dependency on a given module, presuming the `main` slot.
      Parameters:
        `name` - The name of the module.
      Returns:
        The added module descriptor.

    - #### addModule

          default Module addModule(String name,
                                   String slot)

      Add a dependency on a given module, with the specified slot.
      Parameters:
        `name` - The name of the module.
        `slot` - The slot of the module.
      Returns:
        The added module descriptor.

    - #### excludeModule

          default T excludeModule(String name)

      Exclude a module dependency, presuming the `main` slot.
      Parameters:
        `name` - The name of the module.
      Returns:
        this archive.

    - #### excludeModule

          default T excludeModule(String name,
                                  String slot)

      Exclude a module dependency, with the specified slot.
      Parameters:
        `name` - The name of the module.
        `slot` - The slot of the module.
      Returns:
        this archive.

    - #### getDescriptorAsset

          default JBossDeploymentStructureAsset getDescriptorAsset()

      Retrieve the underlying `jboss-deployment-structure.xml` descriptor asset.

      This method will effectively round-trip an existing `.xml` file into the appropriate descriptor object tree.

      Returns:
        The existing descriptor asset, if present, else a newly-created one.

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