Class ModuleSpecification

java.lang.Object
org.jboss.as.server.deployment.SimpleAttachable
org.jboss.as.server.deployment.module.ModuleSpecification
All Implemented Interfaces:
Attachable
Direct Known Subclasses:
AdditionalModuleSpecification

public class ModuleSpecification extends SimpleAttachable
Information used to build a module.

This class is not thread safe. It should only be used by the deployment unit processors associated with a single deployment unit, with a parent deployment and a subdeployment considered to be separate deployments.

Author:
Stuart Douglas, Marius Bogoevici
  • Constructor Details

    • ModuleSpecification

      public ModuleSpecification()
  • Method Details

    • addSystemDependency

      public void addSystemDependency(ModuleDependency dependency)
    • addSystemDependencies

      public void addSystemDependencies(Collection<ModuleDependency> dependencies)
    • addUserDependency

      public void addUserDependency(ModuleDependency dependency)
    • addUserDependencies

      public void addUserDependencies(Collection<ModuleDependency> dependencies)
    • removeUserDependencies

      public void removeUserDependencies(Predicate<ModuleDependency> predicate)
      Remove user dependencies that match the predicate.
      Parameters:
      predicate - test for whether a dependency should be removed. Cannot be null.
    • addLocalDependency

      public void addLocalDependency(ModuleDependency dependency)
    • addLocalDependencies

      public void addLocalDependencies(Collection<ModuleDependency> dependencies)
    • getSystemDependenciesSet

      public Set<ModuleDependency> getSystemDependenciesSet()
      System dependencies are dependencies that are added automatically by the container.
      Returns:
      system dependencies iterable in order of addition. Will not return null.
    • addExclusion

      @Deprecated(forRemoval=true) public void addExclusion(org.jboss.modules.ModuleIdentifier exclusion)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Records that a module with the given identifier should be excluded from use as a system or local dependency.
      Parameters:
      exclusion - the module to exclude. Cannot be null
    • addModuleExclusion

      public void addModuleExclusion(String exclusion)
      Records that a module with the given name should be excluded from use as a system or local dependency.
      Parameters:
      exclusion - the module to exclude. Cannot be null
    • addExclusions

      @Deprecated(forRemoval=true) public void addExclusions(Iterable<org.jboss.modules.ModuleIdentifier> exclusions)
      Deprecated, for removal: This API element is subject to removal in a future version.
      iterate over the exclusions and call addModuleExclusion(String)
      Records a collection of modules as being excluded.
      Parameters:
      exclusions - the identifiers of the modules to exclude. Cannot be null
    • getLocalDependenciesSet

      public Set<ModuleDependency> getLocalDependenciesSet()
      Local dependencies are dependencies on other parts of the deployment, such as a class-path entry
      Returns:
      local dependencies iterable in order of addition. Will not return null.
    • getUserDependenciesSet

      public Set<ModuleDependency> getUserDependenciesSet()
      User dependencies are dependencies that the user has specifically added, either via jboss-deployment-structure.xml or via the manifest.

      User dependencies are not affected by exclusions.

      Returns:
      user dependencies iterable in order of addition. Will not return null.
    • addResourceLoader

      public void addResourceLoader(org.jboss.modules.ResourceLoaderSpec resourceLoader)
    • getResourceLoaders

      public List<org.jboss.modules.ResourceLoaderSpec> getResourceLoaders()
    • addClassTransformer

      public void addClassTransformer(String classTransformer)
    • getClassTransformers

      public List<String> getClassTransformers()
    • isSubDeploymentModulesIsolated

      public boolean isSubDeploymentModulesIsolated()
    • setSubDeploymentModulesIsolated

      public void setSubDeploymentModulesIsolated(boolean subDeploymentModulesIsolated)
    • isExclusionsCascadedToSubDeployments

      public boolean isExclusionsCascadedToSubDeployments()
    • setExclusionsCascadedToSubDeployments

      public void setExclusionsCascadedToSubDeployments(boolean exclusionsCascadedToSubDeployments)
    • isPrivateModule

      public boolean isPrivateModule()
    • setPrivateModule

      public void setPrivateModule(boolean privateModule)
    • isPublicModule

      public boolean isPublicModule()
    • setPublicModule

      public void setPublicModule(boolean publicModule)
    • isLocalDependenciesTransitive

      public boolean isLocalDependenciesTransitive()
      Returns true if the local dependencies added for this ModuleSpecification should be made transitive (i.e. if any other module 'B' depends on the module 'A' represented by this ModuleSpecification, then module 'B' will be added with all "local dependencies" that are applicable for module "A"). Else returns false.
      Returns:
      true if local dependencies should be made transitive
      See Also:
    • setLocalDependenciesTransitive

      public void setLocalDependenciesTransitive(boolean localDependenciesTransitive)
      Sets whether the local dependencies applicable for this ModuleSpecification are to be treated as transitive dependencies for modules which depend on the module represented by this ModuleSpecification
      Parameters:
      localDependenciesTransitive - true if the getLocalDependenciesSet() added for this ModuleSpecification should be made transitive (i.e. if any other module 'B' depends on the module 'A' represented by this ModuleSpecification, then module 'B' will be added with all "local dependencies" that are applicable for module "A"). False otherwise
      See Also:
    • isLocalLast

      public boolean isLocalLast()
    • setLocalLast

      public void setLocalLast(boolean localLast)
    • addAlias

      @Deprecated(forRemoval=true) public void addAlias(org.jboss.modules.ModuleIdentifier moduleIdentifier)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Record that another module is an alias for this module.
      Parameters:
      moduleIdentifier - the identifier of the alias module. Cannot be null
    • addModuleAlias

      public void addModuleAlias(String moduleIdentifier)
      Record that another module is an alias for this module.
      Parameters:
      moduleIdentifier - the identifier of the alias module. Cannot be null
    • addAliases

      @Deprecated(forRemoval=true) public void addAliases(Collection<org.jboss.modules.ModuleIdentifier> moduleIdentifiers)
      Deprecated, for removal: This API element is subject to removal in a future version.
      iterate over the identifiers and call addModuleAlias(String)
      Record that a collection of other modules are aliases for this module.
      Parameters:
      moduleIdentifiers - the identifiers of the alias modules. Cannot be null
    • getAliases

      @Deprecated(forRemoval=true) public List<org.jboss.modules.ModuleIdentifier> getAliases()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the identifiers of modules that are aliases for this module.
      Returns:
      the identifiers. Will not return null
    • getModuleAliases

      public Set<String> getModuleAliases()
      Gets the names of modules that are aliases for this module.
      Returns:
      the names. Will not return null
    • getAllDependencies

      public List<ModuleDependency> getAllDependencies()
    • addModuleSystemDependencies

      public void addModuleSystemDependencies(List<org.jboss.modules.DependencySpec> systemDependencies)
    • getModuleSystemDependencies

      public List<org.jboss.modules.DependencySpec> getModuleSystemDependencies()
    • addPermissionFactory

      public void addPermissionFactory(org.jboss.modules.security.PermissionFactory permissionFactory)
      Add a permission factory to this deployment. This may include permissions not explicitly specified in the domain configuration; such permissions must be validated before being added.
      Parameters:
      permissionFactory - the permission factory to add
    • getPermissionFactories

      public List<org.jboss.modules.security.PermissionFactory> getPermissionFactories()
      Get the permission factory set for this deployment. This may include permissions not explicitly specified in the domain configuration; such permissions must be validated before being added.
      Returns:
      the permission factory set for this deployment
    • getNonexistentExcludedDependencies

      @Deprecated(forRemoval=true) public Set<org.jboss.modules.ModuleIdentifier> getNonexistentExcludedDependencies()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the identifiers of dependencies that were meant to be excluded but which were never recorded as a dependency.
      Returns:
      the names. Will not return null
    • getFictitiousExcludedDependencies

      public Set<String> getFictitiousExcludedDependencies()
      Gets the names of dependencies that were meant to be excluded but which were never recorded as a dependency.
      Returns:
      the names. Will not return null