|
Administration Tools | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.topcased.service.updatesiteproject.FilesTreatment
public class FilesTreatment
This class groups some files treatments. They are used in the diffrent WizardPages
| Field Summary | |
|---|---|
static int |
FEATURE_PROPERTIES
Define the file type as feature.properties |
static int |
FEATURE_XML
Define the file type as feature.xml |
static int |
PLUGIN_PROPERTIES
Define the file type as plugin.properties |
static int |
PLUGIN_XML
Define the file type as plugin.xml |
| Constructor Summary | |
|---|---|
FilesTreatment()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
analyzeString(java.lang.String property,
java.io.File pathFileProperty)
Analyze String. |
static void |
autoState(SourceDestination srcDst,
int typeFile)
Give automaticaly the state of the file taking its source and destination |
static boolean |
copyFileFromFTP(java.lang.String parentPath,
java.lang.String pathDestination,
org.eclipse.ftp.IDirectoryEntry file,
org.eclipse.ftp.internal.FTPClient clientFTP,
org.eclipse.core.runtime.IProgressMonitor monitor)
|
static boolean |
copyPluginFeatureFromFTP(java.lang.String parentPath,
java.lang.String pathDestination,
org.eclipse.ftp.IDirectoryEntry file,
org.eclipse.ftp.internal.FTPClient clientFTP,
org.eclipse.core.runtime.IProgressMonitor monitor)
Copy the given file into the pathDestination, from a FTP server to local destination |
static void |
copyPluginFeatureFromSFTP(SftpFile file,
java.lang.String pathDest,
SftpClient clientSFTP)
CreateSiteUpdateSiteWizardTreatment |
static java.io.File |
createTempFileFromJar(java.io.File pathFile,
java.lang.String tempName,
int fileType)
Create 'tempName' file XML/properties which is the 'feature.xml'/'plugin.xml'/'feature.properties'/'plugin.properties' from the jarFile(pathFile) |
static boolean |
emptyFile(java.io.File file)
Empty the given file or directory. |
static void |
emptyFilesFromMap(java.util.Map map)
Empty all files referenced by the given map Not empty the files which are still installed |
static void |
emptyFilesFTPFromMap(org.eclipse.ftp.internal.FTPClient clientFTP,
java.util.Map map,
java.lang.String path)
Empty all files referenced by the given map Not empty the files which are still installed |
static long |
getFileLength(java.io.File file)
|
static long |
getFileLengthFTP(org.eclipse.ftp.internal.FTPClient clientFTP,
org.eclipse.ftp.IDirectoryEntry file,
java.lang.String path)
|
static long |
getFileLengthSSH(SftpFile file,
SftpClient clientSFTP)
|
static java.lang.String |
getFileWithVersionFromNoVersion(java.lang.String path)
Search a file with the same name and an other version ( like name_X.Y.Z) and return the path of this file |
static boolean |
isFileExists(java.lang.String path)
Search if the file exists at the path given in parameter |
static boolean |
isFileExistsWithoutVersion(java.lang.String path)
Search if the given file exists without any special version |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int FEATURE_XML
public static final int PLUGIN_XML
public static final int FEATURE_PROPERTIES
public static final int PLUGIN_PROPERTIES
| Constructor Detail |
|---|
public FilesTreatment()
| Method Detail |
|---|
public static java.io.File createTempFileFromJar(java.io.File pathFile,
java.lang.String tempName,
int fileType)
throws java.io.FileNotFoundException,
java.io.IOException
pathFile - : jarFiletempName - : name of the temporaty
'feature.xml'/'plugin.xml'/'feature.properties'/'plugin.properties'fileType - : identify the type of file which must be read :
FEATURE_XML/PLUGIN_XML/FEATURE_PROPERTIES/PLUGIN_PROPERTIES
java.io.IOException
java.io.FileNotFoundException
public static void autoState(SourceDestination srcDst,
int typeFile)
srcDst - the SourceDestination of the filetypeFile - the type of the file : plugin or feature (not used)public static boolean isFileExists(java.lang.String path)
path - of the file (directory or jar file)
public static java.lang.String analyzeString(java.lang.String property,
java.io.File pathFileProperty)
throws java.io.IOException
property - pathFileProperty -
java.io.IOExceptionpublic static boolean isFileExistsWithoutVersion(java.lang.String path)
path - of the file
public static java.lang.String getFileWithVersionFromNoVersion(java.lang.String path)
path - of the file with or without version (name or name_X.Y.Z)
public static boolean copyFileFromFTP(java.lang.String parentPath,
java.lang.String pathDestination,
org.eclipse.ftp.IDirectoryEntry file,
org.eclipse.ftp.internal.FTPClient clientFTP,
org.eclipse.core.runtime.IProgressMonitor monitor)
parentPath - pathDestination - file - clientFTP - monitor -
public static boolean copyPluginFeatureFromFTP(java.lang.String parentPath,
java.lang.String pathDestination,
org.eclipse.ftp.IDirectoryEntry file,
org.eclipse.ftp.internal.FTPClient clientFTP,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.ftp.FtpException,
java.io.IOException
parentPath - of the filepathDestination - the destination pathfile - the specified fileclientFTP - to remote FTP servermonitor - the progress monitor or null
org.eclipse.ftp.FtpException
java.io.IOExceptionpublic static boolean emptyFile(java.io.File file)
file - the specified file or directory
public static void copyPluginFeatureFromSFTP(SftpFile file,
java.lang.String pathDest,
SftpClient clientSFTP)
throws java.io.IOException
file - pathDest - clientSFTP -
java.io.IOExceptionpublic static void emptyFilesFromMap(java.util.Map map)
map - containing SourceDestination with the stat attribut initialized
public static void emptyFilesFTPFromMap(org.eclipse.ftp.internal.FTPClient clientFTP,
java.util.Map map,
java.lang.String path)
map - containing SourceDestination with the stat attribut initializedpublic static long getFileLength(java.io.File file)
public static long getFileLengthFTP(org.eclipse.ftp.internal.FTPClient clientFTP,
org.eclipse.ftp.IDirectoryEntry file,
java.lang.String path)
public static long getFileLengthSSH(SftpFile file,
SftpClient clientSFTP)
|
Administration Tools | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.