org.apache.lenya.cms.publication
Interface Publication

All Superinterfaces:
RepositoryItem

public interface Publication
extends RepositoryItem

A Lenya publication.


Field Summary
static java.lang.String ARCHIVE_AREA
          ARCHIVE_AREA The archive area
static java.lang.String AUTHORING_AREA
          AUTHORING_AREA The authoring area
static java.lang.String CONFIGURATION_PATH
          CONFIGURATION_PATH The configuration path
static java.lang.String CONTENT_PATH
          CONTENT_PATH The content path
static java.lang.String DAV_AREA
          DAV_AREA The webDAV authoring area
static java.lang.String DELETE_PATH
          DELETE_PATH The delete path
static java.lang.String ITEM_TYPE
          The item type.
static java.lang.String LIVE_AREA
          LIVE_AREA The live area
static java.lang.String PENDING_PATH
          PENDING_PATH The pending path
static java.lang.String PUBLICATION_PREFIX
          PUBLICATION_PREFIX The publication prefix
static java.lang.String PUBLICATION_PREFIX_URI
          PUBLICATION_PREFIX_URI The publication prefix URI
static java.lang.String STAGING_AREA
          STAGING_AREA The staging area
static java.lang.String TRASH_AREA
          TRASH_AREA The trash area
 
Method Summary
 boolean exists()
           
 Area getArea(java.lang.String name)
           
 java.lang.String[] getAreaNames()
           
 java.lang.String getBreadcrumbPrefix()
          Get the breadcrumb prefix.
 java.lang.String getContentDir()
          Returns the content dir.
 java.io.File getContentDirectory(java.lang.String area)
          Return the directory of a specific area.
 java.lang.String getContentURI(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.
 DocumentFactory getFactory()
           
 java.lang.String getId()
          Returns the publication ID.
 java.lang.String getInstantiatorHint()
          Returns the publication template instantiator hint.
 java.lang.String[] getLanguages()
          Get all available languages for this publication
 java.lang.String getName()
           
 DocumentIdToPathMapper getPathMapper()
          Returns the path mapper.
 Proxy getProxy(Document document, boolean isSslProtected)
          Returns the proxy which is used for a particular document's area (see getProxy(String, boolean)).
 Proxy getProxy(java.lang.String area, boolean isSslProtected)
           Returns the proxy which is used for the given area and the ssl parameter.
 java.lang.String[] getResourceTypeNames()
           
 java.io.File getServletContext()
          Returns the servlet context this publication belongs to (usually, the webapps/lenya directory).
 java.lang.String getSiteManagerHint()
          Returns the hint of the site manager service that is used by this publication.
 java.lang.String getSourceURI()
           
 java.lang.String[] getTemplateIds()
           
 java.lang.String getWorkflowSchema(ResourceType resourceType)
           
 void setDefaultLanguage(java.lang.String language)
          Set the default language
 void setPathMapper(DefaultDocumentIdToPathMapper mapper)
          Set the path mapper
 
Methods inherited from interface org.apache.lenya.cms.repository.RepositoryItem
getSession
 

Field Detail

AUTHORING_AREA

static final java.lang.String AUTHORING_AREA
AUTHORING_AREA The authoring area

See Also:
Constant Field Values

DAV_AREA

static final java.lang.String DAV_AREA
DAV_AREA The webDAV authoring area

See Also:
Constant Field Values

STAGING_AREA

static final java.lang.String STAGING_AREA
STAGING_AREA The staging area

See Also:
Constant Field Values

LIVE_AREA

static final java.lang.String LIVE_AREA
LIVE_AREA The live area

See Also:
Constant Field Values

ARCHIVE_AREA

static final java.lang.String ARCHIVE_AREA
ARCHIVE_AREA The archive area

See Also:
Constant Field Values

TRASH_AREA

static final java.lang.String TRASH_AREA
TRASH_AREA The trash area

See Also:
Constant Field Values

PUBLICATION_PREFIX

static final java.lang.String PUBLICATION_PREFIX
PUBLICATION_PREFIX The publication prefix


PUBLICATION_PREFIX_URI

static final java.lang.String PUBLICATION_PREFIX_URI
PUBLICATION_PREFIX_URI The publication prefix URI

See Also:
Constant Field Values

CONFIGURATION_PATH

static final java.lang.String CONFIGURATION_PATH
CONFIGURATION_PATH The configuration path

See Also:
Constant Field Values

CONTENT_PATH

static final java.lang.String CONTENT_PATH
CONTENT_PATH The content path

See Also:
Constant Field Values

PENDING_PATH

static final java.lang.String PENDING_PATH
PENDING_PATH The pending path

See Also:
Constant Field Values

DELETE_PATH

static final java.lang.String DELETE_PATH
DELETE_PATH The delete path

See Also:
Constant Field Values

ITEM_TYPE

static final java.lang.String ITEM_TYPE
The item type.

See Also:
Constant Field Values
Method Detail

getId

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

Returns:
A string value.

getName

java.lang.String getName()
Returns:
The name of the publication as specified in the configuration file.

getServletContext

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

Returns:
A File object.

exists

boolean exists()
Returns:
if this publication exists.

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)
Set the path mapper

Parameters:
mapper - The path mapper

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

getSiteManagerHint

java.lang.String getSiteManagerHint()
Returns the hint of the site manager service that is used by this publication.

Returns:
A hint to use for service selection.

getDocumentBuilder

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

Returns:
A hint to use for service selection.

getInstantiatorHint

java.lang.String getInstantiatorHint()
Returns the publication template instantiator hint. If the publication does not allow templating, null is returned.

Returns:
A hint to use for service selection.

getContentDir

java.lang.String getContentDir()
Returns the content dir. If the publication does not specify a content dir, then null is returned.

Returns:
A base directory where all the content is located.

getProxy

Proxy getProxy(Document document,
               boolean isSslProtected)
Returns the proxy which is used for a particular document's area (see getProxy(String, boolean)).

Parameters:
document - The document.
isSslProtected - A boolean value.
Returns:
A proxy.

getProxy

Proxy getProxy(java.lang.String area,
               boolean isSslProtected)

Returns the proxy which is used for the given area and the ssl parameter.

If no proxy is defined in the publication configuration file, a default proxy with the URL {contextPath}/{pubId}/{area} is returned.

If the area string is "root", the global proxy is returned. If no global proxy is defined, a default global proxy with the URL {contextPath} is returned.

Parameters:
area - area
isSslProtected - A boolean value.
Returns:
A proxy.

getTemplateIds

java.lang.String[] getTemplateIds()
Returns:
The templates of the publication.

getSourceURI

java.lang.String getSourceURI()
Returns:
the URI base for this publication

getContentURI

java.lang.String getContentURI(java.lang.String area)
Parameters:
area - The area.
Returns:
the URI base under which contents in this publication are accessed

getWorkflowSchema

java.lang.String getWorkflowSchema(ResourceType resourceType)
Parameters:
resourceType - The resource type or null if no workflow is registered for this resource type.
Returns:
The workflow schema to use for this resource type.

getResourceTypeNames

java.lang.String[] getResourceTypeNames()
Returns:
The resource types that are supported by this publication.

getArea

Area getArea(java.lang.String name)
             throws PublicationException
Parameters:
name - The name.
Returns:
An area object.
Throws:
PublicationException - if an error occurs.

getAreaNames

java.lang.String[] getAreaNames()
Returns:
The names of all available areas.

getFactory

DocumentFactory getFactory()
Returns:
The document factory.


Copyright 1999-2006 Apache Software Foundation. All Rights Reserved.