Class AutoDeploymentOperation
- java.lang.Object
-
- org.glassfish.deployment.autodeploy.AutoOperation
-
- org.glassfish.deployment.autodeploy.AutoDeploymentOperation
-
@Service @PerLookup public class AutoDeploymentOperation extends AutoOperation
Performs a single auto-deployment operation for a single file.Note - Use the newInstance static method to obtain a fully-injected operation; it is safer and more convenient than using the no-arg constructor and then invoking init yourself.
- Author:
- tjquinn
-
-
Field Summary
Fields Modifier and Type Field Description static Logger
deplLogger
-
Constructor Summary
Constructors Constructor Description AutoDeploymentOperation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getMessageString(AutoDeployer.AutodeploymentStatus ds, File file)
Returns the appropriate message string for the given operation and the outcome.protected AutoDeploymentOperation
init(boolean writeMarkOnDeployed, File file, boolean enabled, String virtualServer, boolean forceDeploy, boolean verify, boolean preJspCompilation, String target, String contextRoot)
Completes the initialization of the object.protected void
markFiles(AutoDeployer.AutodeploymentStatus ds, File file)
Marks the files relevant to the specified file appropriately given the outcome of the command as given in the status.static AutoDeploymentOperation
newInstance(org.glassfish.hk2.api.ServiceLocator serviceLocator, File file, String virtualServer, String target, String contextRoot)
Creates a fully-injected, ready-to-use AutoDeploymentOperation object.-
Methods inherited from class org.glassfish.deployment.autodeploy.AutoOperation
deleteAllMarks, getDeployedFile, getDeployFailedFile, getUndeployedFile, getUndeployFailedFile, run
-
-
-
-
Field Detail
-
deplLogger
public static final Logger deplLogger
-
-
Method Detail
-
newInstance
public static AutoDeploymentOperation newInstance(org.glassfish.hk2.api.ServiceLocator serviceLocator, File file, String virtualServer, String target, String contextRoot)
Creates a fully-injected, ready-to-use AutoDeploymentOperation object.- Parameters:
serviceLocator
-file
-virtualServer
-target
-- Returns:
- the injected, initialized AutoDeploymentOperation
-
init
protected AutoDeploymentOperation init(boolean writeMarkOnDeployed, File file, boolean enabled, String virtualServer, boolean forceDeploy, boolean verify, boolean preJspCompilation, String target, String contextRoot)
Completes the initialization of the object.- Parameters:
writeMarkOnDeployed
-file
-enabled
-virtualServer
-forceDeploy
-verify
-preJspCompilation
-target
-- Returns:
- the object itself for convenience
-
getMessageString
protected String getMessageString(AutoDeployer.AutodeploymentStatus ds, File file)
Returns the appropriate message string for the given operation and the outcome.- Specified by:
getMessageString
in classAutoOperation
- Parameters:
ds
- AutodeploymentStatus value giving the outcome of the operationfile
- file of interest- Returns:
- message string to be logged
-
markFiles
protected void markFiles(AutoDeployer.AutodeploymentStatus ds, File file)
Marks the files relevant to the specified file appropriately given the outcome of the command as given in the status.- Specified by:
markFiles
in classAutoOperation
- Parameters:
ds
- AutodeploymentStatus indicating the outcome of the operationfile
- file of interest
-
-