com.jalios.jcms.tools.patch
Class WarInfo

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

public class WarInfo
extends java.lang.Object

Helper class to read informations about a JCMS war file or JCMS webapp.


Field Summary
static java.lang.String REVISION
           
 
Constructor Summary
WarInfo(java.io.File warFile)
          Create a new WarInfo from the specified warFile.
 
Method Summary
 void cleanup()
          Cleanup any temporary file from the file system
protected  void finalize()
           
 java.lang.String getOriginalSignature(java.lang.String relativeFilePath)
          Retrieve the original signature of the specified file as available in the signature.xml file of this webapp.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

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

WarInfo

public WarInfo(java.io.File warFile)
        throws java.lang.Exception
Create a new WarInfo from the specified warFile.

If the specified warFile 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:
warFile - a jcms war File or a path to a JCMS webapp directory
Throws:
java.lang.Exception - if the specified file could not be unzipped or if it is not a JCMS webapp.
Method Detail

getOriginalSignature

public java.lang.String getOriginalSignature(java.lang.String relativeFilePath)
Retrieve the original signature of the specified file as available in the signature.xml file of this webapp.

Parameters:
relativeFilePath - a relative path eg types/Article/doArticleFullDisplay.jsp
Returns:
a signature, or null if could not be found

cleanup

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


finalize

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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