Class 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
    • 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 project
        projectLocation - 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 project
        projectName - The name of the product line project
        project - An already existent variability model for this ProductLineProject.
        projectLocation - The top level location of the whole ProductLineProject
        mainBuildScript - 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:
        pullConfigFromPredecessors in class PLPInfo
        Throws:
        VarModelConflictException
        Since:
        23.07.2012
      • save

        public void save()
        Saves the data of this project persistently to file system.
        Overrides:
        save in class PLPInfo
      • 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: PLPInfo
        Starts the reasoning.
        Overrides:
        reason in class PLPInfo
        Parameters:
        desiredOperation - Specifies which reasoning operation should be performed.
        listener - listener A listener which will be called after the reasoning has been finished. Can be null, if no action shall be executed after the reasoning is finished.
      • 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: PLPInfo
        Reloads all models (variability model(s), build script(s), template(s)) and refreshes loaded files and folders.
        Overrides:
        refresh in class PLPInfo
      • refreshArtifacts

        public void refreshArtifacts()
        Refreshes all artifacts on file level.