Package org.b3log.latke.service

Examples of org.b3log.latke.service.ServiceException


    public JSONObject getAdmin() throws ServiceException {
        try {
            return userRepository.getAdmin();
        } catch (final RepositoryException e) {
            LOGGER.log(Level.SEVERE, "Gets admin failed", e);
            throw new ServiceException(e);
        }
    }
View Full Code Here


    public JSONObject getUserByEmail(final String email) throws ServiceException {
        try {
            return userRepository.getByEmail(email);
        } catch (final RepositoryException e) {
            LOGGER.log(Level.SEVERE, "Gets user by email[" + email + "] failed", e);
            throw new ServiceException(e);
        }
    }
View Full Code Here

        try {
            result = userRepository.get(query);
        } catch (final RepositoryException e) {
            LOGGER.log(Level.SEVERE, "Gets users failed", e);

            throw new ServiceException(e);
        }

        final int pageCount = result.optJSONObject(Pagination.PAGINATION).
                optInt(Pagination.PAGINATION_PAGE_COUNT);
View Full Code Here

        JSONObject user = null;
        try {
            user = userRepository.get(userId);
        } catch (final RepositoryException e) {
            LOGGER.log(Level.SEVERE, "Gets a user failed", e);
            throw new ServiceException(e);
        }

        if (null == user) {
            return null;
        }
View Full Code Here

                transaction.rollback();
            }

            LOGGER.log(Level.SEVERE, "Cancels publish article failed", e);

            throw new ServiceException(e);
        }
    }
View Full Code Here

            if (transaction.isActive()) {
                transaction.rollback();
            }

            LOGGER.log(Level.SEVERE, "Can't put the article[oId{0}] to top", articleId);
            throw new ServiceException(e);
        }
    }
View Full Code Here

                transaction.rollback();
            }

            LOGGER.log(Level.SEVERE, "Updates an article failed", e);

            throw new ServiceException(e.getMessage());
        }
    }
View Full Code Here

        } catch (final Exception e) {
            if (transaction.isActive()) {
                transaction.rollback();
            }

            throw new ServiceException(e);
        }
    }
View Full Code Here

            article.remove(Common.POST_TO_COMMUNITY);
        } catch (final RepositoryException e) {
            LOGGER.log(Level.SEVERE, "Adds an article failed", e);

            throw new ServiceException(e);
        } catch (final EventException e) {
            LOGGER.log(Level.WARNING, "Adds an article event process failed", e);
        }

        return ret;
View Full Code Here

            if (transaction.isActive()) {
                transaction.rollback();
            }

            LOGGER.log(Level.SEVERE, "Removes an article[id=" + articleId + "] failed", e);
            throw new ServiceException(e);
        }

        LOGGER.log(Level.FINER, "Removed an article[id={0}]", articleId);
    }
View Full Code Here

TOP

Related Classes of org.b3log.latke.service.ServiceException

Copyright © 2018 www.massapicom. 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.