org.apache.lenya.cms.publication
Interface Publication

All Known Implementing Classes:
AbstractPublication, FilePublication

public interface Publication

A Lenya publication.


Field Summary
static java.lang.String ADMIN_AREA
           
static java.lang.String ARCHIVE_AREA
           
static java.lang.String ATTRIBUTE_TYPE
           
static java.lang.String AUTHORING_AREA
           
static java.lang.String BREADCRUMB_PREFIX
           
static java.lang.String CONFIGURATION_FILE
           
static java.lang.String CONFIGURATION_PATH
           
static java.lang.String CONTENT_PATH
           
static java.lang.String DEFAULT_LANGUAGE_ATTR
           
static java.lang.String DELETE_PATH
           
static java.lang.String ELEMENT_DOCUMENT_BUILDER
           
static java.lang.String ELEMENT_PATH_MAPPER
           
static java.lang.String ELEMENT_SITE_STRUCTURE
           
static java.lang.String INFO_AREA_PREFIX
           
static java.lang.String LANGUAGE
           
static java.lang.String LANGUAGES
           
static java.lang.String LIVE_AREA
           
static java.lang.String LIVE_MOUNT_POINT
           
static java.lang.String PENDING_PATH
           
static java.lang.String PUBLICATION_PREFIX
           
static java.lang.String PUBLICATION_PREFIX_URI
           
static java.lang.String SEARCH_AREA_PREFIX
           
static java.lang.String SSL_PREFIX
           
static java.lang.String STAGING_AREA
           
static java.lang.String TRASH_AREA
           
 
Method Summary
 void copyDocument(Document sourceDocument, Document destinationDocument)
          Copies a document from one location to another location.
 void copyDocumentSetToArea(DocumentSet documentSet, java.lang.String destinationArea)
          Copies a document set to another area.
 void copyDocumentToArea(Document sourceDocument, java.lang.String destinationArea)
          Copies a document to another area.
 void deleteDocument(Document document)
          Deletes a document.
 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.
 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.
 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.
 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!
 

Field Detail

AUTHORING_AREA

static final java.lang.String AUTHORING_AREA
See Also:
Constant Field Values

STAGING_AREA

static final java.lang.String STAGING_AREA
See Also:
Constant Field Values

LIVE_AREA

static final java.lang.String LIVE_AREA
See Also:
Constant Field Values

ADMIN_AREA

static final java.lang.String ADMIN_AREA
See Also:
Constant Field Values

ARCHIVE_AREA

static final java.lang.String ARCHIVE_AREA
See Also:
Constant Field Values

TRASH_AREA

static final java.lang.String TRASH_AREA
See Also:
Constant Field Values

ELEMENT_PATH_MAPPER

static final java.lang.String ELEMENT_PATH_MAPPER
See Also:
Constant Field Values

ELEMENT_DOCUMENT_BUILDER

static final java.lang.String ELEMENT_DOCUMENT_BUILDER
See Also:
Constant Field Values

ELEMENT_SITE_STRUCTURE

static final java.lang.String ELEMENT_SITE_STRUCTURE
See Also:
Constant Field Values

ATTRIBUTE_TYPE

static final java.lang.String ATTRIBUTE_TYPE
See Also:
Constant Field Values

LANGUAGES

static final java.lang.String LANGUAGES
See Also:
Constant Field Values

LANGUAGE

static final java.lang.String LANGUAGE
See Also:
Constant Field Values

DEFAULT_LANGUAGE_ATTR

static final java.lang.String DEFAULT_LANGUAGE_ATTR
See Also:
Constant Field Values

BREADCRUMB_PREFIX

static final java.lang.String BREADCRUMB_PREFIX
See Also:
Constant Field Values

SSL_PREFIX

static final java.lang.String SSL_PREFIX
See Also:
Constant Field Values

LIVE_MOUNT_POINT

static final java.lang.String LIVE_MOUNT_POINT
See Also:
Constant Field Values

PUBLICATION_PREFIX

static final java.lang.String PUBLICATION_PREFIX

PUBLICATION_PREFIX_URI

static final java.lang.String PUBLICATION_PREFIX_URI
See Also:
Constant Field Values

CONFIGURATION_PATH

static final java.lang.String CONFIGURATION_PATH
See Also:
Constant Field Values

CONTENT_PATH

static final java.lang.String CONTENT_PATH
See Also:
Constant Field Values

PENDING_PATH

static final java.lang.String PENDING_PATH
See Also:
Constant Field Values

DELETE_PATH

static final java.lang.String DELETE_PATH
See Also:
Constant Field Values

INFO_AREA_PREFIX

static final java.lang.String INFO_AREA_PREFIX
See Also:
Constant Field Values

SEARCH_AREA_PREFIX

static final java.lang.String SEARCH_AREA_PREFIX
See Also:
Constant Field Values

CONFIGURATION_FILE

static final java.lang.String CONFIGURATION_FILE
Method Detail

getId

java.lang.String getId()
Returns the publication ID.

Returns:
A string value.

getEnvironment

