Class ProductLineProject
- java.lang.Object
-
- net.ssehub.easy.producer.core.mgmt.PLPInfo
-
- net.ssehub.easy.producer.eclipse.model.ProductLineProject
-
- All Implemented Interfaces:
IModelListener<Script>,IInstantiatorProject
public class ProductLineProject extends PLPInfo
This class holds all models, controllers and attributes (which are not stored in a model) related to one product lien project.- Since:
- 20.09.2011
- Author:
- El-Sharkawy, Hundt, Kapeluch, Brauch
-
-
Field Summary
Fields Modifier and Type Field Description private static EASyLoggerFactory.EASyLoggerLOGGER
-
Constructor Summary
Constructors Constructor Description ProductLineProject(java.lang.String projectname, java.io.File projectLocation)This constructor is for the creation of a new product line project.ProductLineProject(java.lang.String projectID, java.lang.String projectName, ProjectContainer project, java.io.File projectLocation, ScriptContainer mainBuildScript)This constructor is needed, if a saved plp is read by the persistence layer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateNewModel(Version version)Creates a new model for the project.booleanisTransformable()Checks whether instantiation should be possible.voidpullConfigFromPredecessors()This method copies the variability model, configuration, and instantiator settings of the predecessor projects to this project.voidreason(ReasoningOperation desiredOperation, IReasonerListener listener)Starts the reasoning.voidrefresh()Reloads all models (variability model(s), build script(s), template(s)) and refreshes loaded files and folders.voidrefreshArtifacts()Refreshes all artifacts on file level.voidregisterObserver(java.util.Observer observer)Registers given observer for every controller.voidsave()Saves the data of this project persistently to file system.booleansetPredecessors(java.util.List<java.lang.String> predecessorIDs)Sets the given projectIDs as predecessor projects of this project.voidunRegisterObserver(java.util.Observer observer)Unsubscribes given observer from notification for each controller.-
Methods inherited from class net.ssehub.easy.producer.core.mgmt.PLPInfo
abortInstantiation, addScriptImport, addVilExecutionListener, buildScriptWasEdited, close, configurationPulled, createMainRule, createReasoningProcess, getBuildScript, getConfigLocation, getConfiguration, getHighestVersion, getMemberController, getParsingExceptions, getPathConfiguration, getPredecessorLocations, getProject, getProjectContainer, getProjectID, getProjectLocation, getProjectName, getReasonerConfig, getSaveDebugInformation, getScriptContainer, getScriptLocation, getSuccessorLocations, getTemplateLocation, getVersion, hasDefaultMainBuildScript, instantiate, instantiate, instantiate, isPreliminary, isSaveable, isTransformableVIL, listAvailableModels, notifyReplaced, register, removeVilExecutionListener, setBuildScript, setMainModel, setProject, setReasonerConfig, setSaveDebugInformation, toString, unregister
-
-
-
-
Field Detail
-
LOGGER
private static final EASyLoggerFactory.EASyLogger LOGGER
-
-
Constructor Detail
-
ProductLineProject
public ProductLineProject(java.lang.String projectname, java.io.File projectLocation)This constructor is for the creation of a new product line project.- Parameters:
projectname- The name of the new created product line projectprojectLocation- The top level location of the whole ProductLineProject
-
ProductLineProject
public ProductLineProject(java.lang.String projectID, java.lang.String projectName, ProjectContainer project, java.io.File projectLocation, ScriptContainer mainBuildScript)This constructor is needed, if a saved plp is read by the persistence layer.- Parameters:
projectID- The ID of the product line projectprojectName- The name of the product line projectproject- An already existent variability model for thisProductLineProject.projectLocation- The top level location of the whole ProductLineProjectmainBuildScript- The main build script for building the project (starting point of the instantiation).
-
-
Method Detail
-
setPredecessors
public boolean setPredecessors(java.util.List<java.lang.String> predecessorIDs)
Sets the given projectIDs as predecessor projects of this project.- Parameters:
predecessorIDs- A list of predecessors projects.- Returns:
- true if at least one ID was removed or added, false otherwise.
-
pullConfigFromPredecessors
public void pullConfigFromPredecessors()
This method copies the variability model, configuration, and instantiator settings of the predecessor projects to this project.- Overrides:
pullConfigFromPredecessorsin classPLPInfo- Throws:
VarModelConflictException- Since:
- 23.07.2012
-
save
public void save()
Saves the data of this project persistently to file system.
-
registerObserver
public void registerObserver(java.util.Observer observer)
Registers given observer for every controller.- Parameters:
observer- The Observer which should be registered for notification
-
unRegisterObserver
public void unRegisterObserver(java.util.Observer observer)
Unsubscribes given observer from notification for each controller.- Parameters:
observer- The Observer which should be unsubscribed from notification- Since:
- 20.10.2011
-
isTransformable
public boolean isTransformable()
Checks whether instantiation should be possible. Checks whether at least one inherited instantiator has been found and whether at least one associated predecessor is located in the current workspace. Note: a complete Instantiation might still not be possible due to missing instantiator engines- Returns:
- true, if it should be possible
- See Also:
FileInstantiator#getOperationalPath()
-
reason
public void reason(ReasoningOperation desiredOperation, IReasonerListener listener)
Description copied from class:PLPInfoStarts the reasoning.
-
createNewModel
public void createNewModel(Version version) throws PersistenceException
Creates a new model for the project.- Parameters:
version- The Version that is to be used for the new model.- Throws:
PersistenceException- If the file cannot be written to the file system.
-
refresh
public void refresh()
Description copied from class:PLPInfoReloads all models (variability model(s), build script(s), template(s)) and refreshes loaded files and folders.
-
refreshArtifacts
public void refreshArtifacts()
Refreshes all artifacts on file level.
-
-