Class VarModel
- java.lang.Object
-
- net.ssehub.easy.basics.modelManagement.ModelManagement<Project>
-
- net.ssehub.easy.varModel.management.VarModel
-
public class VarModel extends ModelManagement<Project>
The variability model, the central class holding all project instances and being responsible for import resolution. Model loading is done by plugins of typeIModelLoader. Public access shall be synchronized (in any way) as multiple source parts and tools may access the information concurrently. Please note that specific information and settings are available viaModelManagement.availableModels(),comments(),ModelManagement.events(),ModelManagement.loaders(),ModelManagement.locale()andModelManagement.locations(). The variability model needs a loader and a location to operate. After providing this information, available IVML projects can be accessed viaModelManagement.availableModels().- Author:
- Marcel Lueder, Holger Eichelberger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classVarModel.IvmlModelRepositoryRefined model repository for IVML.
-
Field Summary
Fields Modifier and Type Field Description private ModelCommentsPersistencercommentsstatic VarModelINSTANCEStores the singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description privateVarModel()Singleton.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModelCommentsPersistencercomments()Provides access to the comments persistencer.protected ModelRepository<Project>createRepository()Creates a model repository instance.protected ImportResolver<Project>createResolver()Creates a resolver instance.protected voidpostLoadModel(ModelInfo<Project> info)Additional code to be executed after a model was loaded.-
Methods inherited from class net.ssehub.easy.basics.modelManagement.ModelManagement
availableModels, clear, clearModel, clearModel, events, getAvailable, getModel, getModelCount, getResolverFromPool, isLoading, isLoading, isOutdated, isOutdated, load, loaders, locale, locations, notifyLoadingCompleted, outdateAll, releaseResolver, reload, reload, repository, resolve, resolveImports, resolveImports, resolveImports, resolveImports, setOutdated, setOutdated, unload, updateModel, updateModel, updateModel, updateModelInformation, updateModelInformation
-
-
-
-
Field Detail
-
INSTANCE
public static final VarModel INSTANCE
Stores the singleton instance.
-
comments
private ModelCommentsPersistencer comments
-
-
Method Detail
-
createRepository
protected ModelRepository<Project> createRepository()
Description copied from class:ModelManagementCreates a model repository instance.- Specified by:
createRepositoryin classModelManagement<Project>- Returns:
- the instance
-
comments
public ModelCommentsPersistencer comments()
Provides access to the comments persistencer. For future compatibility, please store the returned instance just for temporary purposes within a method and not for long-term use in an attribute etc.- Returns:
- the events object
-
postLoadModel
protected void postLoadModel(ModelInfo<Project> info) throws java.io.IOException
Additional code to be executed after a model was loaded.- Overrides:
postLoadModelin classModelManagement<Project>- Parameters:
info- the information object describing the model- Throws:
java.io.IOException- in case that loading fails - however, model loading will not fail
-
createResolver
protected ImportResolver<Project> createResolver()
Description copied from class:ModelManagementCreates a resolver instance.- Specified by:
createResolverin classModelManagement<Project>- Returns:
- the resolver instance
-
-