org.apache.lenya.cms.cocoon.components.modules.input
Class ResourceTypeModule
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.components.modules.input.AbstractInputModule
org.apache.lenya.cms.cocoon.components.modules.input.ResourceTypeModule
- 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 ResourceTypeModule
- extends org.apache.cocoon.components.modules.input.AbstractInputModule
- implements org.apache.avalon.framework.service.Serviceable
Resource type module.
The syntax is either {resource-type:<attribute>}
(which uses the resource
type of the currenlty requested document) or
{resource-type:<name>:<attribute>}
(which allows to access an
arbitrary resource type).
Attributes:
expires
- the expiration date in RFC 822/1123 format, see
ResourceType.getExpires()
schemaUri
- see
Schema.getURI()
httpSchemaUri
- the URI to request the schema over HTTP, without Proxy and context (use {proxy:} around it).
supportsFormat:{format}
- true if the resource type
supports this format, false otherwise
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)
|
void |
service(org.apache.avalon.framework.service.ServiceManager manager)
|
protected java.lang.String |
transformFallbackUriToHttp(java.lang.String pubid,
java.lang.String uri)
Transforms a fallback URI for resources into a HTTP URL. |
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 |
SCHEMA_URI
protected static final java.lang.String SCHEMA_URI
- See Also:
- Constant Field Values
HTTP_SCHEMA_URI
protected static final java.lang.String HTTP_SCHEMA_URI
- See Also:
- Constant Field Values
EXPIRES
protected static final java.lang.String EXPIRES
- See Also:
- Constant Field Values
SUPPORTS_FORMAT
protected static final java.lang.String SUPPORTS_FORMAT
- See Also:
- Constant Field Values
manager
protected org.apache.avalon.framework.service.ServiceManager manager
ResourceTypeModule
public ResourceTypeModule()
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
transformFallbackUriToHttp
protected java.lang.String transformFallbackUriToHttp(java.lang.String pubid,
java.lang.String uri)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Transforms a fallback URI for resources into a HTTP URL.
Currently only supports module urls:
fallback://lenya/modules/foo/resources/schemas/bar.rng ->
prefix/pubid/modules/foo/schemas/bar.rng
FIXME: allow other kind of fallback URIs
- Parameters:
pubid
- publication id of the current documentprefix
- prefix which will be prepended to the resulting URLuri
- fallback uri, must start with fallback://
- Returns:
- A string.
- 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.