Examples of CdfRunJsDashboardWriteResult


Examples of pt.webdetails.cdf.dd.model.inst.writer.cdfrunjs.dashboard.CdfRunJsDashboardWriteResult

    writeOut( out, msg );
  }

  @Exposed( accessLevel = AccessLevel.PUBLIC )
  public void getContent( OutputStream out ) throws Exception {
    CdfRunJsDashboardWriteResult dashboardWrite = this.loadDashboard();
    writeOut( out, dashboardWrite.getContent() );
  }
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.inst.writer.cdfrunjs.dashboard.CdfRunJsDashboardWriteResult

    writeOut( out, dashboardWrite.getContent() );
  }

  @Exposed( accessLevel = AccessLevel.PUBLIC )
  public void getHeaders( final OutputStream out ) throws Exception {
    CdfRunJsDashboardWriteResult dashboardWrite = this.loadDashboard();
    writeOut( out, dashboardWrite.getHeader() );
  }
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.inst.writer.cdfrunjs.dashboard.CdfRunJsDashboardWriteResult

      throw new ThingWriteException( new FileNotFoundException( cdeFilePath ) );
    }

    // 3. Reading from the cache?
    CdfRunJsDashboardWriteResult dashWrite;
    if ( !bypassCacheRead ) {
      try {
        dashWrite = getDashboardWriteResultFromCache( cacheKey, cdeFilePath );

      } catch ( FileNotFoundException ex ) {
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.inst.writer.cdfrunjs.dashboard.CdfRunJsDashboardWriteResult

    if ( cacheElement == null ) {
      _logger.debug( "Dashboard render is not in cache." );
      return null;
    }

    CdfRunJsDashboardWriteResult dashWrite = (CdfRunJsDashboardWriteResult) cacheElement.getValue();

    // 3. Get the template file
    String templPath = cacheKey.getTemplate();

    // 4. Check if cache item has expired
    // Cache is invalidated if the dashboard or template have changed since
    // the cache was loaded, or at midnight every day,
    // because of dynamic generation of date parameters.
    Calendar cal = Calendar.getInstance();
    cal.set( Calendar.HOUR_OF_DAY, 00 );
    cal.set( Calendar.MINUTE, 00 );
    cal.set( Calendar.SECOND, 1 );

    // The date at which the source Dashboard object
    // was loaded from disk, not the date at which the DashResult was written.
    Date dashLoadedDate = dashWrite.getLoadedDate();

    boolean cacheExpired = cal.getTime().after( dashLoadedDate );
    if ( cacheExpired ) {
      _logger.debug( "Cached dashboard render expired, re-rendering." );
      return null;
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.inst.writer.cdfrunjs.dashboard.CdfRunJsDashboardWriteResult

      }

      if ( cacheElement != null ) {
        // Keep the one which corresponds to the newest Dashboard object
        // read from disk.
        CdfRunJsDashboardWriteResult currDashWrite =
          (CdfRunJsDashboardWriteResult) cacheElement.getValue();

        if ( currDashWrite.getLoadedDate().getTime()
          > newDashWrite.getLoadedDate().getTime() ) {
          return currDashWrite;
        }
      }
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.inst.writer.cdfrunjs.dashboard.CdfRunJsDashboardWriteResult

          WidgetComponent widgetComp = (WidgetComponent)comp;
         
          CdfRunJsDashboardWriteOptions childOptions = options
                  .addAliasPrefix(comp.getName()); // <-- NOTE:!
         
          CdfRunJsDashboardWriteResult dashResult = null;
          try
          {
            dashResult = dashMgr.getDashboardCdfRunJs(
                    widgetComp.getWcdfPath(),
                    childOptions,
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.inst.writer.cdfrunjs.dashboard.CdfRunJsDashboardWriteResult

      layout.append(NEWLINE + getIndent(indent));
      layout.append(renderer.renderStart());
     
      if(widgetsByContainerId.containsKey(rowName))
      {
        CdfRunJsDashboardWriteResult widgetResult = widgetsByContainerId.get(rowName);
        layout.append(widgetResult.getLayout());
      }
      else
      {
        renderRows(
            context,
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.inst.writer.cdfrunjs.dashboard.CdfRunJsDashboardWriteResult

    CdfRunJsDashboardWriteOptions options = context.getOptions()
            .addAliasPrefix(comp.getName()); // <-- NOTE:!
   
    String newAliasPrefix = options.getAliasPrefix();
   
    CdfRunJsDashboardWriteResult dashResult = dashMgr.getDashboardCdfRunJs(
          comp.getWcdfPath(),
          options,
          context.isBypassCacheRead());
   
    out.append(dashResult.getComponents());
   
    // wrapJsScriptTags(out,
    this.writeParameters(out, comp, newAliasPrefix);
  }
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.inst.writer.cdfrunjs.dashboard.CdfRunJsDashboardWriteResult

                            @Context HttpServletResponse response ) throws IOException, ThingWriteException {

    String scheme = inferScheme ? "" : request.getScheme();
    String filePath = getWcdfRelativePath( solution, path, file );

    CdfRunJsDashboardWriteResult dashboardWrite =
      this.loadDashboard( filePath, scheme, root, absolute, bypassCache, debug, null );
    return dashboardWrite.getContent();
  }
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.inst.writer.cdfrunjs.dashboard.CdfRunJsDashboardWriteResult

                            @Context HttpServletResponse response ) throws IOException, ThingWriteException {

    String scheme = inferScheme ? "" : request.getScheme();
    String filePath = getWcdfRelativePath( solution, path, file );

    CdfRunJsDashboardWriteResult dashboardWrite =
      this.loadDashboard( filePath, scheme, root, absolute, bypassCache, debug, null );
    return dashboardWrite.getHeader();
  }
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.