PublishingEnvironment getEnvironment()
Deprecated. It is planned to decouple the environments from the publication.

Returns the publishing environment of this publication.

Returns:
A PublishingEnvironment object.

getServletContext

java.io.File getServletContext()
Returns the servlet context this publication belongs to (usually, the webapps/lenya directory).

Returns:
A File object.

getDirectory

java.io.File getDirectory()
Returns the publication directory.

Returns:
A File object.

getContentDirectory

java.io.File getContentDirectory(java.lang.String area)
Return the directory of a specific area.

Parameters:
area - a File representing the root of the area content directory.
Returns:
the directory of the given content area.

setPathMapper

void setPathMapper(DefaultDocumentIdToPathMapper mapper)
DOCUMENT ME!

Parameters:
mapper - DOCUMENT ME!

getPathMapper

DocumentIdToPathMapper getPathMapper()
Returns the path mapper.

Returns:
a DocumentIdToPathMapper

getDefaultLanguage

java.lang.String getDefaultLanguage()
Get the default language

Returns:
the default language

setDefaultLanguage

void setDefaultLanguage(java.lang.String language)
Set the default language

Parameters:
language - the default language

getLanguages

java.lang.String[] getLanguages()
Get all available languages for this publication

Returns:
an Array of languages

getBreadcrumbPrefix

java.lang.String getBreadcrumbPrefix()
Get the breadcrumb prefix. It can be used as a prefix if a publication is part of a larger site

Returns:
the breadcrumb prefix

getSSLPrefix

java.lang.String getSSLPrefix()
Get the SSL prefix. If you want to serve SSL-protected pages through a special site, use this prefix. This can come in handy if you have multiple sites that need SSL protection and you want to share one SSL certificate.

Returns:
the SSL prefix

getLiveMountPoint

java.lang.String getLiveMountPoint()
Get the Live mount point. The live mount point is used to rewrite links that are of the form /contextprefix/publication/area/documentid to /livemountpoint/documentid This is useful if you serve your live area through mod_proxy. to enable this functionality, set the Live mount point to / or something else. An empty mount point disables the feature.

Returns:
the Live mount point

getTree

SiteTree getTree(java.lang.String area)
                 throws SiteTreeException
Get the sitetree for a specific area of this publication. Sitetrees are created on demand and are cached.

Parameters:
area - the area
Returns:
the sitetree for the specified area
Throws:
SiteTreeException - if an error occurs

getSiteTree

DefaultSiteTree getSiteTree(java.lang.String area)
                            throws SiteTreeException
Deprecated. Please use getTree() because this method returns the interface and not a specific implementation

Get the sitetree for a specific area of this publication. Sitetrees are created on demand and are cached.

Parameters:
area - the area
Returns:
the sitetree for the specified area
Throws:
SiteTreeException - if an error occurs
See Also:
getTree()

getDocumentBuilder

DocumentBuilder getDocumentBuilder()
Returns the document builder of this instance.

Returns:
A document builder.

copyDocument

void copyDocument(Document sourceDocument,
                  Document destinationDocument)
                  throws PublicationException
Copies a document from one location to another location.

Parameters:
sourceDocument - The document to copy.
destinationDocument - The destination document.
Throws:
PublicationException - if a document which destinationDocument depends on does not exist.

copyDocumentToArea

void copyDocumentToArea(Document sourceDocument,
                        java.lang.String destinationArea)
                        throws PublicationException
Copies a document to another area.

Parameters:
sourceDocument - The document to copy.
destinationArea - The destination area.
Throws:
PublicationException - if a document which the destination document depends on does not exist.

copyDocumentSetToArea

void copyDocumentSetToArea(DocumentSet documentSet,
                           java.lang.String destinationArea)
                           throws PublicationException
Copies a document set to another area.

Parameters:
documentSet - The document set to copy.
destinationArea - The destination area.
Throws:
PublicationException - if a document which one of the destination documents depends on does not exist.

deleteDocument

void deleteDocument(Document document)
                    throws PublicationException
Deletes a document.

Parameters:
document - The document to delete.
Throws:
PublicationException - when something went wrong.

moveDocument

void moveDocument(Document sourceDocument,
                  Document destinationDocument)
                  throws PublicationException
Moves a document from one location to another.

Parameters:
sourceDocument - The source document.
destinationDocument - The destination document.
Throws:
PublicationException - if a document which the destination document depends on does not exist.

getAreaVersion

Document getAreaVersion(Document document,
                        java.lang.String area)
                        throws PublicationException
Creates a version of the document object in another area.

Parameters:
document - The document to clone.
area - The destination area.
Returns:
A document.
Throws:
PublicationException - when an error occurs.

getProxy

Proxy getProxy(Document document,
               boolean isSslProtected)
Returns the proxy which is used for a particular document.

Parameters:
document - The document.
isSslProtected - A boolean value.
Returns:
A proxy or null if no proxy is defined for this version.

getRewriteAttributeXPaths

java.lang.String[] getRewriteAttributeXPaths()
Returns an array of XPaths representing attributes to be rewritten when a document URL has changed.

Returns:
An array of strings.


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.