public class ZipContentLocation extends Object implements ContentLocation
Constructor and Description |
---|
ZipContentLocation(ZipRepository repository,
ContentLocation parent,
String name) |
Modifier and Type | Method and Description |
---|---|
ContentItem |
createItem(String name)
Creates a new data item in the current location.
|
ContentLocation |
createLocation(String name)
Creates a new content location in the current location.
|
boolean |
delete()
Attempts to delete the entity.
|
boolean |
exists(String name)
Checks, whether an content entity with the given name exists in this content location.
|
Object |
getAttribute(String domain,
String key)
Returns a attribute value for the given domain (namespace) and attribute-name.
|
Object |
getContentId()
Returns a unique identifier.
|
ContentEntity |
getEntry(String name)
Returns the content entity with the given name.
|
String |
getName()
Returns the name of the entry.
|
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)
Updates the attribute value for the given attribute domain and name.
|
public ZipContentLocation(ZipRepository repository, ContentLocation parent, String name)
public ContentEntity[] listContents() throws ContentIOException
ContentLocation
listContents
in interface ContentLocation
ContentIOException
- if an repository error occured.public ContentEntity getEntry(String name) throws ContentIOException
ContentLocation
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
- ContentCreationException
- if the item could not be created.public ContentLocation createLocation(String name) throws ContentCreationException
ContentLocation
createLocation
in interface ContentLocation
name
- the name of the new entity.ContentCreationException
- if the item could not be created.public boolean exists(String name)
ContentLocation
exists
in interface ContentLocation
name
- the name of the new entity.public String getName()
ContentEntity
getName
in interface ContentEntity
public Object getContentId()
ContentEntity
getContentId
in interface ContentEntity
public Object getAttribute(String domain, String key)
ContentEntity
LibRepositoryBoot
class.getAttribute
in interface ContentEntity
domain
- the attribute domain.key
- the name of the attribute.public boolean setAttribute(String domain, String key, Object value)
ContentEntity
setAttribute
in interface ContentEntity
domain
- the attribute domain.key
- the attribute namevalue
- the new attribute value.public ContentLocation getParent()
ContentEntity
getParent
in interface ContentEntity
public Repository getRepository()
ContentEntity
getRepository
in interface ContentEntity
public boolean delete()
ContentEntity
delete
in interface ContentEntity