public interface DeploymentDescriptor
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getApplicationName() |
The application name.
|
java.lang.String |
getDescription() |
The application description.
|
java.lang.String |
getDisplayName() |
The application display name.
|
java.lang.String |
getFileName() |
The name of the descriptor file, typically "application.xml"
|
java.lang.Boolean |
getInitializeInOrder() |
Whether to initialize modules in the order they appear in the descriptor, with the exception of client modules.
|
java.lang.String |
getLibraryDirectory() |
The name of the directory to look for libraries in.
|
java.util.Set<EarModule> |
getModules() |
List of module descriptors.
|
java.util.Map<java.lang.String,java.lang.String> |
getModuleTypeMappings() |
Mapping of module paths to module types.
|
java.util.Set<EarSecurityRole> |
getSecurityRoles() |
List of security roles.
|
java.lang.String |
getVersion() |
The version of application.xml.
|
DeploymentDescriptor |
module(java.lang.String path,
java.lang.String type) |
Add a module to the deployment descriptor.
|
DeploymentDescriptor |
module(EarModule module,
java.lang.String type) |
Add a module to the deployment descriptor.
|
DeploymentDescriptor |
readFrom(java.io.Reader reader) |
Reads the deployment descriptor from a reader.
|
boolean |
readFrom(java.lang.Object path) |
Reads the deployment descriptor from a file.
|
DeploymentDescriptor |
securityRole(java.lang.String role) |
Add a security role to the deployment descriptor.
|
DeploymentDescriptor |
securityRole(Action<? super EarSecurityRole> action) |
Add a security role to the deployment descriptor after configuring it with the given action.
|
DeploymentDescriptor |
securityRole(EarSecurityRole role) |
Add a security role to the deployment descriptor.
|
void |
setApplicationName(java.lang.String applicationName) |
|
void |
setDescription(java.lang.String description) |
|
void |
setDisplayName(java.lang.String displayName) |
|
void |
setFileName(java.lang.String fileName) |
|
void |
setInitializeInOrder(java.lang.Boolean initializeInOrder) |
|
void |
setLibraryDirectory(java.lang.String libraryDirectory) |
|
void |
setModules(java.util.Set<EarModule> modules) |
|
void |
setModuleTypeMappings(java.util.Map<java.lang.String,java.lang.String> moduleTypeMappings) |
|
void |
setSecurityRoles(java.util.Set<EarSecurityRole> securityRoles) |
|
void |
setVersion(java.lang.String version) |
|
DeploymentDescriptor |
webModule(java.lang.String path,
java.lang.String contextRoot) |
Add a web module to the deployment descriptor.
|
DeploymentDescriptor |
withXml(Closure closure) |
Adds a closure to be called when the XML document has been created.
|
DeploymentDescriptor |
withXml(Action<? super XmlProvider> action) |
Adds an action to be called when the XML document has been created.
|
DeploymentDescriptor |
writeTo(java.io.Writer writer) |
Writes the deployment descriptor into a writer.
|
DeploymentDescriptor |
writeTo(java.lang.Object path) |
Writes the deployment descriptor into a file.
|
java.lang.String getFileName()
void setFileName(java.lang.String fileName)
java.lang.String getVersion()
void setVersion(java.lang.String version)
java.lang.String getApplicationName()
void setApplicationName(java.lang.String applicationName)
java.lang.Boolean getInitializeInOrder()
void setInitializeInOrder(java.lang.Boolean initializeInOrder)
java.lang.String getDescription()
void setDescription(java.lang.String description)
java.lang.String getDisplayName()
void setDisplayName(java.lang.String displayName)
java.lang.String getLibraryDirectory()
Ear.getLibDirName()
is used.
Typically, this should be set via EarPluginConvention.setLibDirName(String)
instead of this property
when using the ear
plugin.void setLibraryDirectory(java.lang.String libraryDirectory)
java.util.Set<EarModule> getModules()
true
.void setModules(java.util.Set<EarModule> modules)
DeploymentDescriptor module(EarModule module, java.lang.String type)
module
- The module to add.type
- The type of the module, such as "ejb", "java", etc.DeploymentDescriptor module(java.lang.String path, java.lang.String type)
path
- The path of the module to add.type
- The type of the module, such as "ejb", "java", etc.DeploymentDescriptor webModule(java.lang.String path, java.lang.String contextRoot)
path
- The path of the module to add.contextRoot
- The context root type of the web module.java.util.Set<EarSecurityRole> getSecurityRoles()
void setSecurityRoles(java.util.Set<EarSecurityRole> securityRoles)
DeploymentDescriptor securityRole(EarSecurityRole role)
role
- The security role to add.DeploymentDescriptor securityRole(java.lang.String role)
role
- The name of the security role to add.DeploymentDescriptor securityRole(Action<? super EarSecurityRole> action)
action
- an action to configure the security rolejava.util.Map<java.lang.String,java.lang.String> getModuleTypeMappings()
moduleTypeMappings["myJavaModule.jar"] = "java"
.void setModuleTypeMappings(java.util.Map<java.lang.String,java.lang.String> moduleTypeMappings)
DeploymentDescriptor withXml(@DelegatesTo(XmlProvider.class) Closure closure)
Node
. The closure can modify the XML before it is written to the
output file. This allows additional JavaEE version 6 elements like "data-source" or "resource-ref" to be
included.closure
- The closure to execute when the XML has been createdDeploymentDescriptor withXml(Action<? super XmlProvider> action)
Node
. The action can modify the XML before it is written to the output
file. This allows additional JavaEE version 6 elements like "data-source" or "resource-ref" to be included.action
- The action to execute when the XML has been createdDeploymentDescriptor readFrom(java.io.Reader reader)
reader
- The reader to read the deployment descriptor fromboolean readFrom(java.lang.Object path)
Project.file(Object)
path
- The path of the file to read the deployment descriptor fromDeploymentDescriptor writeTo(java.io.Writer writer)
writer
- The writer to write the deployment descriptor toDeploymentDescriptor writeTo(java.lang.Object path)
Project.file(Object)
path
- The path of the file to write the deployment descriptor into.