Examples of IContentListWidgetHelper


Examples of com.agiletec.plugins.jacms.aps.system.services.content.widget.IContentListWidgetHelper

  public int doStartTag() throws JspException {
    HttpSession session = this.pageContext.getSession();
    ServletRequest request =  this.pageContext.getRequest();
    RequestContext reqCtx = (RequestContext) request.getAttribute(RequestContext.REQCTX);
    UserDetails currentUser = (UserDetails) session.getAttribute(SystemConstants.SESSIONPARAM_CURRENT_USER);
    IContentListWidgetHelper contentListHelper = (IContentListWidgetHelper) ApsWebApplicationUtils.getBean(JacmsSystemConstants.CONTENT_LIST_HELPER, this.pageContext);
    IContentActionHelper helper = (IContentActionHelper) ApsWebApplicationUtils.getBean(JpFastContentEditSystemConstants.FRONT_CONTENT_ACTION_HELPER, this.pageContext);
    try {
      Set<String> contentIds = new HashSet<String>();
      String authorAttributeName = helper.getAuthorAttributeName((HttpServletRequest) request);
      if (null != authorAttributeName && authorAttributeName.trim().length() > 0) {
        EntitySearchFilter authorFilter = new EntitySearchFilter(authorAttributeName, true, currentUser.getUsername(), false);
        this.addFilter(authorFilter);
        contentIds.addAll(contentListHelper.getContentsId(this, reqCtx));
        this._filters = new EntitySearchFilter[0];
      }
      EntitySearchFilter lastEditorFilter = new EntitySearchFilter(IContentManager.CONTENT_LAST_EDITOR_FILTER_KEY, false, currentUser.getUsername(), false);
      this.addFilter(lastEditorFilter);
      contentIds.addAll(contentListHelper.getContentsId(this, reqCtx));
                        this.pageContext.setAttribute(this.getVar(), contentIds);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "doStartTag");
      throw new JspException("Error during tag initialization ", t);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.