public abstract class IncrementalDeployment extends Object
deploy
and redeploy
during
directory-based deployment. The calling sequence is as following:
Initially, j2eeserver will call getDirectoryForNewApplication()
to request destination directory to deliver the being deployed application or
stand-alone module. In case of J2EE applications, getDirectoryForNewModule()
will be called for each child module.
After done with copying of files over to the destination, initialDeploy()
will
be called to signal the copying is done. Processing of the returned ProgressObject
is the same as in DeploymentManager.distribute()
call.
Subsequent deployments are incremental. For each root and child module the IDE will ask plugin
for destination directory by calling getDirectoryForModule()
. After delivering
the changed files for all modules, the IDE then call incrementalDeploy
with
the description of what have changed since previous deployment.
For in-place file deployment, where the file copying step is skipped, method
getDirectoryForNewApplication
or getDirectoryForNewModule
calls
return null.
J2eeserver optain an instance of IncrementalDeployment from server integration plugin by
calling OptionalDeploymentManagerFactory
to optain an instance of IncrementalDeployment
for each DeploymentManager
instance.
Constructor and Description |
---|
IncrementalDeployment() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
canFileDeploy(javax.enterprise.deploy.spi.Target target,
J2eeModule deployable)
Whether the deployable object could be file deployed to the specified target
|
javax.enterprise.deploy.spi.status.ProgressObject |
deployOnSave(javax.enterprise.deploy.spi.TargetModuleID module,
DeploymentChangeDescriptor desc)
Performs reload of the artifacts when the deploy on save is requested.
|
abstract File |
getDirectoryForModule(javax.enterprise.deploy.spi.TargetModuleID module)
Return absolute path to which the IDE will write the content changes of specified module.
|
File |
getDirectoryForNewApplication(String deploymentName,
javax.enterprise.deploy.spi.Target target,
ModuleConfiguration configuration)
Return absolute path the IDE will write the app or stand-alone module content to.
|
abstract File |
getDirectoryForNewApplication(javax.enterprise.deploy.spi.Target target,
J2eeModule app,
ModuleConfiguration configuration)
Return absolute path which the IDE will write the specified app or
stand-alone module content to.
|
abstract File |
getDirectoryForNewModule(File appDir,
String uri,
J2eeModule module,
ModuleConfiguration configuration)
Return absolute path to which the IDE will write the specified module content.
|
static IncrementalDeployment |
getIncrementalDeploymentForModule(IncrementalDeployment incremental,
J2eeModule deployable) |
String |
getModuleUrl(javax.enterprise.deploy.spi.TargetModuleID module)
Get the URI pointing to location of child module inside a application archive.
|
abstract javax.enterprise.deploy.spi.status.ProgressObject |
incrementalDeploy(javax.enterprise.deploy.spi.TargetModuleID module,
AppChangeDescriptor changes)
Before this method is called, the on-disk representation of TargetModuleID
is updated.
|
abstract javax.enterprise.deploy.spi.status.ProgressObject |
initialDeploy(javax.enterprise.deploy.spi.Target target,
J2eeModule app,
ModuleConfiguration configuration,
File dir)
First time deployment file distribution.
|
boolean |
isDeployOnSaveSupported()
Returns
true if deploy on save is supported, false
otherwise. |
void |
notifyDeployment(javax.enterprise.deploy.spi.TargetModuleID module)
Inform the plugin that the specified module is being deployed.
|
public abstract javax.enterprise.deploy.spi.status.ProgressObject initialDeploy(javax.enterprise.deploy.spi.Target target, J2eeModule app, ModuleConfiguration configuration, File dir)
target
- target of deploymentapp
- the app to deployconfiguration
- server specific data for deploymentdir
- the destination directory for the given deploy apppublic abstract javax.enterprise.deploy.spi.status.ProgressObject incrementalDeploy(javax.enterprise.deploy.spi.TargetModuleID module, AppChangeDescriptor changes)
module
- the TargetModuleID of the deployed application or stand-alone module.changes
- AppChangeDescriptor describing what in the application changed.public abstract boolean canFileDeploy(javax.enterprise.deploy.spi.Target target, J2eeModule deployable)
target
- target in questiondeployable
- the deployable object in question@CheckForNull public abstract File getDirectoryForNewApplication(javax.enterprise.deploy.spi.Target target, J2eeModule app, ModuleConfiguration configuration)
target
- target server of the deploymentapp
- the app or stand-alone module to deployconfiguration
- server specific data for deployment@CheckForNull public File getDirectoryForNewApplication(String deploymentName, javax.enterprise.deploy.spi.Target target, ModuleConfiguration configuration)
deploymentName
- name to use in deploymenttarget
- target server of the deploymentconfiguration
- server specific data for deploymentpublic abstract File getDirectoryForNewModule(File appDir, String uri, J2eeModule module, ModuleConfiguration configuration)
appDir
- the root directory of containing applicationuri
- the URI of child module within the appmodule
- the child module object to deployconfiguration
- server specific data for deploymentpublic abstract File getDirectoryForModule(javax.enterprise.deploy.spi.TargetModuleID module)
module
- id for the target module.public String getModuleUrl(javax.enterprise.deploy.spi.TargetModuleID module)
module
- TargetModuleID of the child moduleJ2eeModule.getUrl()
public void notifyDeployment(javax.enterprise.deploy.spi.TargetModuleID module)
module
- module which is being deployed.public boolean isDeployOnSaveSupported()
true
if deploy on save is supported, false
otherwise. If this method returns true
IncrementalDeployment.deployOnSave(javax.enterprise.deploy.spi.TargetModuleID, org.netbeans.modules.j2ee.deployment.plugins.api.DeploymentChangeDescriptor)
must provide (reasonably fast) redeploy functionality.true
if deploy on save is supportedpublic javax.enterprise.deploy.spi.status.ProgressObject deployOnSave(javax.enterprise.deploy.spi.TargetModuleID module, DeploymentChangeDescriptor desc)
module
- module owning the artifactsdesc
- description of changespublic static IncrementalDeployment getIncrementalDeploymentForModule(IncrementalDeployment incremental, J2eeModule deployable) throws IOException
IOException