com.ibm.di.fc.itregistry
Class ITRegistryBookMapper

java.lang.Object
  extended by com.ibm.di.fc.itregistry.ITRegistryBookMapper

public class ITRegistryBookMapper
extends java.lang.Object

This class is used for static sharing of IT registry books.


Constructor Summary
ITRegistryBookMapper()
           
 
Method Summary
static ITRegistryBook freeBook(java.lang.String bookName)
          Removes a specified book from the static mapper and returns it to the caller.
static ITRegistryBook getBook(java.lang.String name)
          Returns an IT registry book from the mapper.
static ITRegistryBook getExclusiveBook(java.lang.String bookName)
          If the book with the specified name is free it is returned.
static void setBook(java.lang.String name, ITRegistryBook book)
          Set an IT registry book in the mapper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ITRegistryBookMapper

public ITRegistryBookMapper()
Method Detail

getBook

public static ITRegistryBook getBook(java.lang.String name)
Returns an IT registry book from the mapper.

Parameters:
the - name of the book.
Returns:
the book.

setBook

public static void setBook(java.lang.String name,
                           ITRegistryBook book)
Set an IT registry book in the mapper.

Parameters:
name - name to be used as key.
book - the book.

getExclusiveBook

public static ITRegistryBook getExclusiveBook(java.lang.String bookName)
                                       throws java.lang.Exception
If the book with the specified name is free it is returned. Otherwise an exception is thrown. If such a book does not exist at all it is created and passed to the caller.

Parameters:
bookName - the book name which we want exclusively.
Returns:
the requested book object.
Throws:
java.lang.Exception - if a problem occurs.

freeBook

public static ITRegistryBook freeBook(java.lang.String bookName)
Removes a specified book from the static mapper and returns it to the caller.

Parameters:
bookName - the name of the book to remove.
Returns:
the removed ItdiBook.