org.apache.lenya.cms.cocoon.components.modules.input
Class DocumentInfoModule
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.components.modules.input.AbstractInputModule
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:
contentLength
- the content length (number of bytes).
expires
- the expiration date in ISO 8601 format.
lastModified
- the last modification date in ISO 8601
format.
mimeType
- the MIME type
nodeName
- the name of the node in the site structure
path
- the path in the site structure (starting with a
slash) or an empty string if the document is not referenced in the site structure.
resourceType
- the name of the resource type
sourceExtension
- the source extension
visibleInNav
- true
if the document's node
is visible in the navigation, false
otherwise.
webappUrl
- the web application URL of the document or
an empty string if the document is not referenced in the site structure.
Fields inherited from class org.apache.cocoon.components.modules.input.AbstractInputModule |
settings |
Fields inherited from interface org.apache.cocoon.components.modules.input.InputModule |
ROLE |
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 |
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
DocumentInfoModule
public DocumentInfoModule()
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.