Package com.agiletec.aps.system

Examples of com.agiletec.aps.system.RequestContext


      this.deleteMockContentObject(contentId, modelId);
    }
  }
 
  protected void testGetRenderedContentsGroup(String contentId, long modelId, String cacheGroupId) throws Throwable {
      RequestContext reqCtx = this.getRequestContext();
    String langCode = "en";
    try {
      String groupsCsv = BaseContentDispenser.getRenderizationInfoCacheGroupsCsv(contentId, modelId);
      String renderInfoCacheKey = BaseContentDispenser.getRenderizationInfoCacheKey(contentId, modelId, langCode, reqCtx);
      assertNull(this._cacheInfoManager.getFromCache(renderInfoCacheKey));
View Full Code Here


  public int doStartTag() throws JspException {
    IMyPortalConfigManager myPortalConfigManager = (IMyPortalConfigManager) ApsWebApplicationUtils.getBean(JpmyportalplusSystemConstants.MYPORTAL_CONFIG_MANAGER, pageContext);
    HttpServletRequest req =  (HttpServletRequest) this.pageContext.getRequest();
    try {
      boolean check = false;
      RequestContext reqCtx = (RequestContext) req.getAttribute(RequestContext.REQCTX);
      Widget currentShowlet = (Widget) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_WIDGET);
      if (null != currentShowlet && null != currentShowlet.getType()) {
        String typeCode = currentShowlet.getType().getCode();
        Set<String> showletTypeCodes = myPortalConfigManager.getConfig().getAllowedShowlets();
        check = showletTypeCodes.contains(typeCode);
      }
View Full Code Here

*/
public class FrameSelectItemTag extends TagSupport {

  @Override
  public int doStartTag() throws JspException {
    RequestContext reqCtx = (RequestContext) this.pageContext.getRequest().getAttribute(RequestContext.REQCTX);
    List<FrameSelectItem> selectItems = new ArrayList<FrameSelectItem>();
    IPageUserConfigManager pageUserConfigManager = (IPageUserConfigManager) ApsWebApplicationUtils.getBean(JpmyportalplusSystemConstants.PAGE_USER_CONFIG_MANAGER, pageContext);
    try {
      Integer currentFrame = (Integer) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_FRAME);
      IPage currentPage = (IPage) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_PAGE);
      MyPortalPageModel pageModel = (MyPortalPageModel) currentPage.getModel();
      Integer currentColumnId = pageModel.getFrameConfigs()[currentFrame].getColumn();
      if (null == currentColumnId) {
        return super.doStartTag();
      }
View Full Code Here

  @Override
  public int doStartTag() throws JspException {
    ServletRequest request =  this.pageContext.getRequest();
    try {
      RequestContext reqCtx = (RequestContext) request.getAttribute(RequestContext.REQCTX);
      IPage currPage = (IPage) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_PAGE);
      String value = null;
      if (null == this.getParamName() || this.getParamName().equals(PARAM_NAME_FIRST_FRAME_ID)) {
        MyPortalPageModel model = (MyPortalPageModel) currPage.getModel();
        Frame[] frames = model.getFrameConfigs();
        for (int i = 0; i < frames.length; i++) {
View Full Code Here

      CustomPageConfig customPageConfig =
        (CustomPageConfig) req.getSession().getAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_PAGE_CONFIG);
      if (null != customPageConfig) {
        customShowletStatus = customPageConfig.getStatus();
      }
      RequestContext reqCtx = (RequestContext) req.getAttribute(RequestContext.REQCTX);
      Integer currentFrame = (Integer) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_FRAME);
      if (customShowletStatus != null) {
        int status = customShowletStatus[currentFrame] == null ? 0 : customShowletStatus[currentFrame].intValue();
        if (IPageUserConfigManager.STATUS_CLOSE == status) {
          return EVAL_BODY_INCLUDE;
        } else if (IPageUserConfigManager.STATUS_OPEN == status) {
View Full Code Here

 
  private List<CloudInfoBean> buildCloudsInfoBeans(Map<ITreeNode, Integer> occurrences) throws Throwable {
    List<CloudInfoBean> beans = new ArrayList<CloudInfoBean>();
    try {
      ServletRequest request = this.pageContext.getRequest();
      RequestContext reqCtx = (RequestContext) request.getAttribute(RequestContext.REQCTX);
      Lang currentLang = (Lang) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_LANG);
      int[] minMax = this.extractMinMax(occurrences);
      int interval = (minMax[1] - minMax[0]);
      double delta = ((double)interval)/9d;
      Iterator<ITreeNode> iter = occurrences.keySet().iterator();
      while (iter.hasNext()) {
View Full Code Here

  }
  @Override
  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>();
View Full Code Here

*/
public class EventsOfDayTag extends TagSupport implements EventsOfDayDataBean {
 
  @Override
  public int doStartTag() throws JspException {
    RequestContext reqCtx = (RequestContext) this.pageContext.getRequest().getAttribute(RequestContext.REQCTX);
    ApsSystemUtils.getLogger().trace("EventsOfDayTag Invoked");
    try {
      this._calMan = (ICalendarManager) ApsWebApplicationUtils.getBean(CalendarConstants.CALENDAR_MANAGER, this.pageContext);
      IAuthorizationManager authorizatorManager = (IAuthorizationManager)
          ApsWebApplicationUtils.getBean(SystemConstants.AUTHORIZATION_SERVICE, this.pageContext);
      this.extractRequiredDate();
      UserDetails currentUser = (UserDetails) reqCtx.getRequest().getSession().getAttribute(SystemConstants.SESSIONPARAM_CURRENT_USER);
      if (authorizatorManager.isAuthOnGroup(currentUser, Group.ADMINS_GROUP_NAME)) {
        this.setAllowedGroups(null);
      } else {
        List<Group> userGroups = authorizatorManager.getUserGroups(currentUser);
        Set allowedGroup = new HashSet();
View Full Code Here

TOP

Related Classes of com.agiletec.aps.system.RequestContext

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.