public class ZipContentItem extends Object implements ContentItem
Constructor and Description |
---|
ZipContentItem(String name,
ZipRepository repository,
ZipContentLocation parent) |
Modifier and Type | Method and Description |
---|---|
boolean |
delete()
Attempts to delete the entity.
|
Object |
getAttribute(String domain,
String key)
Returns a attribute value for the given domain (namespace) and attribute-name.
|
Object |
getContentId()
Returns a unique identifier.
|
InputStream |
getInputStream()
Tries to open and return a input stream for reading from the content item.
|
String |
getMimeType()
Returns the mime type for the content entity.
|
String |
getName()
Returns the name of the entry.
|
OutputStream |
getOutputStream()
Tries to open and return a output stream for writing into the content item.
|
ContentLocation |
getParent()
Returns a reference to the parent location.
|
Repository |
getRepository()
Returns the current repository, to which tis entity belongs.
|
boolean |
isReadable()
Checks, whether the content item is readable.
|
boolean |
isWriteable()
Checks, whether the content item is writable.
|
boolean |
setAttribute(String domain,
String key,
Object value)
Updates the attribute value for the given attribute domain and name.
|
public ZipContentItem(String name, ZipRepository repository, ZipContentLocation parent)
public String getMimeType() throws ContentIOException
ContentItem
getMimeType
in interface ContentItem
ContentIOException
- if an error occured.public OutputStream getOutputStream() throws ContentIOException, IOException
ContentItem
getOutputStream
in interface ContentItem
ContentIOException
- if an repository related error prevents the creation of the output stream.IOException
- if an IO error occurs.public InputStream getInputStream() throws ContentIOException, IOException
ContentItem
getInputStream
in interface ContentItem
ContentIOException
- if an repository related error prevents the creation of the input stream.IOException
- if an IO error occurs.public boolean isReadable()
ContentItem
isReadable
in interface ContentItem
public boolean isWriteable()
ContentItem
isWriteable
in interface ContentItem
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 Repository getRepository()
ContentEntity
getRepository
in interface ContentEntity
public ContentLocation getParent()
ContentEntity
getParent
in interface ContentEntity
public boolean delete()
ContentEntity
delete
in interface ContentEntity