com.jfw.update
Class JFWUpdate

java.lang.Object
  extended by com.jfw.update.JFWUpdate
Direct Known Subclasses:
ContainerUpdate, DBUpdate, GenericFileUpdate, ShellCmdUpdate, WEBUpdate

public abstract class JFWUpdate
extends java.lang.Object

The update classes extends this one.


Constructor Summary
JFWUpdate()
           
 
Method Summary
protected  void cleanWebWork(java.lang.String webWorkPath)
          Delete the work directory of the application server.
protected  void deleteFile(java.lang.String path, java.lang.String fileName)
          Delete a file.
protected  java.util.ArrayList getFiles()
          Return the names of the files present in the update directory.
protected  java.lang.String getGenericFilePath()
          Get value of key update_generic_file_path by jfw.properties.
protected  java.lang.String getUpdateSrcPath()
          Get value of key update_src_path by jfw.properties.
protected  java.lang.String getUpdateWebTargetPath()
          Get value of key update_web_target_path by jfw.properties.
protected  java.lang.String getWebappPath()
          Get value of key update_web_app by jfw.properties.
protected  java.lang.String getWebWorkPath()
          Get value of key update_web_work by jfw.properties.
abstract  boolean start()
          Must be implement by subclasses.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JFWUpdate

public JFWUpdate()
Method Detail

start

public abstract boolean start()
                       throws java.lang.Exception
Must be implement by subclasses. This is the only method called during update.

Throws:
java.lang.Exception

getUpdateSrcPath

protected java.lang.String getUpdateSrcPath()
Get value of key update_src_path by jfw.properties.

Returns:
value of key update_src_path by jfw.properties.

getUpdateWebTargetPath

protected java.lang.String getUpdateWebTargetPath()
Get value of key update_web_target_path by jfw.properties.

Returns:
value of key update_web_target_path by jfw.properties.

getWebappPath

protected java.lang.String getWebappPath()
Get value of key update_web_app by jfw.properties.

Returns:
value of key update_web_app by jfw.properties.

getWebWorkPath

protected java.lang.String getWebWorkPath()
Get value of key update_web_work by jfw.properties.

Returns:
value of key update_web_work by jfw.properties.

getGenericFilePath

protected java.lang.String getGenericFilePath()
Get value of key update_generic_file_path by jfw.properties.

Returns:
value of key update_generic_file_path by jfw.properties.

getFiles

protected java.util.ArrayList getFiles()
                                throws java.lang.Exception
Return the names of the files present in the update directory.

Returns:
the names of the files present in the update directory.
Throws:
java.lang.Exception

cleanWebWork

protected void cleanWebWork(java.lang.String webWorkPath)
Delete the work directory of the application server.

Parameters:
webWorkPath - the path of the work directory of the application server.

deleteFile

protected void deleteFile(java.lang.String path,
                          java.lang.String fileName)
Delete a file.

Parameters:
path - the path of the file to delete.
fileName - the name of the file to delete.