use of org.entando.entando.aps.system.services.actionlog.IActionLogManager in project entando-core by entando.
the class ActivityStreamLastUpdateTag method doEndTag.
@Override
public int doEndTag() throws JspException {
HttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest();
try {
IActionLogManager loggerManager = (IActionLogManager) ApsWebApplicationUtils.getBean(SystemConstants.ACTION_LOGGER_MANAGER, this.pageContext);
UserDetails currentUser = (UserDetails) request.getSession().getAttribute(SystemConstants.SESSIONPARAM_CURRENT_USER);
Date lastUpdate = loggerManager.lastUpdateDate(currentUser);
if (null != this.getVar()) {
ValueStack stack = this.getStack();
stack.getContext().put(this.getVar(), lastUpdate);
stack.setValue("#attr['" + this.getVar() + "']", lastUpdate, false);
}
} catch (Throwable t) {
_logger.error("Error on doStartTag", t);
throw new JspException("Error on doStartTag", t);
}
return super.doEndTag();
}
use of org.entando.entando.aps.system.services.actionlog.IActionLogManager in project entando-core by entando.
the class ActivityStreamTag method doEndTag.
@Override
public int doEndTag() throws JspException {
HttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest();
try {
IActionLogManager loggerManager = (IActionLogManager) ApsWebApplicationUtils.getBean(SystemConstants.ACTION_LOGGER_MANAGER, this.pageContext);
UserDetails currentUser = (UserDetails) request.getSession().getAttribute(SystemConstants.SESSIONPARAM_CURRENT_USER);
List<Integer> ids = loggerManager.getActivityStream(currentUser);
if (null != this.getVar()) {
ValueStack stack = this.getStack();
stack.getContext().put(this.getVar(), ids);
stack.setValue("#attr['" + this.getVar() + "']", ids, false);
}
} catch (Throwable t) {
_logger.error("Error on doStartTag", t);
// ApsSystemUtils.logThrowable(t, this, "doStartTag");
throw new JspException("Error on doStartTag", t);
}
return super.doEndTag();
}
Aggregations