org.andromda.core.repository
Class Repositories

java.lang.Object
  extended by org.andromda.core.repository.Repositories

public class Repositories
extends java.lang.Object

This class provides access to all repositories available within the system (that is: any repository registered within a namespace).

Author:
Chad Brandon

Constructor Summary
Repositories()
           
 
Method Summary
 void clear()
          Clears out any resources used by this class.
 RepositoryFacade getImplementation(java.lang.String name)
          Retrieves the repository implementation with the given name (i.e.
 void initialize()
          Discovers and initializes all repositories within this class.
static Repositories instance()
          Retrieves the shared instance of this class.
 boolean loadModel(Model model)
          Loads the model defined in the configuration model instance into the repository to which the model belongs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Repositories

public Repositories()
Method Detail

instance

public static Repositories instance()
Retrieves the shared instance of this class.

Returns:
the shared instance.

initialize

public void initialize()
Discovers and initializes all repositories within this class.


getImplementation

public RepositoryFacade getImplementation(java.lang.String name)
Retrieves the repository implementation with the given name (i.e. namespace).

Parameters:
name - the name of the repository implementation to retrieve.
Returns:
the repository implementation.

loadModel

public boolean loadModel(Model model)
Loads the model defined in the configuration model instance into the repository to which the model belongs. If the model has previously been loaded, this will only load the model if it needs to be re-loaded (i.e. it has been changed).

Parameters:
model - the configuration model instance that contains the information about the model to load.
Returns:
true if the model was loaded/re-loaded, false if the model was already loaded, and not re-loaded.

clear

public void clear()
Clears out any resources used by this class.



Copyright © 2003-2008 AndroMDA.org. All Rights Reserved.