Class AutoUndeploymentOperation
- java.lang.Object
-
- org.glassfish.deployment.autodeploy.AutoOperation
-
- org.glassfish.deployment.autodeploy.AutoUndeploymentOperation
-
@Service @PerLookup public class AutoUndeploymentOperation extends AutoOperation
Performs a single auto-undeploy 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 inherited from class org.glassfish.deployment.autodeploy.AutoOperation
deplLogger
-
-
Constructor Summary
Constructors Constructor Description AutoUndeploymentOperation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getMessageString(AutoDeployer.AutodeploymentStatus autodeploymentStatus, File file)
Returns the appropriate message string for the given operation and the outcome.protected AutoUndeploymentOperation
init(File appFile, String name, String target)
Completes the intialization of the object.protected void
markFiles(AutoDeployer.AutodeploymentStatus autodeploymentStatus, File file)
Marks the files relevant to the specified file appropriately given the outcome of the command as given in the status.static AutoUndeploymentOperation
newInstance(org.glassfish.hk2.api.ServiceLocator serviceLocator, File file, String name, String target)
Creates a new, injected, and initialized AutoUndeploymentOperation object.-
Methods inherited from class org.glassfish.deployment.autodeploy.AutoOperation
deleteAllMarks, getDeployedFile, getDeployFailedFile, getUndeployedFile, getUndeployFailedFile, run
-
-
-
-
Method Detail
-
newInstance
public static AutoUndeploymentOperation newInstance(org.glassfish.hk2.api.ServiceLocator serviceLocator, File file, String name, String target)
Creates a new, injected, and initialized AutoUndeploymentOperation object.- Parameters:
serviceLocator
-file
-name
-target
-- Returns:
- the AutoUndeploymentOperation object
-
init
protected AutoUndeploymentOperation init(File appFile, String name, String target)
Completes the intialization of the object.- Parameters:
appFile
-name
-target
-- Returns:
- the AutoUndeployOperation for convenience
-
getMessageString
protected String getMessageString(AutoDeployer.AutodeploymentStatus autodeploymentStatus, File file)
Returns the appropriate message string for the given operation and the outcome.- Specified by:
getMessageString
in classAutoOperation
- Parameters:
autodeploymentStatus
- AutodeploymentStatus value giving the outcome of the operationfile
- file of interest- Returns:
- message string to be logged
-
markFiles
protected void markFiles(AutoDeployer.AutodeploymentStatus autodeploymentStatus, 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:
autodeploymentStatus
- AutodeploymentStatus indicating the outcome of the operationfile
- file of interest
-
-