public interface DeploymentDescriptor
Modifier and Type | Method and Description |
---|---|
String |
getApplicationName()
The application name.
|
String |
getDescription()
The application description.
|
String |
getDisplayName()
The application display name.
|
String |
getFileName()
The name of the descriptor file, typically "application.xml"
|
Boolean |
getInitializeInOrder()
Whether to initialize modules in the order they appear in the descriptor, with the exception of client modules.
|
String |
getLibraryDirectory()
The name of the directory to look for libraries in.
|
Set<? extends EarModule> |
getModules()
List of module descriptors.
|
Map<String,String> |
getModuleTypeMappings()
Mapping of module paths to module types.
|
Set<? extends EarSecurityRole> |
getSecurityRoles()
List of security roles.
|
String |
getVersion()
The version of application.xml.
|
DeploymentDescriptor |
module(EarModule module,
String type)
Add a module to the deployment descriptor.
|
DeploymentDescriptor |
module(String path,
String type)
Add a module to the deployment descriptor.
|
boolean |
readFrom(Object path)
Reads the deployment descriptor from a file.
|
DeploymentDescriptor |
readFrom(Reader reader)
Reads the deployment descriptor from a reader.
|
DeploymentDescriptor |
securityRole(EarSecurityRole role)
Add a security role to the deployment descriptor.
|
DeploymentDescriptor |
securityRole(String role)
Add a security role to the deployment descriptor.
|
void |
setApplicationName(String applicationName) |
void |
setDescription(String description) |
void |
setDisplayName(String displayName) |
void |
setFileName(String fileName) |
void |
setInitializeInOrder(Boolean initializeInOrder) |
void |
setLibraryDirectory(String libraryDirectory) |
void |
setModules(Set<? extends EarModule> modules) |
void |
setModuleTypeMappings(Map<String,String> moduleTypeMappings) |
void |
setSecurityRoles(Set<? extends EarSecurityRole> securityRoles) |
void |
setVersion(String version) |
DeploymentDescriptor |
webModule(String path,
String contextRoot)
Add a web module to the deployment descriptor.
|
DeploymentDescriptor |
withXml(Action<? super XmlProvider> action)
Adds an action to be called when the XML document has been created.
|
DeploymentDescriptor |
withXml(Closure closure)
Adds a closure to be called when the XML document has been created.
|
DeploymentDescriptor |
writeTo(Object path)
Writes the deployment descriptor into a file.
|
DeploymentDescriptor |
writeTo(Writer writer)
Writes the deployment descriptor into a writer.
|
String getFileName()
void setFileName(String fileName)
String getVersion()
void setVersion(String version)
String getApplicationName()
void setApplicationName(String applicationName)
Boolean getInitializeInOrder()
void setInitializeInOrder(Boolean initializeInOrder)
String getDescription()
void setDescription(String description)
String getDisplayName()
void setDisplayName(String displayName)
String getLibraryDirectory()
EarPluginConvention.setLibDirName(String)
instead of this property.void setLibraryDirectory(String libraryDirectory)
Set<? extends EarModule> getModules()
true
.DeploymentDescriptor module(EarModule module, String type)
module
- The module to add.type
- The type of the module, such as "ejb", "java", etc.DeploymentDescriptor module(String path, String type)
path
- The path of the module to add.type
- The type of the module, such as "ejb", "java", etc.DeploymentDescriptor webModule(String path, String contextRoot)
path
- The path of the module to add.contextRoot
- The context root type of the web module.Set<? extends EarSecurityRole> getSecurityRoles()
void setSecurityRoles(Set<? extends EarSecurityRole> securityRoles)
DeploymentDescriptor securityRole(EarSecurityRole role)
role
- The security role to add.DeploymentDescriptor securityRole(String role)
role
- The name of the security role to add.Map<String,String> getModuleTypeMappings()
moduleTypeMappings["myJavaModule.jar"] = "java"
.DeploymentDescriptor withXml(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(Reader reader)
reader
- The reader to read the deployment descriptor fromboolean readFrom(Object path)
Project.file(Object)
path
- The path of the file to read the deployment descriptor fromDeploymentDescriptor writeTo(Writer writer)
writer
- The writer to write the deployment descriptor toDeploymentDescriptor writeTo(Object path)
Project.file(Object)
path
- The path of the file to write the deployment descriptor into.