org.apache.lenya.cms.cocoon.components.modules.input
Class DocumentInfoModule

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.components.modules.input.AbstractInputModule
          extended by org.apache.lenya.cms.cocoon.components.modules.input.DocumentInfoModule
All Implemented Interfaces:
org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.component.Component, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.cocoon.components.modules.input.InputModule

public class DocumentInfoModule
extends org.apache.cocoon.components.modules.input.AbstractInputModule
implements org.apache.avalon.framework.service.Serviceable

Input module to get document information. {doc-info:{publication-id}:{area}:{uuid}:{document-language}:{property}} where {property} may be:


Field Summary
protected static java.lang.String CONTENT_LENGTH
           
protected  java.text.SimpleDateFormat dateFormat
           
protected static java.lang.String DOCUMENT_URL
           
protected static java.lang.String EXPIRES
           
protected static java.lang.String LANGUAGE
           
protected static java.lang.String LAST_MODIFIED
           
protected  org.apache.avalon.framework.service.ServiceManager manager
           
protected static java.lang.String META_EXPIRES
           
protected static java.lang.String META_RESOURCE_TYPE
           
protected static java.lang.String MIME_TYPE
           
protected static int MIN_MANDATORY_PARAMS
           
protected static java.lang.String NODE_NAME
           
protected static java.lang.String PARAM_AREA
           
protected static java.lang.String PARAM_DOCUMENT_LANGUAGE
           
protected static java.lang.String PARAM_PROPERTY
           
protected static java.lang.String PARAM_PUBLICATION_ID
           
protected static java.lang.String PARAM_REVISION
           
protected static java.lang.String PARAM_UUID
           
protected static java.lang.String[] PARAMS
           
protected static java.lang.String PATH
           
protected static java.lang.String RESOURCE_TYPE
           
protected static java.lang.String SOURCE_EXTENSION
           
protected static java.lang.String UUID
           
protected static java.lang.String VISIBLE_IN_NAVIGATION
           
protected static java.lang.String WEBAPP_URL
           
 
Fields inherited from class org.apache.cocoon.components.modules.input.AbstractInputModule
settings
 
Fields inherited from interface org.apache.cocoon.components.modules.input.InputModule
ROLE
 
Constructor Summary
DocumentInfoModule()
           
 
Method Summary
 java.lang.Object getAttribute(java.lang.String name, org.apache.avalon.framework.configuration.Configuration modeConf, java.util.Map objectModel)
           
protected  Document getDocument(java.lang.String publicationId, java.lang.String area, java.lang.String uuid, java.lang.String language, int revision, java.util.Map objectModel)
          Parse the parameters and return a document.
protected  boolean isVisibleInNavigation(Document document)
           
 void service(org.apache.avalon.framework.service.ServiceManager manager)
           
 
Methods inherited from class org.apache.cocoon.components.modules.input.AbstractInputModule
configure, dispose, getAttributeNames, getAttributeValues
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

protected org.apache.avalon.framework.service.ServiceManager manager

PARAM_PUBLICATION_ID

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

PARAM_AREA

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

PARAM_UUID

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

PARAM_DOCUMENT_LANGUAGE

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

PARAM_PROPERTY

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

PARAM_REVISION

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

MIN_MANDATORY_PARAMS

protected static final int MIN_MANDATORY_PARAMS
See Also:
Constant Field Values

UUID

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

LANGUAGE

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

PATH

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

NODE_NAME

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

WEBAPP_URL

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

DOCUMENT_URL

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

RESOURCE_TYPE

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

LAST_MODIFIED

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

MIME_TYPE

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

CONTENT_LENGTH

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

SOURCE_EXTENSION

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

EXPIRES

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

VISIBLE_IN_NAVIGATION

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

PARAMS

protected static final java.lang.String[] PARAMS

META_RESOURCE_TYPE

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

META_EXPIRES

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

dateFormat

protected java.text.SimpleDateFormat dateFormat
Constructor Detail

DocumentInfoModule

public DocumentInfoModule()
Method Detail

getDocument

protected Document getDocument(java.lang.String publicationId,
                               java.lang.String area,
                               java.lang.String uuid,
                               java.lang.String language,
                               int revision,
                               java.util.Map objectModel)
                        throws org.apache.avalon.framework.configuration.ConfigurationException
Parse the parameters and return a document.

Parameters:
publicationId - The publication ID.
area - The area.
uuid - The document UUID.
language - The document language.
revision - The revision.
objectModel - The object model.
Returns:
The document object created.
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

getAttribute

public java.lang.Object getAttribute(java.lang.String name,
                                     org.apache.avalon.framework.configuration.Configuration modeConf,
                                     java.util.Map objectModel)
                              throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
getAttribute in interface org.apache.cocoon.components.modules.input.InputModule
Overrides:
getAttribute in class org.apache.cocoon.components.modules.input.AbstractInputModule
Throws:
org.apache.avalon.framework.configuration.ConfigurationException
See Also:
InputModule.getAttribute(java.lang.String, org.apache.avalon.framework.configuration.Configuration, java.util.Map)

isVisibleInNavigation

protected boolean isVisibleInNavigation(Document document)
                                 throws org.apache.avalon.framework.configuration.ConfigurationException
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

service

public void service(org.apache.avalon.framework.service.ServiceManager manager)
             throws org.apache.avalon.framework.service.ServiceException
Specified by:
service in interface org.apache.avalon.framework.service.Serviceable
Throws:
org.apache.avalon.framework.service.ServiceException


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