JDEV_HOME_DIR, SYSTEM_DIR| Constructor and Description |
|---|
UserPropertiesMigrator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canMigrate(int category,
java.io.File sourceDir)
Determine whether a given category can be migrated from a given directory.
|
static void |
findAndCopy(java.nio.file.Path basePathFrom,
java.nio.file.Path basePathTo,
java.lang.String fileName)
Searches for the first possible folder/file based on fileName.
|
static void |
findAndCopy(java.nio.file.Path basePathFrom,
java.nio.file.Path basePathTo,
java.lang.String fileName,
java.lang.String fromContainChild,
java.lang.String allMustContainParent)
Searches for the first possible folder/file based on fileName, must contain child in source and destination.
|
java.lang.String |
getDescription(int category)
Get a one line description for a given migration category.
|
int[] |
getMigrationCategories()
Get an array of unique id values representing available categories to
migrate.
|
boolean |
isSelected(int category)
Determine whether a category has been flagged for migration.
|
java.lang.String[] |
migrate(java.io.File srcDir,
java.io.File dstDir)
Migrate all flagged categories, from a given source directory, to a given
destination directory.
|
void |
setSelected(int category,
boolean selected)
Flag a category as selected for migration.
|
public int[] getMigrationCategories()
MigratorgetMigrationCategories in interface Migratorpublic java.lang.String getDescription(int category)
MigratorgetDescription in interface Migratorpublic boolean canMigrate(int category,
java.io.File sourceDir)
MigratorcanMigrate in interface Migratorpublic void setSelected(int category,
boolean selected)
MigratorsetSelected in interface Migratorpublic boolean isSelected(int category)
MigratorisSelected in interface Migratorpublic java.lang.String[] migrate(java.io.File srcDir,
java.io.File dstDir)
Migratorpublic static void findAndCopy(java.nio.file.Path basePathFrom,
java.nio.file.Path basePathTo,
java.lang.String fileName)
basePathFrom - - path from where to search and copy file/folderbasePathTo - - path to where copy a filefileName - - file/folder namepublic static void findAndCopy(java.nio.file.Path basePathFrom,
java.nio.file.Path basePathTo,
java.lang.String fileName,
java.lang.String fromContainChild,
java.lang.String allMustContainParent)
basePathFrom - - path from where to search and copy file/folderbasePathTo - - path to where copy a filefileName - - file/folder namefromContainChild - - from path must contain file/folderallMustContainParent - - all paths must contain parent