use of org.b3log.latke.repository.annotation.Transactional in project symphony by b3log.
the class NotificationMgmtService method addArticleVoteUpNotification.
/**
* Adds a 'article vote up' type notification with the specified request json object.
*
* @param requestJSONObject the specified request json object, for example,
* "userId": "",
* "dataId": "" // article id-vote user id
* @throws ServiceException service exception
*/
@Transactional
public void addArticleVoteUpNotification(final JSONObject requestJSONObject) throws ServiceException {
try {
requestJSONObject.put(Notification.NOTIFICATION_DATA_TYPE, Notification.DATA_TYPE_C_ARTICLE_VOTE_UP);
addNotification(requestJSONObject);
} catch (final RepositoryException e) {
final String msg = "Adds notification [type=article_vote_up] failed";
LOGGER.log(Level.ERROR, msg, e);
throw new ServiceException(msg);
}
}
use of org.b3log.latke.repository.annotation.Transactional in project symphony by b3log.
the class NotificationMgmtService method addCommentVoteUpNotification.
/**
* Adds a 'comment vote up' type notification with the specified request json object.
*
* @param requestJSONObject the specified request json object, for example,
* "userId": "",
* "dataId": "" // comment id-vote user id
* @throws ServiceException service exception
*/
@Transactional
public void addCommentVoteUpNotification(final JSONObject requestJSONObject) throws ServiceException {
try {
requestJSONObject.put(Notification.NOTIFICATION_DATA_TYPE, Notification.DATA_TYPE_C_COMMENT_VOTE_UP);
addNotification(requestJSONObject);
} catch (final RepositoryException e) {
final String msg = "Adds notification [type=comment_vote_up] failed";
LOGGER.log(Level.ERROR, msg, e);
throw new ServiceException(msg);
}
}
use of org.b3log.latke.repository.annotation.Transactional in project symphony by b3log.
the class NotificationMgmtService method addArticleThankNotification.
/**
* Adds a 'article thank' type notification with the specified request json object.
*
* @param requestJSONObject the specified request json object, for example,
* "userId"; "",
* "dataId": "" // thank id
* @throws ServiceException service exception
*/
@Transactional
public void addArticleThankNotification(final JSONObject requestJSONObject) throws ServiceException {
try {
requestJSONObject.put(Notification.NOTIFICATION_DATA_TYPE, Notification.DATA_TYPE_C_POINT_ARTICLE_THANK);
addNotification(requestJSONObject);
} catch (final RepositoryException e) {
final String msg = "Adds notification [type=article_thank] failed";
LOGGER.log(Level.ERROR, msg, e);
throw new ServiceException(msg);
}
}
use of org.b3log.latke.repository.annotation.Transactional in project symphony by b3log.
the class NotificationMgmtService method addArticleVoteDownNotification.
/**
* Adds a 'article vote down' type notification with the specified request json object.
*
* @param requestJSONObject the specified request json object, for example,
* "userId": "",
* "dataId": "" // article id-vote user id
* @throws ServiceException service exception
*/
@Transactional
public void addArticleVoteDownNotification(final JSONObject requestJSONObject) throws ServiceException {
try {
requestJSONObject.put(Notification.NOTIFICATION_DATA_TYPE, Notification.DATA_TYPE_C_ARTICLE_VOTE_DOWN);
addNotification(requestJSONObject);
} catch (final RepositoryException e) {
final String msg = "Adds notification [type=article_vote_down] failed";
LOGGER.log(Level.ERROR, msg, e);
throw new ServiceException(msg);
}
}
use of org.b3log.latke.repository.annotation.Transactional in project symphony by b3log.
the class NotificationMgmtService method addAtNotification.
/**
* Adds a 'at' type notification with the specified request json object.
*
* @param requestJSONObject the specified request json object, for example,
* "userId"; "",
* "dataId": ""
* @throws ServiceException service exception
*/
@Transactional
public void addAtNotification(final JSONObject requestJSONObject) throws ServiceException {
try {
requestJSONObject.put(Notification.NOTIFICATION_DATA_TYPE, Notification.DATA_TYPE_C_AT);
addNotification(requestJSONObject);
} catch (final RepositoryException e) {
final String msg = "Adds notification [type=at] failed";
LOGGER.log(Level.ERROR, msg, e);
throw new ServiceException(msg);
}
}
Aggregations