Package com.agiletec.plugins.jpfastcontentedit.aps.internalservlet.content.helper

Examples of com.agiletec.plugins.jpfastcontentedit.aps.internalservlet.content.helper.IContentActionHelper


  @Override
  public String edit() {
    String result = super.edit();
    if (SUCCESS.equals(result)) {
      IContentActionHelper helper = (IContentActionHelper) this.getContentActionHelper();
      helper.checkTypeLabels(this.getContent());
      this.disableAttributes(this.getContent());
    } else {
      ApsSystemUtils.getLogger().error("Error on super.edit - result " + result);
    }
    return result;
View Full Code Here


    boolean userAllowed = super.isUserAllowed(content);
    if (userAllowed) {
      String typeCode = this.getContentTypeCode();
      if (typeCode == null || typeCode.length() == 0 || content.getTypeCode().equals(typeCode)) {
        String username = this.getCurrentUser().getUsername();
        IContentActionHelper helper = (IContentActionHelper) this.getContentActionHelper();
        String author = helper.getAuthor(content, this.getRequest());
        return (null != author && username.equals(author)) || username.equals(content.getLastEditor());
      }
    }
    return false;
  }
View Full Code Here

  }

  public String getContentTypeCode() {
    String contentTypeCode = this._contentTypeCode;
    if (null == contentTypeCode) {
      IContentActionHelper helper = (IContentActionHelper) this.getContentActionHelper();
      contentTypeCode = helper.extractShowletParam(this.getRequest(), JpFastContentEditSystemConstants.TYPE_CODE_SHOWLET_PARAM_NAME);
      this._contentTypeCode = contentTypeCode;
    }
    return contentTypeCode;
  }
View Full Code Here

    }
    return contentTypeCode;
  }

  public void setContentTypeCode(String contentTypeCode) {
    IContentActionHelper helper = (IContentActionHelper) this.getContentActionHelper();
    String showletTypeCode = helper.extractShowletParam(this.getRequest(), JpFastContentEditSystemConstants.TYPE_CODE_SHOWLET_PARAM_NAME);
    contentTypeCode = (null==showletTypeCode) ? contentTypeCode : showletTypeCode;
    this._contentTypeCode = contentTypeCode;
  }
View Full Code Here

 
  @Override
  public String createNewVoid() {
    String result = super.createNewVoid();
    Content content = this.getContent();
    IContentActionHelper helper = (IContentActionHelper) this.getContentActionHelper();
    helper.checkTypeLabels(content);
    this.disableAttributes(content);
    String mainGroup = this.getMainGroup();
    if (null != mainGroup
        && null != this.getGroupManager().getGroup(mainGroup)
        && super.isCurrentUserMemberOf(mainGroup)) {
View Full Code Here

 
  @Override
  public String getContentTypeCode() {
    String contentTypeCode = super.getContentTypeCode();
    if (null == contentTypeCode) {
      IContentActionHelper helper = (IContentActionHelper) this.getContentActionHelper();
      contentTypeCode = helper.extractShowletParam(this.getRequest(), JpFastContentEditSystemConstants.TYPE_CODE_SHOWLET_PARAM_NAME);
      super.setContentTypeCode(contentTypeCode);
    }
    return contentTypeCode;
  }
View Full Code Here

    return contentTypeCode;
  }
 
  @Override
  public void setContentTypeCode(String contentTypeCode) {
    IContentActionHelper helper = (IContentActionHelper) this.getContentActionHelper();
    String showletTypeCode = helper.extractShowletParam(this.getRequest(), JpFastContentEditSystemConstants.TYPE_CODE_SHOWLET_PARAM_NAME);
    contentTypeCode = (null==showletTypeCode) ? contentTypeCode : showletTypeCode;
    super.setContentTypeCode(contentTypeCode);
  }
View Full Code Here

    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];
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jpfastcontentedit.aps.internalservlet.content.helper.IContentActionHelper

Copyright © 2018 www.massapicom. 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.