Class EASyConfigFileImporter
- java.lang.Object
-
- net.ssehub.easy.producer.core.persistence.standard.EASyConfigFileImporter
-
public class EASyConfigFileImporter extends java.lang.ObjectCopies all EASy config files (of a predecessor project) from one folder to another while keeping sub folder hierarchy.
This is needed for imported variability models, build scripts, and templates.- Author:
- El-Sharkawy
-
-
Constructor Summary
Constructors Constructor Description EASyConfigFileImporter(PLPInfo plpTarget)Sole constructor for this class.
This constructor deletes all sub folders of the specified destinationPath.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcopyConfigFiles(java.io.File source, java.io.File destination, Configuration.PathKind configElement)Copies all EASy config files (variability model, build scripts, or templates) of from the specified source to the destination.voidcopyConfigFiles(PLPInfo plpSource, java.lang.String namespace)Copies all EASy config files (variability model, build scripts, and templates) of from the specified sourceLocation to the specified targedLocation, while keeping sub directories.private voidresetDestinationPath(java.io.File destinationPath)Deletes all sub folders of the destination Path for reseting this folder.
-
-
-
Field Detail
-
LOGGER
private static final net.ssehub.easy.basics.logger.EASyLoggerFactory.EASyLogger LOGGER
-
plpTarget
private PLPInfo plpTarget
-
-
Constructor Detail
-
EASyConfigFileImporter
public EASyConfigFileImporter(PLPInfo plpTarget)
Sole constructor for this class.
This constructor deletes all sub folders of the specified destinationPath.- Parameters:
plpTarget- The target plp where the copied files should be saved. where to store files and sub folders for imported EASy config files.
-
-
Method Detail
-
resetDestinationPath
private void resetDestinationPath(java.io.File destinationPath)
Deletes all sub folders of the destination Path for reseting this folder. Should be called before importing, therefore, this method is part of the constructor of this class.- Parameters:
destinationPath- A EASY config folder for IVML/VIL/VTL files, where all subfolders shall be deleted.
-
copyConfigFiles
public void copyConfigFiles(PLPInfo plpSource, java.lang.String namespace)
Copies all EASy config files (variability model, build scripts, and templates) of from the specified sourceLocation to the specified targedLocation, while keeping sub directories.- Parameters:
plpSource- The predecessor project from where all EASy config files and sub folders should be copied from.namespace- A namespace, where to copy the files of the sourceLocation into a sub folder inside the destination. Maybe null if no namespace should be used.
-
copyConfigFiles
private void copyConfigFiles(java.io.File source, java.io.File destination, Configuration.PathKind configElement)Copies all EASy config files (variability model, build scripts, or templates) of from the specified source to the destination. Only on of variability model, build scripts, or templates will be copied.- Parameters:
source- The source folder from where relevant files should be copied from.destination- The destination to where relevant files should be copied to.configElement- Specification which kind of files should be considered.- See Also:
EASyConfigFileFilter(PathKind...)
-
-