Package org.pentaho.reporting.libraries.repository

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


  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


  public OutputStream getOutputStream() throws ContentIOException, IOException
  {
    if (newItem == false)
    {
      throw new ContentIOException("This item is no longer writeable.");
    }
    newItem = false;
    return new ZipEntryOutputStream(this);
  }
View Full Code Here

    return new ZipEntryOutputStream(this);
  }

  public InputStream getInputStream() throws ContentIOException, IOException
  {
    throw new ContentIOException("This item is not readable.");
  }
View Full Code Here

  public FileContentLocation(final ContentLocation parent, final File backend) throws ContentIOException
  {
    super(parent, backend);
    if (backend.exists() == false || backend.isDirectory() == false)
    {
      throw new ContentIOException("The given backend-file is not a directory.");
    }
  }
View Full Code Here

  public FileContentLocation(final Repository repository, final File backend) throws ContentIOException
  {
    super(repository, backend);
    if (backend.exists() == false || backend.isDirectory() == false)
    {
      throw new ContentIOException("The given backend-file is not a directory.");
    }
  }
View Full Code Here

    final File file = getBackend();
    final File child = new File(file, name);
    if (child.exists() == false)
    {
      throw new ContentIOException("Not found:" + child);
    }
    try
    {
      if (IOUtils.getInstance().isSubDirectory(file, child) == false)
      {
        throw new ContentIOException("The given entry does not point to a sub-directory of this content-location");
      }
    }
    catch (IOException e)
    {
      throw new ContentIOException("IO Error.", e);
    }

    if (child.isDirectory())
    {
      return new FileContentLocation(this, child);
    }
    else if (child.isFile())
    {
      return new FileContentItem(this, child);
    }
    else
    {
      throw new ContentIOException("Not File nor directory.");
    }
  }
View Full Code Here

  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

          (repository.getContentName(), this, in, repository.getOutputStream());
    }

    if (contentItem == null)
    {
      throw new ContentIOException("No such item");
    }
    if (contentItem.getName().equals(name))
    {
      return contentItem;
    }
    throw new ContentIOException("No such item");
  }
View Full Code Here

TOP

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

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.