Examples of BookList


Examples of sample.servicelifecycle.bean.BookList

    }

    public void shutDown(ConfigurationContext configctx,
                         AxisService service) {
        try {
            BookList availableBookList = (BookList) service.getParameterValue(LibraryConstants.AVAILABLE_BOOK);
            BookList allBookList = (BookList) service.getParameterValue(LibraryConstants.ALL_BOOK);
            BookList lendBookList = (BookList) service.getParameterValue(LibraryConstants.LEND_BOOK);
            UserList userList = (UserList) service.getParameterValue(LibraryConstants.USER_LIST);
            OMFactory fac = OMAbstractFactory.getOMFactory();
            OMElement libElement = fac.createOMElement("library", null);
            Book[] bookList = allBookList.getBookList();
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.ALL_BOOK),
                    bookList, new QName("book"), false, null));
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.AVAILABLE_BOOK),
                    availableBookList.getBookList(), new QName("book"), false, null));
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.LEND_BOOK),
                    lendBookList.getBookList(), new QName("book"), false, null));

            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.USER_LIST),
                    userList.getUsers(), new QName("user"), false, null));
View Full Code Here

Examples of sample.servicelifecycle.bean.BookList

            log.info(e);
        }
    }

    private void processOmelemnt(OMElement element, AxisService service, boolean fileFound) throws AxisFault {
        BookList allBookList = new BookList(LibraryConstants.ALL_BOOK);
        OMElement bookEle = element.getFirstChildWithName(new QName(LibraryConstants.ALL_BOOK));
        Iterator book_itr = bookEle.getChildren();
        while (book_itr.hasNext()) {
            Object obj = book_itr.next();
            if (obj instanceof OMElement) {
                OMElement omElement = (OMElement) obj;
                allBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
            }
        }

        BookList availableBookList = new BookList(LibraryConstants.AVAILABLE_BOOK);
        OMElement avaliableBooksEle =
                element.getFirstChildWithName(new QName(LibraryConstants.AVAILABLE_BOOK));
        if (avaliableBooksEle != null) {
            Iterator available_book_itr = avaliableBooksEle.getChildren();
            while (available_book_itr.hasNext()) {
                Object obj = available_book_itr.next();
                if (obj instanceof OMElement) {
                    OMElement omElement = (OMElement) obj;
                    availableBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
                }

            }
        }


        BookList lendBookList = new BookList(LibraryConstants.LEND_BOOK);
        OMElement lendBooksEle =
                element.getFirstChildWithName(new QName(LibraryConstants.LEND_BOOK));
        if (lendBooksEle != null) {
            Iterator lend_book_itr = lendBooksEle.getChildren();
            while (lend_book_itr.hasNext()) {
                Object obj = lend_book_itr.next();
                if (obj instanceof OMElement) {
                    OMElement omElement = (OMElement) obj;
                    lendBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
                }
            }
        }
        UserList users = new UserList();
        OMElement usersEle =
View Full Code Here

Examples of sample.servicelifecycle.bean.BookList

    }

    public void shutDown(ConfigurationContext configctx,
                         AxisService service) {
        try {
            BookList availableBookList = (BookList) service.getParameterValue(LibraryConstants.AVAILABLE_BOOK);
            BookList allBookList = (BookList) service.getParameterValue(LibraryConstants.ALL_BOOK);
            BookList lendBookList = (BookList) service.getParameterValue(LibraryConstants.LEND_BOOK);
            UserList userList = (UserList) service.getParameterValue(LibraryConstants.USER_LIST);
            OMFactory fac = OMAbstractFactory.getOMFactory();
            OMElement libElement = fac.createOMElement("library", null);
            Book[] bookList = allBookList.getBookList();
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.ALL_BOOK),
                    bookList, new QName("book"), false, null));
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.AVAILABLE_BOOK),
                    availableBookList.getBookList(), new QName("book"), false, null));
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.LEND_BOOK),
                    lendBookList.getBookList(), new QName("book"), false, null));

            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.USER_LIST),
                    userList.getUsers(), new QName("user"), false, null));
View Full Code Here

Examples of sample.servicelifecycle.bean.BookList

            log.info(e);
        }
    }

    private void processOmelemnt(OMElement element, AxisService service, boolean fileFound) throws AxisFault {
        BookList allBookList = new BookList(LibraryConstants.ALL_BOOK);
        OMElement bookEle = element.getFirstChildWithName(new QName(LibraryConstants.ALL_BOOK));
        Iterator book_itr = bookEle.getChildren();
        while (book_itr.hasNext()) {
            Object obj = book_itr.next();
            if (obj instanceof OMElement) {
                OMElement omElement = (OMElement) obj;
                allBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
            }
        }

        BookList availableBookList = new BookList(LibraryConstants.AVAILABLE_BOOK);
        OMElement avaliableBooksEle =
                element.getFirstChildWithName(new QName(LibraryConstants.AVAILABLE_BOOK));
        if (avaliableBooksEle != null) {
            Iterator available_book_itr = avaliableBooksEle.getChildren();
            while (available_book_itr.hasNext()) {
                Object obj = available_book_itr.next();
                if (obj instanceof OMElement) {
                    OMElement omElement = (OMElement) obj;
                    availableBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
                }

            }
        }


        BookList lendBookList = new BookList(LibraryConstants.LEND_BOOK);
        OMElement lendBooksEle =
                element.getFirstChildWithName(new QName(LibraryConstants.LEND_BOOK));
        if (lendBooksEle != null) {
            Iterator lend_book_itr = lendBooksEle.getChildren();
            while (lend_book_itr.hasNext()) {
                Object obj = lend_book_itr.next();
                if (obj instanceof OMElement) {
                    OMElement omElement = (OMElement) obj;
                    lendBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
                }
            }
        }
        UserList users = new UserList();
        OMElement usersEle =
View Full Code Here

Examples of talend.camel.examples.jaxrsjmshttp.common.BookList

        System.out.println("It is the HTTP Request");
      }
    }
   
    public BookList listBooks() {
        BookList bookList = new BookList();
        bookList.setBook((Book[])books.values().toArray(new Book[]{}));
        return bookList;
    }
View Full Code Here

Examples of talend.camel.examples.jaxrsjmshttp.common.BookList

        Book book = bookStore.getBook(123L);
        System.out.println(book);
        bookStore.addBook(new Book("The Lord of the Rings", 22353L));
        Book book2 = bookStore.getBook(22353L);
        System.out.println(book2);
        BookList books = bookStore.listBooks();
        System.out.println(books.getBook());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.