public class StreamContentLocation extends Object implements ContentLocation
Constructor and Description |
---|
StreamContentLocation(StreamRepository repository)
Creates a new stream-location.
|
Modifier and Type | Method and Description |
---|---|
ContentItem |
createItem(String name)
Creates a new data item in the current location.
|
ContentLocation |
createLocation(String name)
This method always throws an exception, as stream-repositories cannot create sub-locations.
|
boolean |
delete()
Stream-repositories do not support the deletion of entries.
|
boolean |
exists(String name)
Checks, whether an content entity with the given name exists in this content location.
|
Object |
getAttribute(String domain,
String key)
Stream-Repositories do not support attributes.
|
Object |
getContentId()
Returns a unique identifier.
|
ContentEntity |
getEntry(String name)
Returns the content entity with the given name.
|
String |
getName()
Returns the generic name of this location.
|
ContentLocation |
getParent()
Returns a reference to the parent location.
|
Repository |
getRepository()
Returns the current repository, to which tis entity belongs.
|
ContentEntity[] |
listContents()
Returns all content entities stored in this content-location.
|
boolean |
setAttribute(String domain,
String key,
Object value)
Stream-Repositories do not support attributes.
|
public StreamContentLocation(StreamRepository repository)
repository
- the repository for which a location is created.public ContentEntity[] listContents() throws ContentIOException
listContents
in interface ContentLocation
ContentIOException
- if an repository error occured.public ContentEntity getEntry(String name) throws ContentIOException
getEntry
in interface ContentLocation
name
- the name of the entity to be retrieved.ContentIOException
- if an repository error occured.public ContentItem createItem(String name) throws ContentCreationException
createItem
in interface ContentLocation
name
- the name of the new entity.ContentCreationException
- if the item could not be created.public ContentLocation createLocation(String name) throws ContentCreationException
createLocation
in interface ContentLocation
name
- the name.ContentCreationException
- always, as stream-repositories cannot create sub-locations.public boolean exists(String name)
exists
in interface ContentLocation
name
- the name of the new entity.public String getName()
getName
in interface ContentEntity
public Object getContentId()
getContentId
in interface ContentEntity
public Object getAttribute(String domain, String key)
getAttribute
in interface ContentEntity
domain
- the attribute domain.key
- the name of the attribute.public boolean setAttribute(String domain, String key, Object value)
setAttribute
in interface ContentEntity
domain
- the attribute domain.key
- the attribute namevalue
- the new attribute value.public ContentLocation getParent()
getParent
in interface ContentEntity
public Repository getRepository()
getRepository
in interface ContentEntity
public boolean delete()
delete
in interface ContentEntity