org.objectweb.fractal.gui.repository.lib
Class BasicRepository

java.lang.Object
  extended byorg.objectweb.fractal.gui.repository.lib.BasicRepository
All Implemented Interfaces:
org.objectweb.fractal.api.control.BindingController, Repository

public class BasicRepository
extends java.lang.Object
implements Repository, org.objectweb.fractal.api.control.BindingController

Basic implementation of the Repository interface. This implementation supposes that the component definitions are stored in the repository as Fractal ADL definitions, in XML form.


Field Summary
static java.lang.String CONFIGURATION_FACTORY_BINDING
          A mandatory client interface bound to a factory.
static java.lang.String DEFINITION_FACTORY_BINDING
          TODO javadoc.
static java.lang.String STORAGE_BINDING
          A mandatory client interface bound to a storage.
 
Constructor Summary
BasicRepository()
           
 
Method Summary
 void bindFc(java.lang.String clientItfName, java.lang.Object serverItf)
           
 java.lang.String[] listFc()
           
 Component loadComponent(java.lang.String name, GraphModel graph)
          Loads a component (and all its sub components) from this repository.
 java.lang.Object lookupFc(java.lang.String clientItfName)
           
 java.lang.String storeComponent(Component component, GraphModel graph, java.lang.Object hints)
          Stores a component (and all its sub components) into this repository.
 void unbindFc(java.lang.String clientItfName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STORAGE_BINDING

public static final java.lang.String STORAGE_BINDING
A mandatory client interface bound to a storage. This is the storage from which this repository loads the component definitions.

See Also:
Constant Field Values

DEFINITION_FACTORY_BINDING

public static final java.lang.String DEFINITION_FACTORY_BINDING
TODO javadoc.

See Also:
Constant Field Values

CONFIGURATION_FACTORY_BINDING

public static final java.lang.String CONFIGURATION_FACTORY_BINDING
A mandatory client interface bound to a factory. This factory is used to create components from the component definitions stored in the storage.

See Also:
Constant Field Values
Constructor Detail

BasicRepository

public BasicRepository()
Method Detail

listFc

public java.lang.String[] listFc()
Specified by:
listFc in interface org.objectweb.fractal.api.control.BindingController

lookupFc

public java.lang.Object lookupFc(java.lang.String clientItfName)
Specified by:
lookupFc in interface org.objectweb.fractal.api.control.BindingController

bindFc

public void bindFc(java.lang.String clientItfName,
                   java.lang.Object serverItf)
Specified by:
bindFc in interface org.objectweb.fractal.api.control.BindingController

unbindFc

public void unbindFc(java.lang.String clientItfName)
Specified by:
unbindFc in interface org.objectweb.fractal.api.control.BindingController

loadComponent

public Component loadComponent(java.lang.String name,
                               GraphModel graph)
                        throws java.lang.Exception
Description copied from interface: Repository
Loads a component (and all its sub components) from this repository.

Specified by:
loadComponent in interface Repository
Parameters:
name - the name of the component to be loaded.
graph - an optional graph model.
Returns:
the loaded component.
Throws:
java.lang.Exception - if the component cannot loaded.

storeComponent

public java.lang.String storeComponent(Component component,
                                       GraphModel graph,
                                       java.lang.Object hints)
                                throws java.lang.Exception
Description copied from interface: Repository
Stores a component (and all its sub components) into this repository.

Specified by:
storeComponent in interface Repository
Parameters:
component - the component to be stored.
graph - an optional graph model.
hints - options.
Returns:
the name of the component that has been stored.
Throws:
java.lang.Exception - if the component cannot be stored.