01: package org.apache.lenya.cms.repository;
02:
03: import java.io.InputStream;
04:
05: import org.apache.lenya.cms.metadata.MetaDataOwner;
06:
07: /**
08: * Super interface for nodes and revisions.
09: */
10: public interface ContentHolder extends MetaDataOwner {
11:
12: /**
13: * @return The last modification date. The date is measured in milliseconds
14: * since the epoch (00:00:00 GMT, January 1, 1970), and is 0 if it's
15: * unknown.
16: * @throws RepositoryException if the node does not exist.
17: */
18: long getLastModified() throws RepositoryException;
19:
20: /**
21: * @return The content length.
22: * @throws RepositoryException if the node does not exist.
23: */
24: long getContentLength() throws RepositoryException;
25:
26: /**
27: * Accessor for the source URI of this node
28: * @return the source URI
29: */
30: String getSourceURI();
31:
32: /**
33: * @return if the item exists.
34: * @throws RepositoryException if an error occurs.
35: */
36: boolean exists() throws RepositoryException;
37:
38: /**
39: * @return The input stream.
40: * @throws RepositoryException if the node does not exist.
41: */
42: InputStream getInputStream() throws RepositoryException;
43:
44: /**
45: * @return The MIME type.
46: * @throws RepositoryException if the node does not exist.
47: */
48: String getMimeType() throws RepositoryException;
49:
50: }
|