public static ProcessContext addMentioners(ExoSocialActivity activity, String[] mentioners) { // StreamProcessContext processCtx = StreamProcessContext.getIntance( StreamProcessContext.UPDATE_ACTIVITY_MENTIONER_PROCESS, ctx); processCtx.activity(activity).mentioners(mentioners); try { processCtx.getTraceElement().start(); ctx.getServiceExecutor().async(StreamProcessorFactory.addMentioners(), processCtx); processCtx.getTraceElement().end(); } finally { LOG.debug(processCtx.getTraceLog()); } return processCtx; }
// (parentActivity, mentioners, commenters); public static ProcessContext deleteComment( ExoSocialActivity activity, String[] mentioners, String[] commenters) { // SocialServiceContext ctx = SocialServiceContextImpl.getInstance(); StreamProcessContext processCtx = StreamProcessContext.getIntance(StreamProcessContext.DELETE_COMMENT_PROCESS, ctx); processCtx.activity(activity).mentioners(mentioners).commenters(commenters); try { // beforeAsync(); //this point can make the problem with ADD_PROPERTY exception // ctx.getServiceExecutor().execute(StreamProcessorFactory.deleteCommentStream(), processCtx); } finally { LOG.debug(processCtx.getTraceLog()); } return processCtx; }
public static ProcessContext update(ExoSocialActivity activity, long oldUpdated) { // StreamProcessContext processCtx = StreamProcessContext.getIntance(StreamProcessContext.UPDATE_ACTIVITY_PROCESS, ctx); processCtx.activity(activity).oldLastUpdated(oldUpdated); try { if (ctx.isAsync()) { processCtx.getTraceElement().start(); beforeAsync(); ctx.getServiceExecutor().async(StreamProcessorFactory.updateStream(), processCtx); processCtx.getTraceElement().end(); } else { ctx.getServiceExecutor().execute(StreamProcessorFactory.updateStream(), processCtx); } } finally { LOG.debug(processCtx.getTraceLog()); } return processCtx; }
public static ProcessContext updateHidable( Identity owner, ActivityEntity entity, ExoSocialActivity activity) { // StreamProcessContext processCtx = StreamProcessContext.getIntance(StreamProcessContext.UPDATE_ACTIVITY_REF, ctx); processCtx.activity(activity).mentioners(entity.getMentioners()).identity(owner); try { if (ctx.isAsync()) { beforeAsync(); ctx.getServiceExecutor().async(StreamProcessorFactory.updateHidable(), processCtx); } else { ctx.getServiceExecutor().execute(StreamProcessorFactory.updateHidable(), processCtx); } } finally { if (ctx.isTraced()) { LOG.debug(processCtx.getTraceLog()); } } return processCtx; }