use of org.b3log.latke.repository.annotation.Transactional in project symphony by b3log.
the class NotificationMgmtService method addFollowingArticleCommentNotification.
/**
* Adds a 'following - article comment' type notification with the specified request json object.
*
* @param requestJSONObject the specified request json object, for example,
* "userId"; "",
* "dataId": "" // comment id
* @throws ServiceException service exception
*/
@Transactional
public void addFollowingArticleCommentNotification(final JSONObject requestJSONObject) throws ServiceException {
try {
requestJSONObject.put(Notification.NOTIFICATION_DATA_TYPE, Notification.DATA_TYPE_C_FOLLOWING_ARTICLE_COMMENT);
addNotification(requestJSONObject);
} catch (final RepositoryException e) {
final String msg = "Adds notification [type=following_article_comment] 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 addPointChargeNotification.
/**
* Adds a 'point charge' type notification with the specified request json object.
*
* @param requestJSONObject the specified request json object, for example,
* "userId"; "",
* "dataId": "" // transfer record id
* @throws ServiceException service exception
*/
@Transactional
public void addPointChargeNotification(final JSONObject requestJSONObject) throws ServiceException {
try {
requestJSONObject.put(Notification.NOTIFICATION_DATA_TYPE, Notification.DATA_TYPE_C_POINT_CHARGE);
addNotification(requestJSONObject);
} catch (final RepositoryException e) {
final String msg = "Adds notification [type=point_charge] 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 addReplyNotification.
/**
* Adds a 'reply' 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 addReplyNotification(final JSONObject requestJSONObject) throws ServiceException {
try {
requestJSONObject.put(Notification.NOTIFICATION_DATA_TYPE, Notification.DATA_TYPE_C_REPLY);
addNotification(requestJSONObject);
} catch (final RepositoryException e) {
final String msg = "Adds notification [type=reply] 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 addFollowingUserNotification.
/**
* Adds a 'following - user' type notification with the specified request json object.
*
* @param requestJSONObject the specified request json object, for example,
* "userId"; "",
* "dataId": "" // article id
* @throws ServiceException service exception
*/
@Transactional
public void addFollowingUserNotification(final JSONObject requestJSONObject) throws ServiceException {
try {
requestJSONObject.put(Notification.NOTIFICATION_DATA_TYPE, Notification.DATA_TYPE_C_FOLLOWING_USER);
addNotification(requestJSONObject);
} catch (final RepositoryException e) {
final String msg = "Adds notification [type=following_user] 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 addPointTransferNotification.
/**
* Adds a 'point transfer' type notification with the specified request json object.
*
* @param requestJSONObject the specified request json object, for example,
* "userId"; "",
* "dataId": "" // transfer record id
* @throws ServiceException service exception
*/
@Transactional
public void addPointTransferNotification(final JSONObject requestJSONObject) throws ServiceException {
try {
requestJSONObject.put(Notification.NOTIFICATION_DATA_TYPE, Notification.DATA_TYPE_C_POINT_TRANSFER);
addNotification(requestJSONObject);
} catch (final RepositoryException e) {
final String msg = "Adds notification [type=point_transfer] failed";
LOGGER.log(Level.ERROR, msg, e);
throw new ServiceException(msg);
}
}
Aggregations