Package org.jetbrains.mps.openapi.module
Interface SRepository
-
public interface SRepository
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidaddRepositoryListener(SRepositoryListener listener)Register a listener for the repository.default SModelgetModel(SModelId modelId)SupportSModelReference.resolve(SRepository)mechanism for models that don't bear module identity as part of their reference (aka 'globally unique' model identity,SModelId.isGloballyUnique()).ModelAccessgetModelAccess()SModulegetModule(SModuleId moduleId)Iterable<SModule>getModules()Returns an unmodifiable collection of modules.SRepositorygetParent()Deprecated.RepositoryAccessgetRepositoryAccess()Deprecated.voidremoveRepositoryListener(SRepositoryListener listener)Remove a listener.voidsaveAll()
-
-
-
Method Detail
-
getParent
@Deprecated SRepository getParent()
Deprecated.
-
getModule
@Nullable SModule getModule(@NotNull SModuleId moduleId)
- Returns:
- the module which id is equal to the given module id.
A repository is able to have only one module for a given module id.
nullis returned iff there is no such module in the repository
-
getModel
@Nullable default SModel getModel(@NotNull SModelId modelId)
SupportSModelReference.resolve(SRepository)mechanism for models that don't bear module identity as part of their reference (aka 'globally unique' model identity,SModelId.isGloballyUnique()).- Parameters:
modelId- global identity of a modelSModelId.isGloballyUnique()shall betrue- Returns:
- model in this repository with the given global identity, or null of none found or supplied id is not unique one.
-
getModelAccess
@NotNull ModelAccess getModelAccess()
- Returns:
- a special class which yields a control to the objects which comprise the repository. These are namely modules, models, model roots, nodes.
-
getRepositoryAccess
@Deprecated RepositoryAccess getRepositoryAccess()
Deprecated.
-
saveAll
void saveAll()
-
addRepositoryListener
void addRepositoryListener(@NotNull SRepositoryListener listener)
Register a listener for the repository. If a listener isSRepositoryAttachListener, it gets additionally notified and can perform own initialization (e.g. handle modules already in the repository)
-
removeRepositoryListener
void removeRepositoryListener(@NotNull SRepositoryListener listener)
Remove a listener. If a listener isSRepositoryAttachListener, it is notified of detach event.
-
-