| 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.lenya.cms.publication.DefaultDocument
public class DefaultDocument
A typical CMS document.
| Field Summary | 
|---|
| Fields inherited from interface org.apache.lenya.cms.publication.Document | 
|---|
DEFAULT_PREFIX, NAMESPACE | 
| Constructor Summary | |
|---|---|
  | 
DefaultDocument(Publication publication,
                java.lang.String id)
Deprecated. Use DefaultDocumentBuilder instead. | 
protected  | 
DefaultDocument(Publication publication,
                java.lang.String id,
                java.lang.String area)
Creates a new instance of DefaultDocument.  | 
protected  | 
DefaultDocument(Publication publication,
                java.lang.String id,
                java.lang.String area,
                java.lang.String language)
Creates a new instance of DefaultDocument.  | 
| Method Summary | |
|---|---|
 boolean | 
equals(java.lang.Object object)
 | 
 boolean | 
exists()
(non-Javadoc)  | 
 boolean | 
existsInAnyLanguage()
(non-Javadoc)  | 
 java.lang.String | 
getArea()
Returns the area this document belongs to.  | 
 java.lang.String | 
getCompleteInfoURL()
Returns the complete URL of this document in the info area: /{publication-id}/info-{area}{document-id}{language-suffix}.  | 
 java.lang.String | 
getCompleteURL()
Returns the complete URL of this document: /{publication-id}/{area}{document-id}{language-suffix}.  | 
 java.lang.String | 
getCompleteURLWithoutLanguage()
Returns the complete URL of this document without the language-suffix: /{publication-id}/{area}{document-id}.  | 
 java.lang.String | 
getDocumentURL()
Returns the URL of this document: {document-id}{language-suffix}.  | 
 DublinCore | 
getDublinCore()
Returns the dublin core class for this document.  | 
 java.lang.String | 
getExtension()
Returns the extension in the URL.  | 
 java.io.File | 
getFile()
Returns the file for this document.  | 
 java.lang.String | 
getId()
Returns the document ID of this document.  | 
 java.lang.String | 
getLabel()
Get the navigation label associated with this document for the language.  | 
 java.lang.String | 
getLanguage()
Returns the language of this document.  | 
 java.lang.String[] | 
getLanguages()
Returns all the languages this document is available in.  | 
 java.util.Date | 
getLastModified()
Returns the date of the last modification of this document.  | 
 java.lang.String | 
getName()
Returns the document name of this document.  | 
 java.lang.String | 
getNodeId()
Deprecated. replaced by getName()  | 
 Publication | 
getPublication()
Returns the publication this document belongs to.  | 
 int | 
hashCode()
 | 
protected  void | 
setArea(java.lang.String area)
Sets the area.  | 
 void | 
setDocumentURL(java.lang.String url)
Sets the document URL.  | 
protected  void | 
setExtension(java.lang.String extension)
Sets the extension of the file in the URL.  | 
 void | 
setLanguage(java.lang.String language)
Sets the language of this document.  | 
 java.lang.String | 
toString()
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public DefaultDocument(Publication publication,
                       java.lang.String id)
DefaultDocumentBuilder instead.
publication - The publication the document belongs to.id - The document ID (starting with a slash).
protected DefaultDocument(Publication publication,
                          java.lang.String id,
                          java.lang.String area)
publication - The publication the document belongs to.id - The document ID (starting with a slash).area - The area.
protected DefaultDocument(Publication publication,
                          java.lang.String id,
                          java.lang.String area,
                          java.lang.String language)
publication - The publication the document belongs to.id - The document ID (starting with a slash).area - The area.language - the language| Method Detail | 
|---|
public java.lang.String getId()
Document
getId in interface DocumentDocument.getId()public java.lang.String getName()
Document
getName in interface DocumentDocument.getName()public java.lang.String getNodeId()
Document
getNodeId in interface DocumentDocument.getNodeId()public Publication getPublication()
Document
getPublication in interface DocumentDocument.getPublication()public java.util.Date getLastModified()
Document
getLastModified in interface DocumentDocument.getLastModified()public DublinCore getDublinCore()
Document
getDublinCore in interface DocumentDocument.getDublinCore()public java.io.File getFile()
getFile in interface Documentpublic java.lang.String getLanguage()
Document
getLanguage in interface DocumentDocument.getLanguage()
public java.lang.String[] getLanguages()
                                throws DocumentException
Document
getLanguages in interface DocumentDocumentException - if an error occursDocument.getLanguage()public void setLanguage(java.lang.String language)
language - The language.
public java.lang.String getLabel()
                          throws DocumentException
Document
getLabel in interface DocumentDocumentException - if an error occursDocument.getLabel()public java.lang.String getArea()
Document
getArea in interface DocumentDocument.getArea()public java.lang.String getCompleteURL()
Document
getCompleteURL in interface DocumentDocument#getCompleteURL(String)public java.lang.String getCompleteInfoURL()
Document
getCompleteInfoURL in interface DocumentDocument#getCompleteInfoURL(String)public java.lang.String getCompleteURLWithoutLanguage()
Document
getCompleteURLWithoutLanguage in interface DocumentDocument#getCompleteURL(String)protected void setArea(java.lang.String area)
area - A string.public java.lang.String getExtension()
Document
getExtension in interface DocumentDocument.getExtension()protected void setExtension(java.lang.String extension)
extension - A string.public void setDocumentURL(java.lang.String url)
url - The document URL (without publication ID and area).public java.lang.String getDocumentURL()
Document
getDocumentURL in interface DocumentDocument.getDocumentURL()
public boolean exists()
               throws DocumentException
exists in interface DocumentDocumentException - if an error occursDocument.exists()
public boolean existsInAnyLanguage()
                            throws DocumentException
existsInAnyLanguage in interface DocumentDocumentException - if an error occursDocument.existsInAnyLanguage()public boolean equals(java.lang.Object object)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||