|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Document
A CMS document.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_PREFIX
The default namespace prefix. |
static java.lang.String |
DOCUMENT_META_SUFFIX
DOCUMENT_META_SUFFIX The suffix for document meta Uris |
static java.lang.String |
NAMESPACE
The document namespace URI. |
static java.lang.String |
TRANSACTIONABLE_TYPE
The transactionable type for document objects. |
Method Summary | |
---|---|
void |
accept(DocumentVisitor visitor)
Accepts a document visitor. |
Area |
area()
|
void |
delete()
Deletes the document. |
boolean |
exists()
Check if a document with the given document-uuid, language and in the given area actually exists. |
boolean |
existsAreaVersion(java.lang.String area)
Checks if this document exists in a certain area. |
boolean |
existsInAnyLanguage()
Check if a document exists with the given document-uuid and the given area independently of the given language. |
boolean |
existsTranslation(java.lang.String language)
Checks if a certain translation (language version) of this document exists. |
boolean |
existsVersion(java.lang.String area,
java.lang.String language)
Checks if a translation of this document exists in a certain area. |
java.lang.String |
getArea()
Returns the area this document belongs to. |
Document |
getAreaVersion(java.lang.String area)
Returns the document in a certain area. |
java.lang.String |
getCanonicalDocumentURL()
Returns the canonical document URL. |
java.lang.String |
getCanonicalWebappURL()
Returns the canonical web application URL. |
long |
getContentLength()
|
java.util.Date |
getExpires()
Returns the date at which point the requested document is considered expired |
java.lang.String |
getExtension()
Returns the extension in the URL without the dot. |
DocumentFactory |
getFactory()
Returns the identity map this document belongs to. |
java.io.File |
getFile()
Deprecated. This implies the usage of a filesystem based storage. Use getSourceURI() instead. |
DocumentIdentifier |
getIdentifier()
|
java.io.InputStream |
getInputStream()
|
java.lang.String |
getLanguage()
Returns the language of this document. |
java.lang.String[] |
getLanguages()
Returns all the languages this document is available in. |
long |
getLastModified()
Returns the date of the last modification of this document. |
Link |
getLink()
|
DocumentLocator |
getLocator()
|
java.lang.String |
getMimeType()
|
java.lang.String |
getName()
Returns the document name of this document. |
java.io.OutputStream |
getOutputStream()
|
java.lang.String |
getPath()
This is a shortcut to getLink().getNode().getPath(). |
Publication |
getPublication()
Returns the publication this document belongs to. |
Node |
getRepositoryNode()
|
ResourceType |
getResourceType()
|
int |
getRevisionNumber()
|
java.lang.String |
getSourceExtension()
|
java.lang.String |
getSourceURI()
Returns the URI to resolve the document's source. |
Document |
getTranslation(java.lang.String language)
Returns a certain translation (language version) of this document. |
java.lang.String |
getUUID()
Returns the UUID. |
Document |
getVersion(java.lang.String area,
java.lang.String language)
Returns a translation of this document in a certain area. |
boolean |
hasLink()
|
void |
setMimeType(java.lang.String mimeType)
Sets the mime type of this document. |
void |
setResourceType(ResourceType resourceType)
|
void |
setSourceExtension(java.lang.String extension)
|
Methods inherited from interface org.apache.lenya.cms.metadata.MetaDataOwner |
---|
getMetaData, getMetaDataNamespaceUris |
Methods inherited from interface org.apache.lenya.cms.repository.RepositoryItem |
---|
getSession |
Field Detail |
---|
static final java.lang.String NAMESPACE
static final java.lang.String DEFAULT_PREFIX
static final java.lang.String TRANSACTIONABLE_TYPE
static final java.lang.String DOCUMENT_META_SUFFIX
DOCUMENT_META_SUFFIX
The suffix for document meta Uris
Method Detail |
---|
java.util.Date getExpires() throws DocumentException
DocumentException
- if an error occurs.java.lang.String getName()
Publication getPublication()
java.lang.String getCanonicalWebappURL()
java.lang.String getCanonicalDocumentURL()
java.lang.String getLanguage()
java.lang.String[] getLanguages() throws DocumentException
DocumentException
- if an error occurslong getLastModified() throws DocumentException
DocumentException
- if an error occurs.java.lang.String getArea()
java.io.File getFile()
getSourceURI()
instead.
java.lang.String getExtension()
java.lang.String getUUID()
boolean exists() throws DocumentException
DocumentException
- if an error occursboolean existsInAnyLanguage() throws DocumentException
DocumentException
- if an error occursDocumentFactory getFactory()
java.lang.String getSourceURI()
getOutputStream()
.
java.io.OutputStream getOutputStream()
void accept(DocumentVisitor visitor) throws PublicationException
visitor
- The visitor.
PublicationException
- if an error occurs.void delete() throws DocumentException
DocumentException
- if an error occurs.Node getRepositoryNode()
ResourceType getResourceType() throws DocumentException
DocumentException
- if an error occurs.void setResourceType(ResourceType resourceType)
resourceType
- The resource type of this document.java.lang.String getSourceExtension()
void setSourceExtension(java.lang.String extension)
extension
- The source extension used by this document, without the dot.void setMimeType(java.lang.String mimeType) throws DocumentException
mimeType
- The mime type.
DocumentException
- if an error occurs.java.lang.String getMimeType() throws DocumentException
DocumentException
- if an error occurs.long getContentLength() throws DocumentException
DocumentException
- if an error occurs.DocumentIdentifier getIdentifier()
java.lang.String getPath() throws DocumentException
DocumentException
- if the document is not linked in the site structure.boolean existsTranslation(java.lang.String language)
language
- The language.
Document getTranslation(java.lang.String language) throws DocumentException
language
- The language.
DocumentException
- if the language version doesn't exist.boolean existsAreaVersion(java.lang.String area)
area
- The area.
Document getAreaVersion(java.lang.String area) throws DocumentException
area
- The area.
DocumentException
- if the area version doesn't exist.boolean existsVersion(java.lang.String area, java.lang.String language)
area
- The area.language
- The language.
Document getVersion(java.lang.String area, java.lang.String language) throws DocumentException
area
- The area.language
- The language.
DocumentException
- if the area version doesn't exist.DocumentLocator getLocator()
Link getLink() throws DocumentException
DocumentException
- if the document is not referenced in the site structure.Area area()
boolean hasLink()
java.io.InputStream getInputStream()
int getRevisionNumber()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |