Package com.agiletec.plugins.jacms.aps.system.services.resource.model

Examples of com.agiletec.plugins.jacms.aps.system.services.resource.model.ImageResource


  public String getSurveyImageURL(String surveyImageId, String dimension) {
    String URL = null;
    try {
      if (null == surveyImageId) return null;
      if (null == dimension) dimension = "0";
      ImageResource image = (ImageResource) this.getResourceManager().loadResource(surveyImageId);
      if (null != image) {
        URL = image.getImagePath(dimension);
      }
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getSurveyImageURL");
      throw new RuntimeException("Error loading the image for the survey", t);
    }
View Full Code Here


        this._preferredLang = defaultLang;
      }
      this.pageContext.setAttribute(this.getCtxName(), survey);
      // fetch image
      if (null != this.getCtxImageUrl() && null != survey.getImageId()) {
        ImageResource resource = (ImageResource) resourceManager.loadResource(survey.getImageId());
        if (null != this.getImageDimension() && null != resource.getImagePath(this.getImageDimension())) {
          this.pageContext.setAttribute(this.getCtxImageUrl(), resource.getImagePath(this.getImageDimension()));
        } else {
          this.pageContext.setAttribute(this.getCtxImageUrl(), resource.getImagePath("0"));
        }
      }
      if (null != this.getVotedParamName()) {
        boolean voted = CheckVotingUtil.isSurveyVoted(survey, (HttpServletRequest) this.pageContext.getRequest());
        this.pageContext.setAttribute(this.getVotedParamName(), new Boolean(voted));
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jacms.aps.system.services.resource.model.ImageResource

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.