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
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlias(org.jboss.modules.ModuleIdentifier moduleIdentifier) Deprecated, for removal: This API element is subject to removal in a future version.voidaddAliases(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 calladdModuleAlias(String)voidaddClassTransformer(String classTransformer) voidaddExclusion(org.jboss.modules.ModuleIdentifier exclusion) Deprecated, for removal: This API element is subject to removal in a future version.voidaddExclusions(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 calladdModuleExclusion(String)voidaddLocalDependencies(Collection<ModuleDependency> dependencies) voidaddLocalDependency(ModuleDependency dependency) voidaddModuleAlias(String moduleIdentifier) Record that another module is an alias for this module.voidaddModuleExclusion(String exclusion) Records that a module with the given name should be excluded from use as a system or local dependency.voidaddModuleSystemDependencies(List<org.jboss.modules.DependencySpec> systemDependencies) voidaddPermissionFactory(org.jboss.modules.security.PermissionFactory permissionFactory) Add a permission factory to this deployment.voidaddResourceLoader(org.jboss.modules.ResourceLoaderSpec resourceLoader) voidaddSystemDependencies(Collection<ModuleDependency> dependencies) voidaddSystemDependency(ModuleDependency dependency) voidaddUserDependencies(Collection<ModuleDependency> dependencies) voidaddUserDependency(ModuleDependency dependency) List<org.jboss.modules.ModuleIdentifier>Deprecated, for removal: This API element is subject to removal in a future version.Gets the names of dependencies thatwere meant to be excludedbut which were never recorded as a dependency.Local dependencies are dependencies on other parts of the deployment, such as a class-path entryGets the names of modules that are aliases for this module.List<org.jboss.modules.DependencySpec>Set<org.jboss.modules.ModuleIdentifier>Deprecated, for removal: This API element is subject to removal in a future version.List<org.jboss.modules.security.PermissionFactory>Get the permission factory set for this deployment.List<org.jboss.modules.ResourceLoaderSpec>System dependencies are dependencies that are added automatically by the container.User dependencies are dependencies that the user has specifically added, either via jboss-deployment-structure.xml or via the manifest.booleanbooleanReturns true if thelocal dependenciesadded for thisModuleSpecificationshould be made transitive (i.e. if any other module 'B' depends on the module 'A' represented by thisModuleSpecification, then module 'B' will be added with all "local dependencies" that are applicable for module "A").booleanbooleanbooleanbooleanvoidremoveUserDependencies(Predicate<ModuleDependency> predicate) Remove user dependencies that match the predicate.voidsetExclusionsCascadedToSubDeployments(boolean exclusionsCascadedToSubDeployments) voidsetLocalDependenciesTransitive(boolean localDependenciesTransitive) Sets whether thelocal dependenciesapplicable for thisModuleSpecificationare to be treated as transitive dependencies for modules which depend on the module represented by thisModuleSpecificationvoidsetLocalLast(boolean localLast) voidsetPrivateModule(boolean privateModule) voidsetPublicModule(boolean publicModule) voidsetSubDeploymentModulesIsolated(boolean subDeploymentModulesIsolated) Methods inherited from class org.jboss.as.server.deployment.SimpleAttachable
addToAttachmentList, attachmentKeys, getAttachment, getAttachmentList, hasAttachment, putAttachment, removeAttachment
-
Constructor Details
-
ModuleSpecification
public ModuleSpecification()
-
-
Method Details
-
addSystemDependency
-
addSystemDependencies
-
addUserDependency
-
addUserDependencies
-
removeUserDependencies
Remove user dependencies that match the predicate.- Parameters:
predicate- test for whether a dependency should be removed. Cannot benull.
-
addLocalDependency
-
addLocalDependencies
-
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, 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 benull
-
addModuleExclusion
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 benull
-
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 calladdModuleExclusion(String)Records a collection of modules as beingexcluded.- Parameters:
exclusions- the identifiers of the modules to exclude. Cannot benull
-
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
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
-
addClassTransformer
-
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 thelocal dependenciesadded for thisModuleSpecificationshould be made transitive (i.e. if any other module 'B' depends on the module 'A' represented by thisModuleSpecification, then module 'B' will be added with all "local dependencies" that are applicable for module "A"). Else returns false.- Returns:
trueif local dependencies should be made transitive- See Also:
-
setLocalDependenciesTransitive
public void setLocalDependenciesTransitive(boolean localDependenciesTransitive) Sets whether thelocal dependenciesapplicable for thisModuleSpecificationare to be treated as transitive dependencies for modules which depend on the module represented by thisModuleSpecification- Parameters:
localDependenciesTransitive-trueif thegetLocalDependenciesSet()added for thisModuleSpecificationshould be made transitive (i.e. if any other module 'B' depends on the module 'A' represented by thisModuleSpecification, 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 benull
-
addModuleAlias
Record that another module is an alias for this module.- Parameters:
moduleIdentifier- the identifier of the alias module. Cannot benull
-
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 calladdModuleAlias(String)Record that a collection of other modules are aliases for this module.- Parameters:
moduleIdentifiers- the identifiers of the alias modules. Cannot benull
-
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
Gets the names of modules that are aliases for this module.- Returns:
- the names. Will not return
null
-
getAllDependencies
-
addModuleSystemDependencies
-
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
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 thatwere meant to be excludedbut which were never recorded as a dependency.- Returns:
- the names. Will not return
null
-
getFictitiousExcludedDependencies
Gets the names of dependencies thatwere meant to be excludedbut which were never recorded as a dependency.- Returns:
- the names. Will not return
null
-
addModuleAlias(String)