Examples of ThingWriteException


Examples of pt.webdetails.cdf.dd.model.core.writer.ThingWriteException

        propWriter = factory.getWriter(prop);
        assert propWriter != null;
      }
      catch(UnsupportedThingException ex)
      {
        ThingWriteException ex2 = new ThingWriteException(ex);
        if(context.getBreakOnError()) { throw ex2; }
        _logger.error(ex2);
        continue;
      }

      propWriter.write(out, context, prop);
    }

    // COMPONENTS
    // Components output their own properties
    for(ComponentType comp : model.getComponentTypes())
    {
      IThingWriter compWriter;
      try
      {
        compWriter = factory.getWriter(comp);
        assert compWriter != null;
      }
      catch(UnsupportedThingException ex)
      {
        ThingWriteException ex2 = new ThingWriteException(ex);
        if(context.getBreakOnError()) { throw ex2; }
        _logger.error(ex2);
        continue;
      }
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.core.writer.ThingWriteException

          {
            writer = factory.getWriter(prop);
          }
          catch (UnsupportedThingException ex)
          {
            throw new ThingWriteException(ex);
          }

          writer.write(custPropsElem, context, prop);
        }
      }
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.core.writer.ThingWriteException

          {
            writer = factory.getWriter(prop);
          }
          catch (UnsupportedThingException ex)
          {
            throw new ThingWriteException(ex);
          }

          writer.write(out, context, prop);
        }
      }
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.core.writer.ThingWriteException

    if ( !wcdfFilePath.isEmpty() && wcdfFilePath.endsWith( ".wcdf" ) ) {
      try {
        wcdf = DashboardWcdfDescriptor.load( wcdfFilePath );
      } catch ( IOException ex ) {
        // TODO: User has no permission to WCDF falls here?
        throw new ThingWriteException( "While accessing the WCDF file.", ex );
      }

      if ( wcdf == null ) {
        // Doesn't exist
        // TODO: Explain or fix, why create a (totally) empty one?
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.core.writer.ThingWriteException

    // NOTE: the cache is shared by all users.
    // The current user may not have access to a cache item previously
    // created by another user.
    if ( !Utils.getSystemOrUserReadAccess( wcdf.getPath() ).fileExists( cdeFilePath ) ) {

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

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

      } catch ( FileNotFoundException ex ) {
        // Is in cache but:
        // * file doesn't exist (anymore)
        // * user has insufficient permissions to access the cdfde file
        throw new ThingWriteException( ex );
      }

      if ( dashWrite != null ) {
        // Return cached write result
        return dashWrite;
      }

      // Not in cache or cache item expired/invalidated
    } else {
      _logger.info( "Bypassing dashboard render cache, rendering." );
    }

    // 4. Get the Dashboard object
    Dashboard dash;
    try {
      dash = this.getDashboard( wcdf, cdeFilePath, bypassCacheRead );
    } catch ( ThingReadException ex ) {
      throw new ThingWriteException( ex );
    }

    // 5. Obtain a Writer for the CdfRunJs format
    dashWrite = this.writeDashboardToCdfRunJs( dash, options, bypassCacheRead );

View Full Code Here

Examples of pt.webdetails.cdf.dd.model.core.writer.ThingWriteException

          {
            writer = factory.getWriter(genComp);
          }
          catch (UnsupportedThingException ex)
          {
            throw new ThingWriteException(ex);
          }
         
          writer.write(access, context, comp);
        }
      }
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.core.writer.ThingWriteException

    {
      compWriter = writerFactory.getWriter(comp);
    }
    catch(UnsupportedThingException ex)
    {
      throw new ThingWriteException("Error while obtaining a writer for rendering the generic component.", ex);
    }

    // Options are kind of irrelevant in this context,
    // as we're only rendering one component, not a dashboard (and not a widget component).
    CdfRunJsDashboardWriteOptions options = new CdfRunJsDashboardWriteOptions(false, false, "", "");
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.core.writer.ThingWriteException

      {
        dsWriter = factory.getWriter(dsComp);
      }
      catch (UnsupportedThingException ex)
      {
        throw new ThingWriteException(ex);
      }

      CggRunJsComponentWriteContext compContext = new CggRunJsComponentWriteContext(factory, dash, comp);
      dsWriter.write(out, compContext, dsComp);
    }
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.core.writer.ThingWriteException

      } else if ( metaType.equals( META_TYPE_CDA ) ) {
        renderBuiltinCdaDatasource( out, context, dataSourceComp );
      } else if ( metaType.equals( META_TYPE_CPK ) ) {
        renderCpkDatasource( out, context, dataSourceComp );
      } else {
        throw new ThingWriteException( "Cannot render a data source property of meta type '" + metaType + "'." );
      }
    }
  }
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.core.writer.ThingWriteException

          {
            writer = factory.getWriter(propBind);
          }
          catch(UnsupportedThingException ex)
          {
            throw new ThingWriteException(ex);
          }
         
          // TODO: empty properties are not output
          // and the NEWLINE is already output...
          if(!isDefaultDefinition && childContext.isFirstInList())
          {
            out.append(NEWLINE);
          }
         
          writer.write(out, childContext, propBind);
        }
      }
    }
   
    if(comp.getExtensionPropertyBindingCount() > 0)
    {
      // HACK: CCC V1 properties have to go into the "chartDefinition" definition...
      boolean isCCC = compType.getName().startsWith("ccc");
      if(isCCC ? !isDefaultDefinition : isDefaultDefinition)
      {
        Iterable<ExtensionPropertyBinding> propBinds = comp.getExtensionPropertyBindings();
        for(ExtensionPropertyBinding propBind : propBinds)
        {
          IThingWriter writer;
          try
          {
            writer = factory.getWriter(propBind);
          }
          catch(UnsupportedThingException ex)
          {
            throw new ThingWriteException(ex);
          }

          if(!isDefaultDefinition && childContext.isFirstInList())
          {
            out.append(NEWLINE);
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.