public interface DeploymentModuleFactory
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATA_KEY |
Modifier and Type | Method and Description |
---|---|
DeploymentModule |
create(java.lang.Class<?> elementClass, ModuleContext moduleContext)
Create a DeploymentModule, based on contents of Shell.
|
DeploymentModule create(java.lang.Class<?> elementClass, ModuleContext moduleContext) throws DeployException
If a Factory wants to inherit the default Jdeveloper behaviour, but modify some options in the DeploymentModule after its been created, it can itself create a DeploymentModule for the desired default, and then modify it before returning.
// This example shows a factory itself calling a factory to create // the default DeploymentModule for ArchiveProfile, and modifying it before // returning. final DeployShell shell = context.getDeployShell(); final DeploymentModuleFactory factory = DeployUtil.getDeploymentModuleFactory(shell); DeploymentModule default = factory.create( ArchiveProfile.class, context); default.setIncludeManifest( true ); return default;
Parameters:
elementClass
- the Class of the element being deployed, the actual element may be obtained by calling moduleContext.getDeployElement(). The class may differ from the element being deployed so a cast should not be attempted.
moduleContext
- the context in which the module should be createdDeployException
- if an error occurred while creating the module.