Examples of ContentEntity


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

        (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

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

    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

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

    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

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

    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

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

    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

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

    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

Examples of org.vosao.entity.ContentEntity

    return null;
  }

  @Override
  public String getContent(Long pageId, String languageCode) {
    ContentEntity content = getContentDao().getByLanguage(
        PAGE_CLASS_NAME, pageId, languageCode);
    if (content != null) {
      return content.getContent();
    }
    return null;
  }
View Full Code Here

Examples of org.vosao.entity.ContentEntity

  }

  @Override
  public ContentEntity setContent(Long pageId, String languageCode,
        String content) {
    ContentEntity contentEntity = getContentDao().getByLanguage(
        PAGE_CLASS_NAME, pageId, languageCode);
    if (contentEntity == null) {
      contentEntity = new ContentEntity(PAGE_CLASS_NAME, pageId,
          languageCode, content);
    }
    else {
      contentEntity.setContent(content);
    }
    return getContentDao().save(contentEntity);
  }
View Full Code Here

Examples of org.vosao.entity.ContentEntity

 

  public void testContent() {
    PageEntity root = pageTool.addPage("root", "/");
    getDao().getPageDao().setContent(root.getId(), "en", "english");
    ContentEntity ruContent = getDao().getPageDao().setContent(
        root.getId(), "ru", "russian");
    getDao().getPageDao().setContent(root.getId(), "uk", "ukranian");
    String c = getDao().getPageDao().getContent(root.getId(), "en");
    assertEquals("english", c);
    c = getDao().getPageDao().getContent(root.getId(), "ru");
    assertEquals("russian", c);
    c = getDao().getPageDao().getContent(root.getId(), "uk");
    assertEquals("ukranian", c);
    List<ContentEntity> list = getDao().getContentDao().select(
        PageEntity.class.getName(), root.getId());
    assertEquals(3, list.size());
    getDao().getContentDao().removeById(ruContent.getParentClass(),
        root.getId());
    list = getDao().getContentDao().select(
        PageEntity.class.getName(), root.getId());
    assertEquals(0, list.size());
  }
View Full Code Here

Examples of org.vosao.entity.ContentEntity

      }

      PageEntity page = getDao().getPageDao().getByUrl(name);
      if (page != null) {
        String languageCode = LanguageEntity.ENGLISH_CODE;
        ContentEntity content = getDao().getContentDao().getByLanguage(
            PageEntity.class.getName(), page.getId(), languageCode);
        if (content != null) {
          return content.getContent();
        }
      }
    }
    return null;
  }
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.