Package com.jalios.jcms.tools.patch
Class JumboPatchInfo
- java.lang.Object
-
- com.jalios.jcms.tools.patch.JumboPatchInfo
-
public class JumboPatchInfo extends java.lang.Object
Helper class to read informations about a JCMS jumbo patch.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REVISION
-
Constructor Summary
Constructors Constructor Description JumboPatchInfo(java.io.File patchFile)
Read a JumboPatchInfo from the specified patchFile.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canBeAppliedToWar(WarInfo warInfo)
Check if this JumboPatch can be applied to the specified Warvoid
cleanup()
Cleanup any temporary file from the file systemprotected void
finalize()
java.util.Date
getPatchDate()
java.util.Date
getSourceDate()
java.lang.String
getSourceName()
java.util.Date
getTargetDate()
java.lang.String
getTargetName()
static void
writeJumboPatchInformation(WarInfo war1, WarInfo war2, java.io.File patchDirectory)
-
-
-
Field Detail
-
REVISION
public static final java.lang.String REVISION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JumboPatchInfo
public JumboPatchInfo(java.io.File patchFile) throws java.lang.Exception
Read a JumboPatchInfo from the specified patchFile.If the specified patchFile is a file (vs a directory) it will immediately be unzipped in a temporary directory. You can later cleanup all temporary data using
cleanup()
- Parameters:
patchFile
- a jcms jumbo patch File or a path to a jumbo patch directory- Throws:
java.lang.Exception
- if the specified file could not be unzipped or if it is not a JCMS jumbo patch.
-
-
Method Detail
-
getPatchDate
public java.util.Date getPatchDate()
-
getSourceName
public java.lang.String getSourceName()
-
getSourceDate
public java.util.Date getSourceDate()
-
getTargetName
public java.lang.String getTargetName()
-
getTargetDate
public java.util.Date getTargetDate()
-
canBeAppliedToWar
public boolean canBeAppliedToWar(WarInfo warInfo)
Check if this JumboPatch can be applied to the specified War- Parameters:
warInfo
- a war information, must no be null- Returns:
- true if it can be applied, false otherwise.
-
writeJumboPatchInformation
public static void writeJumboPatchInformation(WarInfo war1, WarInfo war2, java.io.File patchDirectory) throws java.lang.Exception
- Throws:
java.lang.Exception
-
cleanup
public void cleanup()
Cleanup any temporary file from the file system
-
finalize
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
-