|
Administration Tools | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.topcased.service.updatesite.FilesTreatment
public class FilesTreatment
This class groups some files treatments. They are used in the different 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 |
MANIFEST
Define the file type as MANIFEST.MF |
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)
Gives 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 void |
copyFileToFTP(java.lang.String pathFile,
java.lang.String pathDest,
org.eclipse.ftp.internal.FTPClient clientFTP)
Copy the given file into the remote FTP server |
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 If the file is a directory, all the file which it contains are emptied |
static void |
emptyFileFTP(org.eclipse.ftp.internal.FTPClient clientFTP,
org.eclipse.ftp.internal.FTPDirectoryEntry file,
java.lang.String path)
Empty the given FTP file If the file is a directory, all the file which it contains are emptied |
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 void |
emptyFilesSSHFromMap(SftpClient clientSFTP,
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 file given 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
public static final int MANIFEST
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)
srcDst
- the SourceDestination of the filepublic 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.IOException
public 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.IOException
public static boolean emptyFile(java.io.File file)
file
- the specified filepublic static void emptyFileFTP(org.eclipse.ftp.internal.FTPClient clientFTP, org.eclipse.ftp.internal.FTPDirectoryEntry file, java.lang.String path)
clientFTP
- file
- path
- public static void copyFileToFTP(java.lang.String pathFile, java.lang.String pathDest, org.eclipse.ftp.internal.FTPClient clientFTP) throws org.eclipse.ftp.FtpException
pathFile
- the file path to copypathDest
- the destination of the fileclientFTP
- the client of the FTP server
org.eclipse.ftp.FtpException
public static void copyPluginFeatureFromSFTP(SftpFile file, java.lang.String pathDest, SftpClient clientSFTP) throws java.io.IOException
file
- pathDest
- clientSFTP
-
java.io.IOException
public static void emptyFilesFromMap(java.util.Map map)
map
- containing SourceDestination with the stat attribut initializedpublic 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 void emptyFilesSSHFromMap(SftpClient clientSFTP, 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.