org.apache.lenya.cms.publication
Class PageEnvelope

java.lang.Object
  extended by org.apache.lenya.cms.publication.PageEnvelope

public class PageEnvelope
extends java.lang.Object

A page envelope carries a set of information that are needed during the presentation of a document.


Field Summary
static java.lang.String AREA
           
static java.lang.String BREADCRUMB_PREFIX
           
static java.lang.String CONTEXT
           
static java.lang.String DEFAULT_LANGUAGE
           
static java.lang.String DEFAULT_PREFIX
           
static java.lang.String DOCUMENT
           
static java.lang.String DOCUMENT_DC_CREATOR
          Deprecated. Use Document.getDublinCore() instead
static java.lang.String DOCUMENT_DC_DATE_CREATED
          Deprecated. Use Document.getDublinCore() instead
static java.lang.String DOCUMENT_DC_DESCRIPTION
          Deprecated. Use Document.getDublinCore() instead
static java.lang.String DOCUMENT_DC_PUBLISHER
          Deprecated. Use Document.getDublinCore() instead
static java.lang.String DOCUMENT_DC_RIGHTS
          Deprecated. Use Document.getDublinCore() instead
static java.lang.String DOCUMENT_DC_SUBJECT
          Deprecated. Use Document.getDublinCore() instead
static java.lang.String DOCUMENT_DC_TITLE
          Deprecated. Use Document.getDublinCore() instead
static java.lang.String DOCUMENT_EXTENSION
           
static java.lang.String DOCUMENT_FILE
           
static java.lang.String DOCUMENT_ID
           
static java.lang.String DOCUMENT_LABEL
           
static java.lang.String DOCUMENT_LANGUAGE
           
static java.lang.String DOCUMENT_LANGUAGES
           
static java.lang.String DOCUMENT_LANGUAGES_CSV
           
static java.lang.String DOCUMENT_LASTMODIFIED
           
static java.lang.String DOCUMENT_NAME
           
static java.lang.String DOCUMENT_NODE_ID
           
static java.lang.String DOCUMENT_PATH
           
static java.lang.String DOCUMENT_TYPE
           
static java.lang.String DOCUMENT_URL
           
static java.lang.String DOCUMENT_URL_WITHOUT_LANGUAGE
           
static java.lang.String NAMESPACE
           
static java.lang.String[] PARAMETER_NAMES
          The names of the page envelope parameters.
static java.lang.String PUBLICATION
           
static java.lang.String PUBLICATION_ID
           
static java.lang.String PUBLICATION_LANGUAGES_CSV
           
static java.lang.String SSL_PREFIX
           
 
Constructor Summary
protected PageEnvelope()
          Constructor.
  PageEnvelope(java.util.Map objectModel)
          Deprecated. Performance problems. Use PageEnvelopeFactory.getPageEnvelope(Map) instead.
protected PageEnvelope(java.util.Map objectModel, boolean createdByFactory)
          Creates a page envelope from an object model.
  PageEnvelope(Publication publication, org.apache.cocoon.environment.Request request)
          Deprecated. Performance problems. Use PageEnvelopeFactory.getPageEnvelope(Map) instead.
  PageEnvelope(Publication publication, org.apache.cocoon.environment.Request request, boolean createdByFactory)
          Creates a new instance of PageEnvelope from a sitemap inside a publication.
 
Method Summary
protected  java.lang.String createExceptionMessage(org.apache.cocoon.environment.Request request)
          Creates the message to report when creating the envelope failed.
 java.lang.String getContext()
          Returns the context, e.g.
 Document getDocument()
          Returns the document.
 java.lang.String getDocumentPath()
          Returns the document-path.
 Publication getPublication()
          Returns the publication of this PageEnvelope.
 RCEnvironment getRCEnvironment()
          Deprecated. We should detach the RC environment from the page envelope.
protected  void init(Publication publication, org.apache.cocoon.environment.Request request)
          Setup an instance of Publication.
protected  void setContext(java.lang.String string)
           
 void setDocument(Document document)
          Sets the document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PUBLICATION_ID

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

PUBLICATION

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

PUBLICATION_LANGUAGES_CSV

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

CONTEXT

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

AREA

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

DEFAULT_LANGUAGE

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

DOCUMENT

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

DOCUMENT_ID

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

DOCUMENT_NAME

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

DOCUMENT_TYPE

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

DOCUMENT_NODE_ID

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

DOCUMENT_LABEL

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

DOCUMENT_URL

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

DOCUMENT_URL_WITHOUT_LANGUAGE

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

DOCUMENT_FILE

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

DOCUMENT_PATH

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

DOCUMENT_EXTENSION

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

DOCUMENT_LANGUAGE

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

DOCUMENT_LANGUAGES

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

