|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.lenya.cms.publication.AbstractPublication
public abstract class AbstractPublication
A publication.
| Field Summary |
|---|
| Fields inherited from interface org.apache.lenya.cms.publication.Publication |
|---|
ADMIN_AREA, ARCHIVE_AREA, ATTRIBUTE_TYPE, AUTHORING_AREA, BREADCRUMB_PREFIX, CONFIGURATION_FILE, CONFIGURATION_PATH, CONTENT_PATH, DEFAULT_LANGUAGE_ATTR, DELETE_PATH, ELEMENT_DOCUMENT_BUILDER, ELEMENT_PATH_MAPPER, ELEMENT_SITE_STRUCTURE, INFO_AREA_PREFIX, LANGUAGE, LANGUAGES, LIVE_AREA, LIVE_MOUNT_POINT, PENDING_PATH, PUBLICATION_PREFIX, PUBLICATION_PREFIX_URI, SEARCH_AREA_PREFIX, SSL_PREFIX, STAGING_AREA, TRASH_AREA |
| Constructor Summary | |
|---|---|
protected |
AbstractPublication(java.lang.String id,
java.lang.String servletContextPath)
Creates a new instance of Publication |
| Method Summary | |
|---|---|
void |
copyDocument(Document sourceDocument,
Document destinationDocument)
Template method to copy a document. |
protected abstract void |
copyDocumentSource(Document sourceDocument,
Document destinationDocument)
Copies a document source. |
protected void |
copySiteStructure(Document sourceDocument,
Document destinationDocument)
Copies a document in the site structure. |
void |
deleteDocument(Document document)
Deletes a document. |
protected abstract void |
deleteDocumentSource(Document document)
Deletes the source of a document. |
protected void |
deleteFromSiteStructure(Document document)
Deletes a document from the site structure. |
boolean |
equals(java.lang.Object object)
|
Document |
getAreaVersion(Document document,
java.lang.String area)
Creates a version of the document object in another area. |
java.lang.String |
getBreadcrumbPrefix()
Get the breadcrumb prefix. |
java.io.File |
getContentDirectory(java.lang.String area)
Return the directory of a specific area. |
protected java.lang.Object |
getContentDirKey(java.lang.String area)
|
java.lang.String |
getDefaultLanguage()
Get the default language |
java.io.File |
getDirectory()
Returns the publication directory. |
DocumentBuilder |
getDocumentBuilder()
Returns the document builder of this instance. |
PublishingEnvironment |
getEnvironment()
Deprecated. It is planned to decouple the environments from the publication. |
java.lang.String |
getId()
Returns the publication ID. |
java.lang.String[] |
getLanguages()
Get all available languages for this publication |
java.lang.String |
getLiveMountPoint()
Get the Live mount point. |
DocumentIdToPathMapper |
getPathMapper()
Returns the path mapper. |
Proxy |
getProxy(Document document,
boolean isSslProtected)
Returns the proxy which is used for a particular document. |
protected java.lang.Object |
getProxyKey(java.lang.String area,
boolean isSslProtected)
Generates a hash key for a area-SSL combination. |
java.lang.String[] |
getRewriteAttributeXPaths()
Returns an array of XPaths representing attributes to be rewritten when a document URL has changed. |
java.io.File |
getServletContext()
Returns the servlet context this publication belongs to (usually, the webapps/lenya directory). |
DefaultSiteTree |
getSiteTree(java.lang.String area)
Deprecated. Please use getTree() because this method returns the interface and not a specific implementation |
java.lang.String |
getSSLPrefix()
Get the SSL prefix. |
SiteTree |
getTree(java.lang.String area)
Get the sitetree for a specific area of this publication. |
int |
hashCode()
|
static boolean |
isValidArea(java.lang.String area)
Returns if a given string is a valid area name. |
void |
moveDocument(Document sourceDocument,
Document destinationDocument)
Moves a document from one location to another. |
void |
setDefaultLanguage(java.lang.String language)
Set the default language |
void |
setPathMapper(DefaultDocumentIdToPathMapper mapper)
DOCUMENT ME! |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.lenya.cms.publication.Publication |
|---|
copyDocumentSetToArea, copyDocumentToArea |
| Constructor Detail |
|---|
protected AbstractPublication(java.lang.String id,
java.lang.String servletContextPath)
throws PublicationException
id - the publication idservletContextPath - the servlet context of this publication
PublicationException - if there was a problem reading the config file| Method Detail |
|---|
public java.lang.String getId()
getId in interface Publicationpublic PublishingEnvironment getEnvironment()
getEnvironment in interface PublicationPublishingEnvironmentobject.public java.io.File getServletContext()
webapps/lenya directory).
getServletContext in interface PublicationFile object.public java.io.File getDirectory()
getDirectory in interface PublicationFile object.public java.io.File getContentDirectory(java.lang.String area)
getContentDirectory in interface Publicationarea - a File representing the root of the area content directory.
public void setPathMapper(DefaultDocumentIdToPathMapper mapper)
setPathMapper in interface Publicationmapper - DOCUMENT ME!public DocumentIdToPathMapper getPathMapper()
getPathMapper in interface PublicationDocumentIdToPathMapperpublic static boolean isValidArea(java.lang.String area)
area - The area string to test.
public java.lang.String getDefaultLanguage()
getDefaultLanguage in interface Publicationpublic void setDefaultLanguage(java.lang.String language)
setDefaultLanguage in interface Publicationlanguage - the default languagepublic java.lang.String[] getLanguages()
getLanguages in interface PublicationArray of languagespublic java.lang.String getBreadcrumbPrefix()
getBreadcrumbPrefix in interface Publicationpublic java.lang.String getSSLPrefix()
getSSLPrefix in interface Publicationpublic java.lang.String getLiveMountPoint()
getLiveMountPoint in interface Publication
public SiteTree getTree(java.lang.String area)
throws SiteTreeException
getTree in interface Publicationarea - the area
SiteTreeException - if an error occurs
public DefaultSiteTree getSiteTree(java.lang.String area)
throws SiteTreeException
getSiteTree in interface Publicationarea - the area
SiteTreeException - if an error occursgetTree()public DocumentBuilder getDocumentBuilder()
getDocumentBuilder in interface Publication
public Document getAreaVersion(Document document,
java.lang.String area)
throws PublicationException
getAreaVersion in interface Publicationdocument - The document to clone.area - The destination area.
PublicationException - when an error occurs.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 void copyDocument(Document sourceDocument,
Document destinationDocument)
throws PublicationException
copyDocumentSource(Document, Document)
to implement access to a custom repository.
copyDocument in interface PublicationsourceDocument - The document to copy.destinationDocument - The destination document.
PublicationException - if a document which destinationDocument depends on
does not exist.Publication.copyDocument(org.apache.lenya.cms.publication.Document,
org.apache.lenya.cms.publication.Document)
protected void copySiteStructure(Document sourceDocument,
Document destinationDocument)
throws PublicationException
sourceDocument - The source document.destinationDocument - The destination document.
PublicationException - when something went wrong.
protected abstract void copyDocumentSource(Document sourceDocument,
Document destinationDocument)
throws PublicationException
sourceDocument - The source document.destinationDocument - The destination document.
PublicationException - when something went wrong.
public void deleteDocument(Document document)
throws PublicationException
Publication
deleteDocument in interface Publicationdocument - The document to delete.
PublicationException - when something went wrong.Publication.deleteDocument(org.apache.lenya.cms.publication.Document)
protected void deleteFromSiteStructure(Document document)
throws PublicationException
document - The document to remove.
PublicationException - when something went wrong.
protected abstract void deleteDocumentSource(Document document)
throws PublicationException
document - The document to delete.
PublicationException - when something went wrong.
public void moveDocument(Document sourceDocument,
Document destinationDocument)
throws PublicationException
Publication
moveDocument in interface PublicationsourceDocument - The source document.destinationDocument - The destination document.
PublicationException - if a document which the
destination document depends on does not exist.Publication.moveDocument(org.apache.lenya.cms.publication.Document,
org.apache.lenya.cms.publication.Document)
protected java.lang.Object getProxyKey(java.lang.String area,
boolean isSslProtected)
area - The area.isSslProtected - If the proxy is assigned for SSL-protected pages.
public Proxy getProxy(Document document,
boolean isSslProtected)
Publication
getProxy in interface Publicationdocument - The document.isSslProtected - A boolean value.
null if no proxy is defined
for this version.Publication.getProxy(org.apache.lenya.cms.publication.Document,
boolean)public java.lang.String[] getRewriteAttributeXPaths()
Publication
getRewriteAttributeXPaths in interface PublicationPublication.getRewriteAttributeXPaths()protected java.lang.Object getContentDirKey(java.lang.String area)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||