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)voidaddAliases(Collection<org.jboss.modules.ModuleIdentifier> moduleIdentifiers)voidaddClassTransformer(String classTransformer)voidaddExclusion(org.jboss.modules.ModuleIdentifier exclusion)voidaddExclusions(Iterable<org.jboss.modules.ModuleIdentifier> exclusions)voidaddLocalDependencies(Collection<ModuleDependency> dependencies)voidaddLocalDependency(ModuleDependency 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()List<ModuleDependency>getAllDependencies()List<String>getClassTransformers()List<ModuleDependency>getLocalDependencies()Deprecated, for removal: This API element is subject to removal in a future version.usegetLocalDependenciesSet()()}Set<ModuleDependency>getLocalDependenciesSet()Local dependencies are dependencies on other parts of the deployment, such as a class-path entryList<org.jboss.modules.DependencySpec>getModuleSystemDependencies()Collection<ModuleDependency>getMutableUserDependencies()Deprecated, for removal: This API element is subject to removal in a future version.Set<org.jboss.modules.ModuleIdentifier>getNonexistentExcludedDependencies()List<org.jboss.modules.security.PermissionFactory>getPermissionFactories()Get the permission factory set for this deployment.List<org.jboss.modules.ResourceLoaderSpec>getResourceLoaders()List<ModuleDependency>getSystemDependencies()Deprecated, for removal: This API element is subject to removal in a future version.Set<ModuleDependency>getSystemDependenciesSet()System dependencies are dependencies that are added automatically by the container.List<ModuleDependency>getUserDependencies()Deprecated, for removal: This API element is subject to removal in a future version.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.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)
-
getSystemDependencies
@Deprecated(forRemoval=true) public List<ModuleDependency> getSystemDependencies()
Deprecated, for removal: This API element is subject to removal in a future version.
-
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
public void addExclusion(org.jboss.modules.ModuleIdentifier exclusion)
-
addExclusions
public void addExclusions(Iterable<org.jboss.modules.ModuleIdentifier> exclusions)
-
getLocalDependencies
@Deprecated(forRemoval=true) public List<ModuleDependency> getLocalDependencies()
Deprecated, for removal: This API element is subject to removal in a future version.usegetLocalDependenciesSet()()}
-
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.
-
getUserDependencies
@Deprecated(forRemoval=true) public List<ModuleDependency> getUserDependencies()
Deprecated, for removal: This API element is subject to removal in a future version.
-
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.
-
getMutableUserDependencies
@Deprecated(forRemoval=true) public Collection<ModuleDependency> getMutableUserDependencies()
Deprecated, for removal: This API element is subject to removal in a future version.Gets a modifiable view of the user dependencies list.- Returns:
- The user dependencies
-
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
public void addAlias(org.jboss.modules.ModuleIdentifier moduleIdentifier)
-
addAliases
public void addAliases(Collection<org.jboss.modules.ModuleIdentifier> moduleIdentifiers)
-
getAliases
public List<org.jboss.modules.ModuleIdentifier> getAliases()
-
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
public Set<org.jboss.modules.ModuleIdentifier> getNonexistentExcludedDependencies()
-
-