DOCUMENT_LANGUAGES_CSV

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

DOCUMENT_DC_TITLE

public static final java.lang.String DOCUMENT_DC_TITLE
Deprecated. Use Document.getDublinCore() instead
See Also:
Constant Field Values

DOCUMENT_DC_CREATOR

public static final java.lang.String DOCUMENT_DC_CREATOR
Deprecated. Use Document.getDublinCore() instead
See Also:
Constant Field Values

DOCUMENT_DC_SUBJECT

public static final java.lang.String DOCUMENT_DC_SUBJECT
Deprecated. Use Document.getDublinCore() instead
See Also:
Constant Field Values

DOCUMENT_DC_PUBLISHER

public static final java.lang.String DOCUMENT_DC_PUBLISHER
Deprecated. Use Document.getDublinCore() instead
See Also:
Constant Field Values

DOCUMENT_DC_DATE_CREATED

public static final java.lang.String DOCUMENT_DC_DATE_CREATED
Deprecated. Use Document.getDublinCore() instead
See Also:
Constant Field Values

DOCUMENT_DC_DESCRIPTION

public static final java.lang.String DOCUMENT_DC_DESCRIPTION
Deprecated. Use Document.getDublinCore() instead
See Also:
Constant Field Values

DOCUMENT_DC_RIGHTS

public static final java.lang.String DOCUMENT_DC_RIGHTS
Deprecated. Use Document.getDublinCore() instead
See Also:
Constant Field Values

DOCUMENT_LASTMODIFIED

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

BREADCRUMB_PREFIX

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

SSL_PREFIX

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

NAMESPACE

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

DEFAULT_PREFIX

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

PARAMETER_NAMES

public static final java.lang.String[] PARAMETER_NAMES
The names of the page envelope parameters.

Constructor Detail

PageEnvelope

protected PageEnvelope()
Constructor.


PageEnvelope

public PageEnvelope(Publication publication,
                    org.apache.cocoon.environment.Request request)
             throws PageEnvelopeException
Deprecated. Performance problems. Use PageEnvelopeFactory.getPageEnvelope(Map) instead.

Creates a new instance of PageEnvelope from a sitemap inside a publication.

Parameters:
publication - The publication the page belongs to.
request - The request that calls the page.
Throws:
PageEnvelopeException - if an error occurs

PageEnvelope

public PageEnvelope(java.util.Map objectModel)
             throws PageEnvelopeException
Deprecated. Performance problems. Use PageEnvelopeFactory.getPageEnvelope(Map) instead.

Creates a page envelope from an object model.

Parameters:
objectModel - The object model.
Throws:
PageEnvelopeException - when something went wrong.

PageEnvelope

public PageEnvelope(Publication publication,
                    org.apache.cocoon.environment.Request request,
                    boolean createdByFactory)
             throws PageEnvelopeException
Creates a new instance of PageEnvelope from a sitemap inside a publication.

Parameters:
publication - The publication the page belongs to.
request - The request that calls the page.
createdByFactory - A dummy parameter to allow creating an additional protected constructor that is not deprecated.
Throws:
PageEnvelopeException - if an error occurs

PageEnvelope

protected PageEnvelope(java.util.Map objectModel,
                       boolean createdByFactory)
                throws PageEnvelopeException
Creates a page envelope from an object model.

Parameters:
objectModel - The object model.
createdByFactory - A dummy parameter to allow creating an additional protected constructor that is not deprecated.
Throws:
PageEnvelopeException - when something went wrong.
Method Detail

init

protected void init(Publication publication,
                    org.apache.cocoon.environment.Request request)
             throws PageEnvelopeException
Setup an instance of Publication. Shared by multiple constructors.

Parameters:
publication - The publication the page belongs to.
request - The request that calls the page.
Throws:
PageEnvelopeException - if an error occurs.

createExceptionMessage

protected java.lang.String createExceptionMessage(org.apache.cocoon.environment.Request request)
Creates the message to report when creating the envelope failed.

Parameters:
request - The request.
Returns:
A string.

getPublication

public Publication getPublication()
Returns the publication of this PageEnvelope.

Returns:
a Publication value

getRCEnvironment

public RCEnvironment getRCEnvironment()
Deprecated. We should detach the RC environment from the page envelope.

Returns the rcEnvironment.

Returns:
a RCEnvironment value

getContext

public java.lang.String getContext()
Returns the context, e.g. "/lenya".

Returns:
a String value

getDocumentPath

public java.lang.String getDocumentPath()
Returns the document-path.

Returns:
a File value

setContext

protected void setContext(java.lang.String string)
Parameters:
string - The context.

getDocument

public Document getDocument()
Returns the document.

Returns:
A document

setDocument

public void setDocument(Document document)
Sets the document.

Parameters:
document - A document.


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