## org.pentaho.reporting.libraries.repository
Interface ContentLocation

All Superinterfaces:
  ContentEntity

All Known Implementing Classes:
  DummyContentLocation, EmailContentLocation, FileContentLocation, StreamContentLocation, ZipContentLocation, ZipContentLocation, ZipReadContentLocation

    public interface ContentLocation

extends ContentEntity

This represents a container in the repository. If the repository is a filesystem, this will be a directory.

Author:
  Thomas Morgner

Method Summary
`ContentItem` `createItem(java.lang.String name)` Creates a new data item in the current location.
`ContentLocation` `createLocation(java.lang.String name)` Creates a new content location in the current location.
`boolean` `exists(java.lang.String name)` Checks, whether an content entity with the given name exists in this content location.
`ContentEntity` `getEntry(java.lang.String name)` Returns the content entity with the given name.
`ContentEntity[]` `listContents()` Returns all content entities stored in this content-location.

Methods inherited from interface org.pentaho.reporting.libraries.repository.ContentEntity
`delete, getAttribute, getContentId, getName, getParent, getRepository, setAttribute`

Method Detail

### listContents

    ContentEntity[] listContents()
                                 throws ContentIOException

  Returns all content entities stored in this content-location.

  Returns:
    the content entities for this location.
  Throws:
    `ContentIOException` - if an repository error occured.

### getEntry

    ContentEntity getEntry(java.lang.String name)
                           throws ContentIOException

  Returns the content entity with the given name. If the entity does not exist, an Exception will be raised.

  Parameters:
    `name` - the name of the entity to be retrieved.
  Returns:
    the content entity for this name, never null.
  Throws:
    `ContentIOException` - if an repository error occured.

### createItem

    ContentItem createItem(java.lang.String name)
                           throws ContentCreationException

  Creates a new data item in the current location. This method must never return null. This method will fail if an entity with the same name exists in this location.

  Parameters:
    `name` - the name of the new entity.
  Returns:
    the newly created entity, never null.
  Throws:
    `ContentCreationException` - if the item could not be created.

### createLocation

    ContentLocation createLocation(java.lang.String name)
                                   throws ContentCreationException

  Creates a new content location in the current location. This method must never return null. This method will fail if an entity with the same name exists in this location.

  Parameters:
    `name` - the name of the new entity.
  Returns:
    the newly created entity, never null.
  Throws:
    `ContentCreationException` - if the item could not be created.

### exists

    boolean exists(java.lang.String name)

  Checks, whether an content entity with the given name exists in this content location.

  Parameters:
    `name` - the name of the new entity.
  Returns:
    true, if an entity exists with this name, false otherwise.