fr.ove.utils
Class ObjectsRepository

java.lang.Object
  extended byfr.ove.utils.ObjectsRepository

public class ObjectsRepository
extends java.lang.Object

A repository of the main objects used by the programm.

It is used as a repository of the different objects created that are supposed to be used (listener registering, ...) by other objects. Provide a convenient way to give the reference of objects to an another one. Rather than explicitly pass the reference to objects needed, pass the instance. The needed references are then obtains via a name that identifies the different objects.


Constructor Summary
ObjectsRepository()
          The Constructor.
 
Method Summary
 java.lang.Object getObject(java.lang.String name)
          Gets the object with the specified name indentifier in the repository.
 java.util.Hashtable getRepository()
          Gets the repository.
 java.lang.Object putObject(java.lang.Object object, java.lang.String name)
          Puts an object with the specified name idenfier in the repository.
 java.lang.Object removeObject(java.lang.String name)
          Remove the object with the specified name identifier from the repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectsRepository

public ObjectsRepository()
The Constructor.

Method Detail

putObject

public java.lang.Object putObject(java.lang.Object object,
                                  java.lang.String name)
Puts an object with the specified name idenfier in the repository.

Parameters:
object - the object to add.
name - the name that identifies the object.

getObject

public java.lang.Object getObject(java.lang.String name)
Gets the object with the specified name indentifier in the repository.

Parameters:
name - the name that identifies the object.

removeObject

public java.lang.Object removeObject(java.lang.String name)
Remove the object with the specified name identifier from the repository.

Parameters:
name - the name that identifies the object.

getRepository

public java.util.Hashtable getRepository()
Gets the repository.



Copyright © 1999-2007 Universit?© de Nice Sophia-Antipolis, I3S, Ove SARL, DFKI and Universit?§t des Saarlandes. All Rights Reserved.