Examples of ContentCreationException


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

  public ContentLocation createLocation(final String name)
      throws ContentCreationException
  {
    if (entries.containsKey(name))
    {
      throw new ContentCreationException("Entry already exists");
    }
    if (RepositoryUtilities.isInvalidPathName(name))
    {
      throw new ContentCreationException("Entry-Name is not valid");
    }

    final ZipContentLocation item = new ZipContentLocation(repository, this, name);
    entries.put(name, item);
    if ("/".equals(this.contentId) == false)
    {
      try
      {
        final ZipEntry entry = new ZipEntry(contentId + name + '/');
        repository.writeDirectory(entry);
      }
      catch (IOException e)
      {
        throw new ContentCreationException("Failed to create directory.", e);
      }
    }
    return item;
  }
View Full Code Here

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

  public ContentItem createItem(final String name) throws ContentCreationException
  {
    if (entries.containsKey(name))
    {
      throw new ContentCreationException("An entry with name '" + name + "' already exists.");
    }
    if (name.indexOf('/') != -1)
    {
      throw new ContentCreationException("The entry-name '" + name + "' is invalid.");
    }
    if ("".equals(name) || ".".equals(name) || "..".equals(name))
    {
      throw new ContentCreationException("The entry-name '" + name + "' is invalid.");
    }
    final ZipContentItem value = new ZipContentItem(repository, this, name);
    entries.put(name, value);
    return value;
  }
View Full Code Here

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

  public ContentLocation createLocation(final String name) throws ContentCreationException
  {
    if (entries.containsKey(name))
    {
      throw new ContentCreationException("An entry with name '" + name + "' already exists.");
    }
    if (entries.containsKey(name))
    {
      throw new ContentCreationException("An entry with name '" + name + "' already exists.");
    }
    if (name.indexOf('/') != -1)
    {
      throw new ContentCreationException("The entry-name '" + name + "' is invalid.");
    }
    if ("".equals(name) || ".".equals(name) || "..".equals(name))
    {
      throw new ContentCreationException("The entry-name '" + name + "' is invalid.");
    }
    final ZipContentLocation value = new ZipContentLocation(repository, this, name);
    entries.put(name, value);
    return value;
  }
View Full Code Here

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

   */
  public ContentItem createItem(final String name) throws ContentCreationException
  {
    if (entries.containsKey(name))
    {
      throw new ContentCreationException("Entry already exists");
    }

    final EmailContentItem item = new EmailContentItem(name, repository, this);
    entries.put(name, item);
    return item;
View Full Code Here

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

  public ContentLocation createLocation(final String name)
      throws ContentCreationException
  {

    throw new ContentCreationException("createLocation not Implemented yet");
  }
View Full Code Here

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

    if (contentItem == null && outputStream != null)
    {
      contentItem = new StreamContentItem(name, this, in, outputStream);
      return contentItem;
    }
    throw new ContentCreationException
        ("Failed to create the item. Item already exists or the repository is read-only");
  }
View Full Code Here

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

   * @throws ContentCreationException always, as stream-repositories cannot create sub-locations.
   */
  public ContentLocation createLocation(final String name)
      throws ContentCreationException
  {
    throw new ContentCreationException("A stream repository never creates sub-locations");
  }
View Full Code Here

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

     *          if the item could not be created.
     */
    public ContentItem createItem(final String name) throws ContentCreationException
    {
        if (entries.containsKey(name)) {
            throw new ContentCreationException("Entry already exists");
        }

        final EmailContentItem item = new EmailContentItem(name, repository, this);
        entries.put(name, item);
        return item;
View Full Code Here

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

    }

    public ContentLocation createLocation(final String name)
        throws ContentCreationException {
       
        throw new ContentCreationException("createLocation not Implemented yet");
    }
View Full Code Here

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

   */
  public ContentItem createItem(final String name) throws ContentCreationException
  {
    if (entries.containsKey(name))
    {
      throw new ContentCreationException("Entry already exists");
    }

    if (RepositoryUtilities.isInvalidPathName(name))
    {
      throw new ContentCreationException("Entry-Name is not valid");
    }
    final ZipContentItem item = new ZipContentItem(name, repository, this);
    entries.put(name, item);
    return item;
  }
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.