use of org.b3log.latke.repository.RepositoryException in project solo by b3log.
the class StatisticMgmtService method decPublishedBlogCommentCount.
/**
* Blog statistic comment(published article) count -1.
*
* @throws JSONException json exception
* @throws RepositoryException repository exception
*/
public void decPublishedBlogCommentCount() throws JSONException, RepositoryException {
final JSONObject statistic = statisticRepository.get(Statistic.STATISTIC);
if (null == statistic) {
throw new RepositoryException("Not found statistic");
}
statistic.put(Statistic.STATISTIC_PUBLISHED_BLOG_COMMENT_COUNT, statistic.getInt(Statistic.STATISTIC_PUBLISHED_BLOG_COMMENT_COUNT) - 1);
statisticRepository.update(Statistic.STATISTIC, statistic);
}
use of org.b3log.latke.repository.RepositoryException in project solo by b3log.
the class StatisticMgmtService method decBlogArticleCount.
/**
* Blog statistic article count -1.
*
* @throws JSONException json exception
* @throws RepositoryException repository exception
*/
public void decBlogArticleCount() throws JSONException, RepositoryException {
final JSONObject statistic = statisticRepository.get(Statistic.STATISTIC);
if (null == statistic) {
throw new RepositoryException("Not found statistic");
}
statistic.put(Statistic.STATISTIC_BLOG_ARTICLE_COUNT, statistic.getInt(Statistic.STATISTIC_BLOG_ARTICLE_COUNT) - 1);
statisticRepository.update(Statistic.STATISTIC, statistic);
}
use of org.b3log.latke.repository.RepositoryException in project solo by b3log.
the class StatisticMgmtService method incPublishedBlogCommentCount.
/**
* Blog statistic comment(published article) count +1.
*
* @throws JSONException json exception
* @throws RepositoryException repository exception
*/
public void incPublishedBlogCommentCount() throws JSONException, RepositoryException {
final JSONObject statistic = statisticRepository.get(Statistic.STATISTIC);
if (null == statistic) {
throw new RepositoryException("Not found statistic");
}
statistic.put(Statistic.STATISTIC_PUBLISHED_BLOG_COMMENT_COUNT, statistic.getInt(Statistic.STATISTIC_PUBLISHED_BLOG_COMMENT_COUNT) + 1);
statisticRepository.update(Statistic.STATISTIC, statistic);
}
use of org.b3log.latke.repository.RepositoryException in project solo by b3log.
the class StatisticMgmtService method decBlogCommentCount.
/**
* Blog statistic comment count -1.
*
* @throws JSONException json exception
* @throws RepositoryException repository exception
*/
public void decBlogCommentCount() throws JSONException, RepositoryException {
final JSONObject statistic = statisticRepository.get(Statistic.STATISTIC);
if (null == statistic) {
throw new RepositoryException("Not found statistic");
}
statistic.put(Statistic.STATISTIC_BLOG_COMMENT_COUNT, statistic.getInt(Statistic.STATISTIC_BLOG_COMMENT_COUNT) - 1);
statisticRepository.update(Statistic.STATISTIC, statistic);
}
use of org.b3log.latke.repository.RepositoryException in project solo by b3log.
the class StatisticMgmtService method incBlogCommentCount.
/**
* Blog statistic comment count +1.
*
* @throws JSONException json exception
* @throws RepositoryException repository exception
*/
public void incBlogCommentCount() throws JSONException, RepositoryException {
final JSONObject statistic = statisticRepository.get(Statistic.STATISTIC);
if (null == statistic) {
throw new RepositoryException("Not found statistic");
}
statistic.put(Statistic.STATISTIC_BLOG_COMMENT_COUNT, statistic.getInt(Statistic.STATISTIC_BLOG_COMMENT_COUNT) + 1);
statisticRepository.update(Statistic.STATISTIC, statistic);
}
Aggregations