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 Summary
Constructors Constructor Description ModuleSpecification()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddAlias(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>getAliases()Deprecated, for removal: This API element is subject to removal in a future version.List<ModuleDependency>getAllDependencies()List<String>getClassTransformers()Set<String>getFictitiousExcludedDependencies()Gets the names of dependencies thatwere meant to be excludedbut which were never recorded as a dependency.Set<ModuleDependency>getLocalDependenciesSet()Local dependencies are dependencies on other parts of the deployment, such as a class-path entrySet<String>getModuleAliases()Gets the names of modules that are aliases for this module.List<org.jboss.modules.DependencySpec>getModuleSystemDependencies()Set<org.jboss.modules.ModuleIdentifier>getNonexistentExcludedDependencies()Deprecated, for removal: This API element is subject to removal in a future version.List<org.jboss.modules.security.PermissionFactory>getPermissionFactories()Get the permission factory set for this deployment.List<org.jboss.modules.ResourceLoaderSpec>getResourceLoaders()Set<ModuleDependency>getSystemDependenciesSet()System dependencies are dependencies that are added automatically by the container.Set<ModuleDependency>getUserDependenciesSet()User dependencies are dependencies that the user has specifically added, either via jboss-deployment-structure.xml or via the manifest.booleanisExclusionsCascadedToSubDeployments()booleanisLocalDependenciesTransitive()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").booleanisLocalLast()booleanisPrivateModule()booleanisPublicModule()booleanisSubDeploymentModulesIsolated()voidremoveUserDependencies(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
-
-
-
-
Method Detail
-
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 benull.
-
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 benull
-
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 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
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)
-
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:
getLocalDependenciesSet()
-
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:
getLocalDependenciesSet()
-
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
public void addModuleAlias(String moduleIdentifier)
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(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 thatwere meant to be excludedbut which were never recorded as a dependency.- Returns:
- the names. Will not return
null
-
getFictitiousExcludedDependencies
public Set<String> 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
-
-