Examples of ContentEntity


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

    }

    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

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

    }

    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

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

    }

    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

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

    }

    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

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


    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

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

    }

    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

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

    }

    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

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

          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

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

    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
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.