Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.example.bookstore
Class CatalogServiceImpl

    java.lang.Object
      org.mule.example.bookstore.CatalogServiceImpl

All Implemented Interfaces:
  Initialisable, CatalogAdminService, CatalogService

    public class CatalogServiceImpl

extends Object
implements CatalogService, CatalogAdminService, Initialisable

Bookstore catalog service which implements both the public interface for browsing the catalog and the admin interface for adding books to the catalog.

See Also:
  `CatalogService`, `CatalogAdminService`

Field Summary

Fields inherited from interface org.mule.example.bookstore.CatalogService
`URL`

Fields inherited from interface org.mule.api.lifecycle.Initialisable
`PHASE_NAME`

Constructor Summary
`CatalogServiceImpl()`

Method Summary
`long` | `addBook(Book book)` Add a new book to the catalog
`Collection<Long>` | `addBooks(Collection<Book> booksToAdd)` Add a group of new books to the catalog
`Book` | `getBook(long bookId)` Look up the details for a particular book by ID
`Collection<Book>` | `getBooks()` Return a collection of all books in the catalog
`void` | `initialise()` Method used to perform any initialisation work.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CatalogServiceImpl

    public CatalogServiceImpl()

Method Detail

### initialise

    public void initialise()
                    throws InitialisationException

  Description copied from interface: `Initialisable`
  Method used to perform any initialisation work. If a fatal error occurs during initialisation an `InitialisationException` should be thrown, causing the Mule instance to shutdown. If the error is recoverable, say by retrying to connect, a `RecoverableException` should be thrown. There is no guarantee that by throwing a Recoverable exception that the Mule instance will not shut down.

  Specified by:
    `initialise` in interface `Initialisable`
  Throws:
    `InitialisationException` - if a fatal error occurs causing the Mule instance to shutdown
    `RecoverableException` - if an error occurs that can be recovered from

### addBook

    public long addBook(Book book)

  Description copied from interface: `CatalogAdminService`
  Add a new book to the catalog

  Specified by:
    `addBook` in interface `CatalogAdminService`

### addBooks

    public Collection<Long> addBooks(Collection<Book> booksToAdd)

  Description copied from interface: `CatalogAdminService`
  Add a group of new books to the catalog

  Specified by:
    `addBooks` in interface `CatalogAdminService`

### getBooks

    public Collection<Book> getBooks()

  Description copied from interface: `CatalogService`
  Return a collection of all books in the catalog

  Specified by:
    `getBooks` in interface `CatalogService`

### getBook

    public Book getBook(long bookId)

  Description copied from interface: `CatalogService`
  Look up the details for a particular book by ID

  Specified by:
    `getBook` in interface `CatalogService`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.