Package org.b3log.latke.action

Examples of org.b3log.latke.action.ActionException


        } catch (final Exception e) {
            if (transaction.isActive()) {
                transaction.rollback();
            }
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            throw new ActionException(e);
        }

        PageCaches.removeAll();

        return ret;
View Full Code Here


            filler.fillBlogHeader(ret, preference);
            filler.fillBlogFooter(ret, preference);
        } catch (final Exception e) {
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            throw new ActionException(e);
        }

        return ret;
    }
View Full Code Here

        } catch (final Exception e) {
            if (transaction.isActive()) {
                transaction.rollback();
            }
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            throw new ActionException(e);
        }

        return ret;
    }
View Full Code Here

            try {
                ret.put(Keys.STATUS_CODE, false);
            } catch (final JSONException ex) {
                LOGGER.log(Level.SEVERE, ex.getMessage(), ex);

                throw new ActionException(ex);
            }
        }

        return ret;
    }
View Full Code Here

        } catch (final Exception e) {
            if (transaction.isActive()) {
                transaction.rollback();
            }
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            throw new ActionException(e);
        }

        return ret;
    }
View Full Code Here

     */
    public List<JSONObject> getRandomArticles() throws ActionException {
        try {
            final JSONObject preference = preferenceUtils.getPreference();
            if (null == preference) {
                throw new ActionException("Not found preference");
            }

            final int displayCnt =
                    preference.getInt(Preference.RANDOM_ARTICLES_DISPLAY_CNT);
            final List<JSONObject> ret =
                    articleRepository.getRandomly(displayCnt);

            // Remove unused properties
            for (final JSONObject article : ret) {
                article.remove(Keys.OBJECT_ID);
                article.remove(ARTICLE_AUTHOR_EMAIL);
                article.remove(ARTICLE_ABSTRACT);
                article.remove(ARTICLE_COMMENT_COUNT);
                article.remove(ARTICLE_CONTENT);
                article.remove(ARTICLE_CREATE_DATE);
                article.remove(ARTICLE_TAGS_REF);
                article.remove(ARTICLE_UPDATE_DATE);
                article.remove(ARTICLE_VIEW_COUNT);
                article.remove(ARTICLE_RANDOM_DOUBLE);
            }

            return ret;
        } catch (final Exception e) {
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            throw new ActionException(e);
        }
    }
View Full Code Here

                timeZoneIdOptions.append(option);
            }
            ret.put("timeZoneIdOptions", timeZoneIdOptions.toString());
        } catch (final Exception e) {
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            throw new ActionException("Language model fill error");
        }

        return ret;
    }
View Full Code Here

        } catch (final Exception e) {
            if (transaction.isActive()) {
                transaction.rollback();
            }
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            throw new ActionException(e);
        }

        return ret;
    }
View Full Code Here

                }
            }
            ret.put(ErrorPage.ERROR_PAGE_CAUSE, cause);
        } catch (final Exception e) {
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            throw new ActionException(e);
        }

        return ret;
    }
View Full Code Here

            filler.fillSide(ret, preference);
            filler.fillBlogHeader(ret, preference);
            filler.fillBlogFooter(ret, preference);
        } catch (final Exception e) {
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            throw new ActionException(e);
        }

        return ret;
    }
View Full Code Here

TOP

Related Classes of org.b3log.latke.action.ActionException

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.