Package org.pentaho.reporting.libraries.repository

Examples of org.pentaho.reporting.libraries.repository.ContentEntity


          this.contentItem = null;
        }
      }
      else
      {
        final ContentEntity contentEntity = RepositoryUtilities.getEntity(repository, name);
        if (contentEntity instanceof ContentItem == false)
        {
          if (failOnMissingData)
          {
            throw new UnrecognizedLoaderException("This bundle data does not point to readable content. Content entity is not a ContentItem");
View Full Code Here


    if (caller == null)
    {
      throw new NullPointerException();
    }

    final ContentEntity entity;
    if (contentItem != null)
    {
      entity = contentItem;
    }
    else
    {
      entity = root;
    }

    final Object attribute = entity.getAttribute(LibRepositoryBoot.REPOSITORY_DOMAIN, LibRepositoryBoot.VERSION_ATTRIBUTE);
    if (attribute instanceof Number)
    {
      final Number n = (Number) attribute;
      return n.longValue();
    }
View Full Code Here

        (new ContentEntity[entries.size()]);
  }

  public ContentEntity getEntry(final String name) throws ContentIOException
  {
    final ContentEntity contentEntity = (ContentEntity) entries.get(name);
    if (contentEntity == null)
    {
      throw new ContentIOException("Not found:" + name);
    }
    return contentEntity;
View Full Code Here

    return (ContentEntity[]) entries.values().toArray(new ContentEntity[entries.size()]);
  }

  public ContentEntity getEntry(final String name) throws ContentIOException
  {
    final ContentEntity contentEntity = (ContentEntity) entries.get(name);
    if (contentEntity == null)
    {
      throw new ContentIOException("Not found:" + name);
    }
    return contentEntity;
View Full Code Here

    FileRepository dataRepository = new FileRepository( dataDirectory );

    File contentEntryBackend = new File( "test-src/solution/test/reporting/contentEntryBackend" );
    File dataEntityBackend = new File( "test-src/solution/test/reporting/dataEntityBackend" );

    ContentEntity contentEntry = new FileContentItem( dataRepository.getRoot(), contentEntryBackend );
    ContentEntity dataEntity = new FileContentItem( dataRepository.getRoot(), dataEntityBackend );

    String result = rewriter.rewrite( contentEntry, dataEntity );

    assertEquals( "dataEntityBackend", result );
  }
View Full Code Here

    FileRepository dataRepository = new FileRepository( dataDirectory );

    File contentEntryBackend = new File( "test-src/solution/test/reporting/contentEntryBackend" );
    File dataEntityBackend = new File( "test-src/solution/test/reporting/dataEntityBackend" );

    ContentEntity contentEntry = new FileContentItem( dataRepository.getRoot(), contentEntryBackend );
    ContentEntity dataEntity = new FileContentItem( dataRepository.getRoot(), dataEntityBackend );

    String result = rewriter.rewrite( contentEntry, dataEntity );

    assertEquals( pattern, result );
  }
View Full Code Here

    FileRepository dataRepository = new FileRepository( dataDirectory );

    File contentEntryBackend = new File( "test-src/solution/test/reporting/contentEntryBackend" );
    File dataEntityBackend = new File( "test-src/solution/test/reporting/dataEntityBackend" );

    ContentEntity contentEntry = new FileContentItem( dataRepository.getRoot(), contentEntryBackend );
    ContentEntity dataEntity = new FileContentItem( dataRepository.getRoot(), dataEntityBackend );

    String result = rewriter.rewrite( contentEntry, dataEntity );

    assertEquals( "test-src/solution/test/reporting/system/dataEntityBackend/param", result );
  }
View Full Code Here

    FileRepository dataRepository = new FileRepository( dataDirectory );

    File contentEntryBackend = new File( "test-src/solution/test/reporting/contentEntryBackend" );
    File dataEntityBackend = new File( "test-src/solution/test/reporting/dataEntityBackend" );

    ContentEntity contentEntry = new FileContentItem( dataRepository.getRoot(), contentEntryBackend );
    ContentEntity dataEntity = new FileContentItem( dataRepository.getRoot(), dataEntityBackend );

    String result = rewriter.rewrite( contentEntry, dataEntity );
    assertEquals( "test-src/solution/test/reporting/system/dataEntityBackend/param", result );
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.repository.ContentEntity

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.