org.exoplatform.services.ws.rest.samples
Class BookStorage

java.lang.Object
  extended by org.exoplatform.services.ws.rest.samples.BookStorage

public class BookStorage
extends java.lang.Object

Simple service for REST demo.

Version:
$Id: $
Author:
Andrey Parfonov

Constructor Summary
BookStorage()
          Construct new instance of BookStorage.
 
Method Summary
 void addBook(java.lang.String key, Book book)
          Add new Book in storage.
 Book getBook(java.lang.String key)
          Get Book with specified key.
 int numberOfBooks()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BookStorage

public BookStorage()
Construct new instance of BookStorage.

Method Detail

getBook

public Book getBook(java.lang.String key)
Get Book with specified key.

Parameters:
key - the key.
Returns:
Book.

addBook

public void addBook(java.lang.String key,
                    Book book)
Add new Book in storage.

Parameters:
key - the key.
book - the book.

numberOfBooks

public int numberOfBooks()
Returns:
BookStorage size.


Copyright © 2011 eXo Platform SAS. All Rights Reserved.