Package org.pentaho.reporting.libraries.repository

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


    {
      throw new NullPointerException();
    }
    try
    {
      final ContentEntity mimeTypeContentEntity = repository.getRoot().getEntry("mimetype");
      if (mimeTypeContentEntity instanceof ContentItem)
      {
        final ContentItem mimeTypeItem = (ContentItem) mimeTypeContentEntity;
        final ByteArrayOutputStream bout = new ByteArrayOutputStream();
        final InputStream in = mimeTypeItem.getInputStream();
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

    }

    try
    {
      final String[] splitName = RepositoryUtilities.split(name, "/");
      final ContentEntity contentEntity = RepositoryUtilities.getEntity(zipRepository, splitName);
      return (contentEntity instanceof ContentItem);
    }
    catch (ContentIOException cioe)
    {
      return false;
View Full Code Here

    }

    try
    {
      final String[] splitName = RepositoryUtilities.split(name, "/");
      final ContentEntity contentEntity = RepositoryUtilities.getEntity(zipRepository, splitName);
      if (contentEntity instanceof ContentItem)
      {
        final ContentItem contentItem = (ContentItem) contentEntity;
        return contentItem.getInputStream();
      }
View Full Code Here

    }

    try
    {
      final String[] splitName = RepositoryUtilities.split(name, "/");
      final ContentEntity contentEntity = RepositoryUtilities.getEntity(zipRepository, splitName);
      if (contentEntity instanceof ContentItem)
      {
        final ContentItem contentItem = (ContentItem) contentEntity;
        return contentItem.getMimeType();
      }
View Full Code Here

    }

    try
    {
      final String[] splitName = RepositoryUtilities.split(name, "/");
      final ContentEntity contentEntity = RepositoryUtilities.getEntity(zipRepository, splitName);
      if (contentEntity == null)
      {
        return false;
      }
      if (contentEntity instanceof ContentItem)
      {
        if (contentEntity.delete())
        {
          metaData.removeEntry(name);
          return true;
        }
      }
      else if (contentEntity.delete())
      {
        // its a directory, so removing is a bit more complicated.
        final String[] entryNames = metaData.getManifestEntryNames();
        for (int i = 0; i < entryNames.length; i++)
        {
View Full Code Here


    try
    {
      final String[] splitName = RepositoryUtilities.split(name, "/");
      final ContentEntity contentEntity = RepositoryUtilities.getEntity(repository, splitName);
      return (contentEntity instanceof ContentItem);
    }
    catch (ContentIOException cioe)
    {
      return false;
View Full Code Here

    }

    try
    {
      final String[] splitName = RepositoryUtilities.split(name, "/");
      final ContentEntity contentEntity = RepositoryUtilities.getEntity(repository, splitName);
      if (contentEntity instanceof ContentItem)
      {
        final ContentItem contentItem = (ContentItem) contentEntity;
        return contentItem.getInputStream();
      }
View Full Code Here

    }

    try
    {
      final String[] splitName = RepositoryUtilities.split(name, "/");
      final ContentEntity contentEntity = RepositoryUtilities.getEntity(repository, splitName);
      if (contentEntity instanceof ContentItem)
      {
        final ContentItem contentItem = (ContentItem) contentEntity;
        return contentItem.getMimeType();
      }
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

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.