public final class InstantiationCommands
extends java.lang.Object
ProjectNameMapper.LowlevelCommands.startEASy().| Modifier and Type | Class and Description |
|---|---|
private static class |
InstantiationCommands.InstantiationListener
Listener to collect
VilExceptions during script execution. |
| Modifier | Constructor and Description |
|---|---|
private |
InstantiationCommands()
Should prevent instantiation of this utility class.
|
| Modifier and Type | Method and Description |
|---|---|
private static boolean |
checkIsNestedFile(java.io.File possibleParent,
java.io.File maybeChild)
Checks whether maybeChild is nested inside of possibleParent.
|
private static net.ssehub.easy.producer.core.mgmt.VilArgumentProvider |
createArgumentProvider(java.util.Map<java.lang.String,java.lang.Object> arguments)
Creates an argument provider and registers it with
VilArgumentProvider if necessary. |
private static void |
createPLPsAndInstantiate(java.io.File projectSource,
java.io.File projectTarget,
net.ssehub.easy.varModel.model.Project ivmlProject,
net.ssehub.easy.instantiation.core.model.buildlangModel.Script buildScript,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Creates two (temporary)
PLPInfos, links them (sets prede-/successor), and instantiates the successor. |
private static void |
createTargetFolder(java.io.File projectSource,
java.io.File projectTarget)
Creates projectTarget if it does not exist.
|
static void |
instantiate(java.io.File projectSource,
java.io.File projectTarget)
Instantiates the project projectTarget, while using source files (and IVML/VIL information) provided
by projectSource.
|
static void |
instantiate(java.io.File projectSource,
java.io.File projectTarget,
java.io.File ivmlFile,
java.io.File scriptFile)
Uses projectSource to instantiate projectTarget.
|
static void |
instantiate(java.io.File projectSource,
java.io.File projectTarget,
java.io.File ivmlFile,
java.io.File scriptFile,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Uses projectSource to instantiate projectTarget.
|
static void |
instantiate(java.io.File projectSource,
java.io.File projectTarget,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Instantiates the project projectTarget, while using source files (and IVML/VIL information) provided
by projectSource.
|
static void |
instantiate(java.io.File projectSource,
java.io.File projectTarget,
ModelLoadDefinition ivmlDefinition,
ModelLoadDefinition vilDefinition)
Uses projectSource to instantiate projectTarget.
|
static void |
instantiate(java.io.File projectSource,
java.io.File projectTarget,
ModelLoadDefinition ivmlDefinition,
ModelLoadDefinition vilDefinition,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Uses projectSource to instantiate projectTarget.
|
private static void |
instantiateEASyProjects(java.io.File projectSource,
java.io.File projectTarget,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Instantiates the project projectTarget, while using source files (and IVML/VIL information) provided
by projectSource.
|
static void |
instantiateSelf(java.io.File project)
Instantiates the given project.
|
static void |
instantiateSelf(java.io.File project,
java.io.File ivmlFile)
Instantiates the given project.
|
static void |
instantiateSelf(java.io.File project,
java.io.File ivmlFile,
java.io.File buildScriptFile)
Instantiates the given project.
|
static void |
instantiateSelf(java.io.File project,
java.io.File ivmlFile,
java.io.File buildScriptFile,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Instantiates the given project.
|
static void |
instantiateSelf(java.io.File project,
java.io.File ivmlFile,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Instantiates the given project.
|
static void |
instantiateSelf(java.io.File project,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Instantiates the given project.
|
private InstantiationCommands()
public static void instantiateSelf(java.io.File project)
throws net.ssehub.easy.producer.core.persistence.PersistenceException,
net.ssehub.easy.instantiation.core.model.common.VilException
project - The toplevel absolute folder of the project (must have a valid EASy structure)net.ssehub.easy.producer.core.persistence.PersistenceException - Will be thrown if the project could not be loaded, e.g. if the project has no
valid EASy structure.net.ssehub.easy.instantiation.core.model.common.VilException - In case that artifact operations or script execution failspublic static void instantiateSelf(java.io.File project,
java.util.Map<java.lang.String,java.lang.Object> arguments)
throws net.ssehub.easy.producer.core.persistence.PersistenceException,
net.ssehub.easy.instantiation.core.model.common.VilException
project - The toplevel absolute folder of the project (must have a valid EASy structure)arguments - a name-element mapping specifying the top-level parameter of a VIL instantiation (may
be null)net.ssehub.easy.producer.core.persistence.PersistenceException - Will be thrown if the project could not be loaded, e.g. if the project has no
valid EASy structure.net.ssehub.easy.instantiation.core.model.common.VilException - In case that artifact operations or script execution failspublic static void instantiateSelf(java.io.File project,
java.io.File ivmlFile)
throws net.ssehub.easy.basics.modelManagement.ModelManagementException,
net.ssehub.easy.instantiation.core.model.common.VilException,
net.ssehub.easy.producer.core.persistence.PersistenceException
instantiateSelf(File, File, Map) with null as arguments.project - The toplevel absolute folder of the projectivmlFile - A frozen configuration, which should be used for instantiation.net.ssehub.easy.basics.modelManagement.ModelManagementException - In case that the available information
may be come inconsistent due to this updatenet.ssehub.easy.instantiation.core.model.common.VilException - In case that artifact operations or script execution failsnet.ssehub.easy.producer.core.persistence.PersistenceException - Will be thrown if at least one of the IVML or VIL files could not be loaded.public static void instantiateSelf(java.io.File project,
java.io.File ivmlFile,
java.util.Map<java.lang.String,java.lang.Object> arguments)
throws net.ssehub.easy.basics.modelManagement.ModelManagementException,
net.ssehub.easy.instantiation.core.model.common.VilException,
net.ssehub.easy.producer.core.persistence.PersistenceException
project - The toplevel absolute folder of the projectivmlFile - A frozen configuration, which should be used for instantiation.arguments - a name-element mapping specifying the top-level parameter of a VIL instantiation (may
be null)net.ssehub.easy.basics.modelManagement.ModelManagementException - In case that the available information
may be come inconsistent due to this updatenet.ssehub.easy.instantiation.core.model.common.VilException - In case that artifact operations or script execution failsnet.ssehub.easy.producer.core.persistence.PersistenceException - Will be thrown if at least one of the IVML or VIL files could not be loaded.public static void instantiateSelf(java.io.File project,
java.io.File ivmlFile,
java.io.File buildScriptFile)
throws net.ssehub.easy.basics.modelManagement.ModelManagementException,
net.ssehub.easy.instantiation.core.model.common.VilException,
net.ssehub.easy.producer.core.persistence.PersistenceException
instantiateSelf(File, File, File, Map) with null as arguments.project - The toplevel absolute folder of the projectivmlFile - A frozen configuration, which should be used for instantiation.buildScriptFile - The main build script (starting point) which should be used for instantiation.net.ssehub.easy.basics.modelManagement.ModelManagementException - In case that the available information
may become inconsistent due to this updatenet.ssehub.easy.instantiation.core.model.common.VilException - In case that artifact operations or script execution failsnet.ssehub.easy.producer.core.persistence.PersistenceException - Will be thrown if at least one of the IVML or VIL files could not be loaded.public static void instantiateSelf(java.io.File project,
java.io.File ivmlFile,
java.io.File buildScriptFile,
java.util.Map<java.lang.String,java.lang.Object> arguments)
throws net.ssehub.easy.basics.modelManagement.ModelManagementException,
net.ssehub.easy.instantiation.core.model.common.VilException,
net.ssehub.easy.producer.core.persistence.PersistenceException
project - The toplevel absolute folder of the projectivmlFile - A frozen configuration, which should be used for instantiation.buildScriptFile - The main build script (starting point) which should be used for instantiation.arguments - a name-element mapping specifying the top-level parameter of a VIL instantiation (may
be null)net.ssehub.easy.basics.modelManagement.ModelManagementException - In case that the available information
may become inconsistent due to this updatenet.ssehub.easy.instantiation.core.model.common.VilException - In case that artifact operations or script execution failsnet.ssehub.easy.producer.core.persistence.PersistenceException - Will be thrown if at least one of the IVML or VIL files could not be loaded.private static net.ssehub.easy.producer.core.mgmt.VilArgumentProvider createArgumentProvider(java.util.Map<java.lang.String,java.lang.Object> arguments)
VilArgumentProvider if necessary.arguments - the arguments to be passed to VIL (may be null)public static void instantiate(java.io.File projectSource,
java.io.File projectTarget)
throws net.ssehub.easy.producer.core.persistence.PersistenceException,
net.ssehub.easy.instantiation.core.model.common.VilException,
java.io.IOException
instantiate(File, File, Map) with null as arguments.projectSource - The toplevel absolute folder of an EASy project (must have a valid EASy structure), which
serves as a basis for instantiation.projectTarget - The toplevel absolute folder of an EASy project (must have a valid EASy structure), which
should be instantiated.net.ssehub.easy.producer.core.persistence.PersistenceException - Will be thrown if one of the projects could not be loaded,
e.g. if the project has no valid EASy structure.net.ssehub.easy.instantiation.core.model.common.VilException - In case that artifact operations or script execution failsjava.io.IOException - If source or destination is invalid, or if an IO error occurs during copyingpublic static void instantiate(java.io.File projectSource,
java.io.File projectTarget,
java.util.Map<java.lang.String,java.lang.Object> arguments)
throws net.ssehub.easy.producer.core.persistence.PersistenceException,
net.ssehub.easy.instantiation.core.model.common.VilException,
java.io.IOException
projectSource - The toplevel absolute folder of an EASy project (must have a valid EASy structure), which
serves as a basis for instantiation.projectTarget - The toplevel absolute folder of an EASy project (must have a valid EASy structure), which
should be instantiated.arguments - a name-element mapping specifying the top-level parameter of a VIL instantiation (may
be null)net.ssehub.easy.producer.core.persistence.PersistenceException - Will be thrown if one of the projects could not be loaded,
e.g. if the project has no valid EASy structure.net.ssehub.easy.instantiation.core.model.common.VilException - In case that artifact operations or script execution failsjava.io.IOException - If source or destination is invalid, or if an IO error occurs during copyingprivate static void instantiateEASyProjects(java.io.File projectSource,
java.io.File projectTarget,
java.util.Map<java.lang.String,java.lang.Object> arguments)
throws net.ssehub.easy.producer.core.persistence.PersistenceException,
net.ssehub.easy.instantiation.core.model.common.VilException
projectSource - The toplevel absolute folder of an EASy project (must have a valid EASy structure), which
serves as a basis for instantiation.projectTarget - The toplevel absolute folder of an EASy project (must have a valid EASy structure), which
should be instantiated.arguments - a name-element mapping specifying the top-level parameter of a VIL instantiation (may
be null)net.ssehub.easy.producer.core.persistence.PersistenceException - Will be thrown if one of the projects could not be loaded,
e.g. if the project has no valid EASy structure.net.ssehub.easy.instantiation.core.model.common.VilException - In case that artifact operations or script execution failspublic static void instantiate(java.io.File projectSource,
java.io.File projectTarget,
java.io.File ivmlFile,
java.io.File scriptFile)
throws net.ssehub.easy.basics.modelManagement.ModelManagementException,
java.lang.SecurityException,
net.ssehub.easy.producer.core.persistence.PersistenceException,
net.ssehub.easy.instantiation.core.model.common.VilException,
java.io.IOException
instantiate(File, File, File, File, Map) with null as arguments.projectSource - An absolute folder/project, which contains the product line infrastructure, i.e. files to
instantiate.projectTarget - An absolute folder/project where the files should be instantiated in. The folder will be
created if it does not exist.ivmlFile - The model definition including its frozen configuration, which should be used for instantiation.
(Must be inside either of projectSource or projectTarget).scriptFile - The main build script (starting point) which should be used for instantiation.
(Must be inside either of projectSource or projectTarget).java.lang.SecurityException - If projectTarget does not exist, a security manager exists,
and its SecurityManager.checkWrite(java.lang.String)
method does not permit projectTarget directory to be creatednet.ssehub.easy.basics.modelManagement.ModelManagementException - In case that the available information
may become inconsistent due to this updatenet.ssehub.easy.instantiation.core.model.common.VilException - In case that artifact operations or script execution failsnet.ssehub.easy.producer.core.persistence.PersistenceException - Will be thrown if at least one of the IVML or VIL files could not be loaded.java.io.IOException - If source or destination is invalid, or if an IO error occurs during copyingpublic static void instantiate(java.io.File projectSource,
java.io.File projectTarget,
java.io.File ivmlFile,
java.io.File scriptFile,
java.util.Map<java.lang.String,java.lang.Object> arguments)
throws net.ssehub.easy.basics.modelManagement.ModelManagementException,
java.lang.SecurityException,
net.ssehub.easy.producer.core.persistence.PersistenceException,
net.ssehub.easy.instantiation.core.model.common.VilException,
java.io.IOException
projectSource - An absolute folder/project, which contains the product line infrastructure, i.e. files
to instantiate.projectTarget - An absolute folder/project where the files should be instantiated in. The folder will be
created if it does not exist.ivmlFile - The model definition including its frozen configuration, which should be used for instantiation.
(Must be inside either of projectSource or projectTarget).scriptFile - The main build script (starting point) which should be used for instantiation.
(Must be inside either of projectSource or projectTarget).arguments - a name-element mapping specifying the top-level parameter of a VIL instantiation (may
be null)java.lang.SecurityException - If projectTarget does not exist, a security manager exists,
and its SecurityManager.checkWrite(java.lang.String)
method does not permit projectTarget directory to be creatednet.ssehub.easy.basics.modelManagement.ModelManagementException - In case that the available information
may become inconsistent due to this updatenet.ssehub.easy.instantiation.core.model.common.VilException - In case that artifact operations or script execution failsnet.ssehub.easy.producer.core.persistence.PersistenceException - Will be thrown if at least one of the IVML or VIL files could not be loaded.java.io.IOException - If source or destination is invalid, or if an IO error occurs during copyingprivate static void createPLPsAndInstantiate(java.io.File projectSource,
java.io.File projectTarget,
net.ssehub.easy.varModel.model.Project ivmlProject,
net.ssehub.easy.instantiation.core.model.buildlangModel.Script buildScript,
java.util.Map<java.lang.String,java.lang.Object> arguments)
throws net.ssehub.easy.instantiation.core.model.common.VilException
PLPInfos, links them (sets prede-/successor), and instantiates the successor.projectSource - An absolute folder/project, which contains the product line infrastructure, i.e. files to
instantiate.projectTarget - An existing absolute folder/project where the files should be instantiated in.ivmlProject - A loaded configuration, which should be used for instantiation (Must not be null).buildScript - A loaded build script, which should be used for instantiation (Must not be null).arguments - a name-element mapping specifying the top-level parameter of a VIL instantiation (may
be null)net.ssehub.easy.instantiation.core.model.common.VilException - In case that artifact operations or script execution failspublic static void instantiate(java.io.File projectSource,
java.io.File projectTarget,
ModelLoadDefinition ivmlDefinition,
ModelLoadDefinition vilDefinition)
throws net.ssehub.easy.producer.core.persistence.PersistenceException,
java.io.IOException,
net.ssehub.easy.basics.modelManagement.ModelManagementException,
net.ssehub.easy.instantiation.core.model.common.VilException
instantiate(File, File, ModelLoadDefinition, ModelLoadDefinition, Map) with null
as arguments.projectSource - An absolute folder/project, which contains the product line infrastructure, i.e. files to
instantiate.projectTarget - An absolute folder/project where the files should be instantiated in. The folder will be
created if it does not exist.ivmlDefinition - A (model name, version) pair for specifying which Project should be used for
instantantion.
The Project must be located inside of projectTarget or projectSource.
This method first
tries to load the Project from the projectTarget before it tries to load the Project
from the projectSource.vilDefinition - A (model name, version) pair for specifying which Script should be used for
instantantion.
The Script must be located inside of projectTarget or projectSource.
This method first
tries to load the Script from the projectTarget before it tries to load the Script
from the projectSource.net.ssehub.easy.producer.core.persistence.PersistenceException - Will be thrown if at least one of the IVML or VIL files could not be loaded.java.io.IOException - If source or destination is invalid, or if an IO error occurs during copyingnet.ssehub.easy.basics.modelManagement.ModelManagementException - In case that the available information
may become inconsistent due to this updatenet.ssehub.easy.instantiation.core.model.common.VilException - In case that artifact operations or script execution failspublic static void instantiate(java.io.File projectSource,
java.io.File projectTarget,
ModelLoadDefinition ivmlDefinition,
ModelLoadDefinition vilDefinition,
java.util.Map<java.lang.String,java.lang.Object> arguments)
throws net.ssehub.easy.producer.core.persistence.PersistenceException,
java.io.IOException,
net.ssehub.easy.basics.modelManagement.ModelManagementException,
net.ssehub.easy.instantiation.core.model.common.VilException
projectSource - An absolute folder/project, which contains the product line infrastructure, i.e. files to
instantiate.projectTarget - An absolute folder/project where the files should be instantiated in. The folder will be
created if it does not exist.ivmlDefinition - A (model name, version) pair for specifying which Project should be used for
instantantion.
The Project must be located inside of projectTarget or projectSource.
This method first
tries to load the Project from the projectTarget before it tries to load the Project
from the projectSource.vilDefinition - A (model name, version) pair for specifying which Script should be used for
instantantion.
The Script must be located inside of projectTarget or projectSource.
This method first
tries to load the Script from the projectTarget before it tries to load the Script
from the projectSource.arguments - a name-element mapping specifying the top-level parameter of a VIL instantiation (may
be null)net.ssehub.easy.producer.core.persistence.PersistenceException - Will be thrown if at least one of the IVML or VIL files could not be loaded.java.io.IOException - If source or destination is invalid, or if an IO error occurs during copyingnet.ssehub.easy.basics.modelManagement.ModelManagementException - In case that the available information
may become inconsistent due to this updatenet.ssehub.easy.instantiation.core.model.common.VilException - In case that artifact operations or script execution failsprivate static boolean checkIsNestedFile(java.io.File possibleParent,
java.io.File maybeChild)
possibleParent - A folder which may contain maybeChild.maybeChild - A file or folder which should be located inside of possibleParent.private static void createTargetFolder(java.io.File projectSource,
java.io.File projectTarget)
throws net.ssehub.easy.producer.core.persistence.PersistenceException,
java.io.IOException
projectSource - A EASy project which contains a EASy folder with IVML/VIL files.projectTarget - The folder which shall be created.net.ssehub.easy.producer.core.persistence.PersistenceException - Will be thrown if the folder could not be created.java.io.IOException - If source or destination is invalid, or if an IO error occurs during copyingCopyright © 2009 - 2018 SSE. All Rights Reserved.