public class DummyContentItem extends Object implements ContentItem, Serializable
| Constructor and Description |
|---|
DummyContentItem(ContentLocation parent,
String name)
Creates a new dummy item for the given parent and having the given name.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
delete()
A dummy location does not have content and therefore does not support the delete command.
|
Object |
getAttribute(String domain,
String key)
Dummy locations do not have attributes, therefore this method always returns null.
|
Object |
getContentId()
Returns the full pathname of the location.
|
InputStream |
getInputStream()
Returns an new empty input stream that does not allow to read a single byte from it.
|
String |
getMimeType()
Returns the mime type for the content entity.
|
String |
getName()
Returns the name of the entry.
|
OutputStream |
getOutputStream()
Returns a NullOutputStream that ignores all content given to it.
|
ContentLocation |
getParent()
Returns the parent, if there is any.
|
Repository |
getRepository()
Returns the parent repository for this location.
|
boolean |
isReadable()
Claims that the item is readable.
|
boolean |
isWriteable()
Claims that the item is writable.
|
boolean |
setAttribute(String domain,
String key,
Object value)
Dummy locations do not allow to set attributes, therefore this method always returns false.
|
public DummyContentItem(ContentLocation parent, String name)
parent - the parent.name - the name of the new item.public String getMimeType() throws ContentIOException
getMimeType in interface ContentItemContentIOException - if an error occured.public OutputStream getOutputStream()
getOutputStream in interface ContentItempublic InputStream getInputStream()
getInputStream in interface ContentItempublic boolean isReadable()
isReadable in interface ContentItempublic boolean isWriteable()
isWriteable in interface ContentItempublic String getName()
getName in interface ContentEntitypublic Object getContentId()
getContentId in interface ContentEntitypublic Object getAttribute(String domain, String key)
getAttribute in interface ContentEntitydomain - the attribute domain.key - the name of the attribute.public boolean setAttribute(String domain, String key, Object value)
setAttribute in interface ContentEntitydomain - the attribute domain.key - the attribute namevalue - the new attribute value.public ContentLocation getParent()
getParent in interface ContentEntitypublic Repository getRepository()
getRepository in interface ContentEntitypublic boolean delete()
delete in interface ContentEntity