Package org.faktorips.runtime.internal
Class AbstractRuntimeRepositoryManager
- java.lang.Object
-
- org.faktorips.runtime.internal.AbstractRuntimeRepositoryManager
-
- All Implemented Interfaces:
IRuntimeRepositoryManager
- Direct Known Subclasses:
ClassloaderRuntimeRepositoryManager,DetachedContentRuntimeRepositoryManager
public abstract class AbstractRuntimeRepositoryManager extends java.lang.Object implements IRuntimeRepositoryManager
TheAbstractRuntimeRepositoryManagermanages the referencedIRuntimeRepositoryManager. It delegates the up-to-date check and the creation of new repositories to the subclass.
-
-
Constructor Summary
Constructors Constructor Description AbstractRuntimeRepositoryManager()Creates a newAbstractRuntimeRepositoryManager
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddDirectlyReferencedManager(IRuntimeRepositoryManager manager)Use this method to add a referencedIRuntimeRepositoryManager.protected abstract IRuntimeRepositorycreateNewRuntimeRepository()Creates a new repository.IRuntimeRepositorygetActualRuntimeRepository()Deprecated.since 3.9.0: The method name was a false translation from German.java.util.List<IRuntimeRepositoryManager>getAllReferencedRepositoryManagers()Collect all referenced manager.IRuntimeRepositorygetCurrentRuntimeRepository()Call a modification check on the product data provider.java.util.List<IRuntimeRepositoryManager>getDirectlyReferencedRepositoryManagers()Get the list of direct references managers.protected abstract booleanisRepositoryUpToDate(IRuntimeRepository currentRuntimeRepository)Checks whether theIRuntimeRepositoryis up to date or not.
-
-
-
Constructor Detail
-
AbstractRuntimeRepositoryManager
public AbstractRuntimeRepositoryManager()
Creates a newAbstractRuntimeRepositoryManager
-
-
Method Detail
-
getActualRuntimeRepository
@Deprecated public IRuntimeRepository getActualRuntimeRepository()
Deprecated.since 3.9.0: The method name was a false translation from German. The correct method is calledgetCurrentRuntimeRepository()Call a modification check on the product data provider. If there are any changes in the product data, this method creates a newIRuntimeRepository. If there are no changes this method simply returns the existing one.- Specified by:
getActualRuntimeRepositoryin interfaceIRuntimeRepositoryManager
-
getCurrentRuntimeRepository
public IRuntimeRepository getCurrentRuntimeRepository()
Description copied from interface:IRuntimeRepositoryManagerCall a modification check on the product data provider. If there are any changes in the product data, this method creates a newIRuntimeRepository. If there are no changes this method simply returns the existing one. The current runtime repository can be null.Every direct referenced manger will be asked for it current repository. If any direct referenced manager returns
nullas its current repository, this direct referenced repository will be ignored.- Specified by:
getCurrentRuntimeRepositoryin interfaceIRuntimeRepositoryManager
-
isRepositoryUpToDate
protected abstract boolean isRepositoryUpToDate(IRuntimeRepository currentRuntimeRepository)
Checks whether theIRuntimeRepositoryis up to date or not. If this method returnsfalse, a new repository has to be created.- Parameters:
currentRuntimeRepository- the runtime repository that has to be checked- Returns:
- whether the repository is still up to date
-
createNewRuntimeRepository
protected abstract IRuntimeRepository createNewRuntimeRepository()
Creates a new repository. This method has to create the repository but must NOT connect the repository to the other referenced repositories.- Returns:
- A newly created
IRuntimeRepository
-
addDirectlyReferencedManager
public final void addDirectlyReferencedManager(IRuntimeRepositoryManager manager)
Description copied from interface:IRuntimeRepositoryManagerUse this method to add a referencedIRuntimeRepositoryManager. TheIRuntimeRepositoryreturned byIRuntimeRepositoryManager.getCurrentRuntimeRepository()asks all references managers for their repositories and adding the references.- Specified by:
addDirectlyReferencedManagerin interfaceIRuntimeRepositoryManager- Parameters:
manager- The manager to connect with this manager
-
getDirectlyReferencedRepositoryManagers
public java.util.List<IRuntimeRepositoryManager> getDirectlyReferencedRepositoryManagers()
Description copied from interface:IRuntimeRepositoryManagerGet the list of direct references managers.- Specified by:
getDirectlyReferencedRepositoryManagersin interfaceIRuntimeRepositoryManager- Returns:
- All directly referenced managers
-
getAllReferencedRepositoryManagers
public java.util.List<IRuntimeRepositoryManager> getAllReferencedRepositoryManagers()
Description copied from interface:IRuntimeRepositoryManagerCollect all referenced manager. This request all referenced managers from the direct references managers recursively.- Specified by:
getAllReferencedRepositoryManagersin interfaceIRuntimeRepositoryManager- Returns:
- A list of all
IRuntimeRepositoryManagerthat are referenced directly or indirectly
-
-