org.faktorips.runtime.internal
Class AbstractRuntimeRepositoryManager

java.lang.Object
  extended by org.faktorips.runtime.internal.AbstractRuntimeRepositoryManager
All Implemented Interfaces:
IRuntimeRepositoryManager
Direct Known Subclasses:
ClassloaderRuntimeRepositoryManager, DetachedContentRuntimeRepositoryManager

public abstract class AbstractRuntimeRepositoryManager
extends Object
implements IRuntimeRepositoryManager

The AbstractRuntimeRepositoryManager manages the referenced IRuntimeRepositoryManager. It delegates the up to date check and the creation of new repositories to the subclass.

Author:
dirmeier

Constructor Summary
AbstractRuntimeRepositoryManager()
          Creates a new AbstractRuntimeRepositoryManager
 
Method Summary
 void addDirectlyReferencedManager(IRuntimeRepositoryManager manager)
          Use this method to add a referenced IRuntimeRepositoryManager.
protected abstract  IRuntimeRepository createNewRuntimeRepository()
          Creates a new repository.
 IRuntimeRepository getActualRuntimeRepository()
          Deprecated. since 3.9.0: The method name was a false translation from German. The correct method is called getCurrentRuntimeRepository()
 List<IRuntimeRepositoryManager> getAllReferencedRepositoryManagers()
          Collect all referenced manager.
 IRuntimeRepository getCurrentRuntimeRepository()
          Call a modification check on the product data provider.
 List<IRuntimeRepositoryManager> getDirectlyReferencedRepositoryManagers()
          Get the list of direct references managers.
protected abstract  boolean isRepositoryUpToDate(IRuntimeRepository currentRuntimeRepository)
          This method checks whether the IRuntimeRepository is up to date or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRuntimeRepositoryManager

public AbstractRuntimeRepositoryManager()
Creates a new AbstractRuntimeRepositoryManager

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 called getCurrentRuntimeRepository()

Call a modification check on the product data provider. If there are any changes in the product data, this method creates a new IRuntimeRepository. If there are no changes this method simply returns the existing one.

Specified by:
getActualRuntimeRepository in interface IRuntimeRepositoryManager

getCurrentRuntimeRepository

public IRuntimeRepository getCurrentRuntimeRepository()
Call a modification check on the product data provider. If there are any changes in the product data, this method creates a new IRuntimeRepository. 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 null as its current repository, this direct referenced repository will be ignored.

Specified by:
getCurrentRuntimeRepository in interface IRuntimeRepositoryManager

isRepositoryUpToDate

protected abstract boolean isRepositoryUpToDate(IRuntimeRepository currentRuntimeRepository)
This method checks whether the IRuntimeRepository is up to date or not. If this method returns false, a new repository have to be created

Parameters:
currentRuntimeRepository - The actual runtime repository that have to be checked
Returns:
true if the repository is still up to date

createNewRuntimeRepository

protected abstract IRuntimeRepository createNewRuntimeRepository()
Creates a new repository. This method have to create thre repository but do NOT have to connect the repository to the other referenced repositories.

Returns:
A newly created IRuntimeRepository

addDirectlyReferencedManager

public final void addDirectlyReferencedManager(IRuntimeRepositoryManager manager)
Description copied from interface: IRuntimeRepositoryManager
Use this method to add a referenced IRuntimeRepositoryManager. The IRuntimeRepository returned by IRuntimeRepositoryManager.getCurrentRuntimeRepository() asks all references managers for their repositories and adding the references.

Specified by:
addDirectlyReferencedManager in interface IRuntimeRepositoryManager
Parameters:
manager - The manager to connect with this manager

getDirectlyReferencedRepositoryManagers

public List<IRuntimeRepositoryManager> getDirectlyReferencedRepositoryManagers()
Description copied from interface: IRuntimeRepositoryManager
Get the list of direct references managers.

Specified by:
getDirectlyReferencedRepositoryManagers in interface IRuntimeRepositoryManager
Returns:
All directly referenced managers

getAllReferencedRepositoryManagers

public List<IRuntimeRepositoryManager> getAllReferencedRepositoryManagers()
Description copied from interface: IRuntimeRepositoryManager
Collect all referenced manager. This request all referenced managers from the direct references managers recursively.

Specified by:
getAllReferencedRepositoryManagers in interface IRuntimeRepositoryManager
Returns:
A list of all IRuntimeRepositoryManager that are referenced directly or indirectly


Copyright © 2015. All rights reserved.