com.jalios.jcms.tools.patch
Class JumboPatchInfo

java.lang.Object
  extended by com.jalios.jcms.tools.patch.JumboPatchInfo

public class JumboPatchInfo
extends Object

Helper class to read informations about a JCMS jumbo patch.


Field Summary
static String REVISION
           
 
Constructor Summary
JumboPatchInfo(File patchFile)
          Read a JumboPatchInfo from the specified patchFile.
 
Method Summary
 boolean canBeAppliedToWar(WarInfo warInfo)
          Check if this JumboPatch can be applied to the specified War
 void cleanup()
          Cleanup any temporary file from the file system
protected  void finalize()
           
 Date getPatchDate()
           
 Date getSourceDate()
           
 String getSourceName()
           
 Date getTargetDate()
           
 String getTargetName()
           
static void writeJumboPatchInformation(WarInfo war1, WarInfo war2, File patchDirectory)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

JumboPatchInfo

public JumboPatchInfo(File patchFile)
               throws 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:
Exception - if the specified file could not be unzipped or if it is not a JCMS jumbo patch.
Method Detail

getPatchDate

public Date getPatchDate()

getSourceName

public String getSourceName()

getSourceDate

public Date getSourceDate()

getTargetName

public String getTargetName()

getTargetDate

public 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,
                                              File patchDirectory)
                                       throws Exception
Throws:
Exception

cleanup

public void cleanup()
Cleanup any temporary file from the file system


finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable


Copyright © 2001-2010 Jalios SA. All Rights Reserved.