Examples of ContentCreationException


Examples of org.jfree.repository.ContentCreationException

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

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

Examples of org.jfree.repository.ContentCreationException

  public ContentLocation createLocation(final String name)
      throws ContentCreationException
  {
    if (entries.containsKey(name))
    {
      throw new ContentCreationException("Entry already exists");
    }

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

Examples of org.jfree.repository.ContentCreationException

    {
      contentItem = new StreamContentItem(name, this,
          repository.getInputStream(), repository.getOutputStream());
      return contentItem;
    }
    throw new ContentCreationException
        ("Failed to create the item. Item already there");
  }
View Full Code Here

Examples of org.jfree.repository.ContentCreationException

  }

  public ContentLocation createLocation(final String name)
      throws ContentCreationException
  {
    throw new ContentCreationException
        ("Failed to create the item. Item already there");
  }
View Full Code Here

Examples of org.jfree.repository.ContentCreationException

    throw new ContentIOException();
  }

  public ContentItem createItem(final String name) throws ContentCreationException
  {
    throw new ContentCreationException("Cannot create item");
  }
View Full Code Here

Examples of org.jfree.repository.ContentCreationException

    {
      contentItem = new StreamContentItem(name, this,
          repository.getInputStream(), repository.getOutputStream());
      return contentItem;
    }
    throw new ContentCreationException
        ("Failed to create the item. Item already there");
  }
View Full Code Here

Examples of org.jfree.repository.ContentCreationException

  }

  public ContentLocation createLocation(String name)
      throws ContentCreationException
  {
    throw new ContentCreationException
        ("Failed to create the item. Item already there");
  }
View Full Code Here

Examples of org.jfree.repository.ContentCreationException

  {
    final File file = getBackend();
    final File child = new File (file, name);
    if (child.exists())
    {
      throw new ContentCreationException("File already exists.");
    }
    try
    {
      if (child.createNewFile() == false)
      {
        throw new ContentCreationException("Unable to create");
      }
      return new FileContentItem(this, child);
    }
    catch (IOException e)
    {
      throw new ContentCreationException("IOError while create");
    }
  }
View Full Code Here

Examples of org.jfree.repository.ContentCreationException

  {
    final File file = getBackend();
    final File child = new File (file, name);
    if (child.exists())
    {
      throw new ContentCreationException("File already exists.");
    }
    if (child.mkdir() == false)
    {
      throw new ContentCreationException("Unable to create");
    }
    return new FileContentLocation(this, child);
  }
View Full Code Here

Examples of org.jfree.repository.ContentCreationException

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

    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.