com.ibm.di.fc.idml
Class ItdiBookMapper

java.lang.Object
  extended by com.ibm.di.fc.idml.ItdiBookMapper

public class ItdiBookMapper
extends Object

This class is used for static sharing of IdML books.


Constructor Summary
ItdiBookMapper()
           
 
Method Summary
static ItdiBook freeBook(String bookName)
          Removes a specified book from the static mapper and returns it to the caller.
static ItdiBook getBook(String bookName)
          Returns the ItdiBook object corresponding to the given book name.
static ItdiBook getExclusiveBook(String bookName)
          If the book with the specified name is free it is returned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItdiBookMapper

public ItdiBookMapper()
Method Detail

getBook

public static ItdiBook getBook(String bookName)
Returns the ItdiBook object corresponding to the given book name. This method does not take into account if the book is exclusively locked.

Parameters:
bookName - the name of the needed book.
Returns:
the needed ItdiBook object.

getExclusiveBook

public static ItdiBook getExclusiveBook(String bookName)
                                 throws 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:
Exception - if a problem occurs.

freeBook

public static ItdiBook freeBook(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.