Author: andreas
Date: Fri Feb 6 00:05:00 2009
New Revision: 741350
URL: http://svn.apache.org/viewvc?rev=741350&view=rev
Log:
Adding missing declarations, continue springification of fallback module.
Added:
lenya/trunk/org.apache.lenya.core.ac/src/main/resources/
lenya/trunk/org.apache.lenya.core.ac/src/main/resources/META-INF/
lenya/trunk/org.apache.lenya.core.ac/src/main/resources/META-INF/cocoon/
lenya/trunk/org.apache.lenya.core.ac/src/main/resources/META-INF/cocoon/avalon/
lenya/trunk/org.apache.lenya.core.ac/src/main/resources/META-INF/cocoon/avalon/lenya-core-ac-sitemap.xconf
lenya/trunk/org.apache.lenya.core.api/src/main/resources/META-INF/cocoon/spring/lenya-core-inputModules.xml
lenya/trunk/org.apache.lenya.core.impl/src/main/resources/
lenya/trunk/org.apache.lenya.core.impl/src/main/resources/META-INF/
lenya/trunk/org.apache.lenya.core.impl/src/main/resources/META-INF/cocoon/
lenya/trunk/org.apache.lenya.core.impl/src/main/resources/META-INF/cocoon/spring/
lenya/trunk/org.apache.lenya.core.impl/src/main/resources/META-INF/cocoon/spring/lenya-core-impl-components.xml
lenya/trunk/org.apache.lenya.core.linking/src/main/resources/META-INF/cocoon/spring/
lenya/trunk/org.apache.lenya.core.linking/src/main/resources/META-INF/cocoon/spring/lenya-core-linking-components.xml
lenya/trunk/org.apache.lenya.welcome/src/main/resources/COB-INF/error.xmap
Removed:
lenya/trunk/org.apache.lenya.core.api/src/main/resources/META-INF/cocoon/spring/lenya-core-components.xml
Modified:
lenya/trunk/org.apache.lenya.core.api/src/main/java/org/apache/lenya/cms/cocoon/components/modules/input/FallbackModule.java
lenya/trunk/org.apache.lenya.core.api/src/main/java/org/apache/lenya/cms/cocoon/source/FallbackSourceFactory.java
lenya/trunk/org.apache.lenya.core.api/src/main/java/org/apache/lenya/cms/repository/RepositoryUtil.java
lenya/trunk/org.apache.lenya.parent/pom.xml
lenya/trunk/org.apache.lenya.welcome/pom.xml
Added: lenya/trunk/org.apache.lenya.core.ac/src/main/resources/META-INF/cocoon/avalon/lenya-core-ac-sitemap.xconf
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.ac/src/main/resources/META-INF/cocoon/avalon/lenya-core-ac-sitemap.xconf?rev=741350&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.core.ac/src/main/resources/META-INF/cocoon/avalon/lenya-core-ac-sitemap.xconf (added)
+++ lenya/trunk/org.apache.lenya.core.ac/src/main/resources/META-INF/cocoon/avalon/lenya-core-ac-sitemap.xconf Fri Feb 6 00:05:00 2009
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<map:components xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+ <map:transformers>
+ <map:transformer name="userInfo" logger="lenya.sitemap.transformer.userInfo"
+ src="org.apache.lenya.modules.ac.UserInfoTransformer"/>
+ </map:transformers>
+
+ <!-- Actions -->
+ <map:actions>
+ <map:action name="authenticator" logger="lenya.sitemap.action.authenticator"
+ src="org.apache.lenya.cms.cocoon.acting.DelegatingAuthenticatorAction"/>
+ <map:action name="authorizer" logger="lenya.sitemap.action.authorizer"
+ src="org.apache.lenya.cms.cocoon.acting.DelegatingAuthorizerAction"/>
+ <map:action name="ssl-redirect" logger="lenya.sitemap.action.ssl-redirect"
+ src="org.apache.lenya.cms.cocoon.acting.SslRedirectAction"/>
+ </map:actions>
+
+</map:components>
Modified: lenya/trunk/org.apache.lenya.core.api/src/main/java/org/apache/lenya/cms/cocoon/components/modules/input/FallbackModule.java
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.api/src/main/java/org/apache/lenya/cms/cocoon/components/modules/input/FallbackModule.java?rev=741350&r1=741349&r2=741350&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.core.api/src/main/java/org/apache/lenya/cms/cocoon/components/modules/input/FallbackModule.java (original)
+++ lenya/trunk/org.apache.lenya.core.api/src/main/java/org/apache/lenya/cms/cocoon/components/modules/input/FallbackModule.java Fri Feb 6 00:05:00 2009
@@ -24,23 +24,23 @@
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
import org.apache.cocoon.components.modules.input.AbstractInputModule;
import org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.cocoon.environment.Request;
+import org.apache.cocoon.spring.configurator.WebAppContextUtils;
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.SourceResolver;
import org.apache.excalibur.store.impl.MRUMemoryStore;
import org.apache.lenya.cms.cocoon.source.FallbackSourceFactory;
import org.apache.lenya.cms.publication.DocumentFactory;
-import org.apache.lenya.cms.publication.DocumentUtil;
+import org.apache.lenya.cms.publication.DocumentFactoryBuilder;
import org.apache.lenya.cms.publication.URLInformation;
+import org.apache.lenya.cms.repository.RepositoryManager;
import org.apache.lenya.cms.repository.RepositoryUtil;
import org.apache.lenya.cms.repository.Session;
import org.apache.lenya.util.ServletHelper;
import org.springframework.util.Assert;
+import org.springframework.web.context.WebApplicationContext;
/**
* <p>
@@ -48,29 +48,34 @@
* template-fallback, ...) is configurable via the <em>protocol</em> parameter.
* </p>
*/
-public class FallbackModule extends AbstractInputModule implements Serviceable {
+public class FallbackModule extends AbstractInputModule {
- protected ServiceManager manager;
private String protocol;
- protected static MRUMemoryStore store;
+ protected MRUMemoryStore store;
+ private RepositoryManager repositoryManager;
+ private DocumentFactoryBuilder documentFactoryBuilder;
+ private SourceResolver resolver;
private static Boolean useCache = null;
+ public void setRepositoryManager(RepositoryManager manager) {
+ this.repositoryManager = manager;
+ }
+
+ public void setDocumentFactoryBuilder(DocumentFactoryBuilder builder) {
+ this.documentFactoryBuilder = builder;
+ }
+
protected boolean useCache() {
- if (useCache == null) {
- useCache = Boolean.valueOf(this.manager.hasService(FallbackSourceFactory.STORE_ROLE));
- }
- return useCache.booleanValue();
+ return this.store != null;
+ }
+
+ public void setStore(MRUMemoryStore store) {
+ Assert.notNull(store, "store");
+ this.store = store;
}
protected MRUMemoryStore getStore() {
- if (store == null) {
- try {
- store = (MRUMemoryStore) this.manager.lookup(FallbackSourceFactory.STORE_ROLE);
- } catch (ServiceException e) {
- throw new RuntimeException(e);
- }
- }
- return store;
+ return this.store;
}
protected String getPublicationId(Map objectModel) {
@@ -79,8 +84,8 @@
URLInformation info = new URLInformation(webappUri);
String pubId = null;
try {
- Session session = RepositoryUtil.getSession(this.manager, request);
- DocumentFactory factory = DocumentUtil.createDocumentFactory(this.manager, session);
+ Session session = RepositoryUtil.getSession(this.repositoryManager, request);
+ DocumentFactory factory = this.documentFactoryBuilder.createDocumentFactory(session);
String pubIdCandidate = info.getPublicationId();
if (pubIdCandidate != null && factory.existsPublication(pubIdCandidate)) {
pubId = pubIdCandidate;
@@ -101,32 +106,25 @@
MRUMemoryStore store = getStore();
if (store.containsKey(cacheKey)) {
uri = (String) store.get(cacheKey);
- }
- else {
+ } else {
uri = resolveSourceUri(name);
}
- }
- else {
+ } else {
uri = resolveSourceUri(name);
}
return uri;
}
protected String resolveSourceUri(String name) throws ConfigurationException {
- SourceResolver resolver = null;
Source source = null;
try {
- resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
- source = resolver.resolveURI(getFallbackUri(name));
+ source = this.resolver.resolveURI(getFallbackUri(name));
return source.getURI();
} catch (Exception e) {
throw new ConfigurationException("Resolving fallback source [" + name + "] failed: ", e);
} finally {
- if (resolver != null) {
- if (source != null) {
- resolver.release(source);
- }
- this.manager.release(resolver);
+ if (source != null) {
+ this.resolver.release(source);
}
}
}
@@ -146,14 +144,13 @@
return objects;
}
- public void service(ServiceManager manager) throws ServiceException {
- this.manager = manager;
-
- }
-
public void setProtocol(String protocol) {
Assert.notNull(protocol, "protocol");
this.protocol = protocol;
}
+
+ public void setSourceResolver(SourceResolver resolver) {
+ this.resolver = resolver;
+ }
}
\ No newline at end of file
Modified: lenya/trunk/org.apache.lenya.core.api/src/main/java/org/apache/lenya/cms/cocoon/source/FallbackSourceFactory.java
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.api/src/main/java/org/apache/lenya/cms/cocoon/source/FallbackSourceFactory.java?rev=741350&r1=741349&r2=741350&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.core.api/src/main/java/org/apache/lenya/cms/cocoon/source/FallbackSourceFactory.java (original)
+++ lenya/trunk/org.apache.lenya.core.api/src/main/java/org/apache/lenya/cms/cocoon/source/FallbackSourceFactory.java Fri Feb 6 00:05:00 2009
@@ -46,6 +46,7 @@
import org.apache.lenya.cms.repository.RepositoryUtil;
import org.apache.lenya.cms.repository.Session;
import org.apache.lenya.util.ServletHelper;
+import org.springframework.util.Assert;
/**
* <p>
@@ -61,27 +62,23 @@
public class FallbackSourceFactory extends AbstractLogEnabled implements SourceFactory,
Serviceable, Contextualizable, URIAbsolutizer {
- protected static MRUMemoryStore store;
- private static Boolean useCache = null;
-
- public static final String STORE_ROLE = FallbackSourceFactory.class.getName() + "Store";
+ protected MRUMemoryStore store;
+
+ /**
+ * Configure the spring bean accordingly if you want to use a store.
+ * @param store The store.
+ */
+ public void setStore(MRUMemoryStore store) {
+ Assert.notNull(store, "store");
+ this.store = store;
+ }
protected boolean useCache() {
- if (useCache == null) {
- useCache = Boolean.valueOf(this.manager.hasService(STORE_ROLE));
- }
- return useCache.booleanValue();
+ return this.store != null;
}
protected MRUMemoryStore getStore() {
- if (store == null) {
- try {
- store = (MRUMemoryStore) this.manager.lookup(STORE_ROLE);
- } catch (ServiceException e) {
- throw new RuntimeException(e);
- }
- }
- return store;
+ return this.store;
}
/**
Modified: lenya/trunk/org.apache.lenya.core.api/src/main/java/org/apache/lenya/cms/repository/RepositoryUtil.java
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.api/src/main/java/org/apache/lenya/cms/repository/RepositoryUtil.java?rev=741350&r1=741349&r2=741350&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.core.api/src/main/java/org/apache/lenya/cms/repository/RepositoryUtil.java (original)
+++ lenya/trunk/org.apache.lenya.core.api/src/main/java/org/apache/lenya/cms/repository/RepositoryUtil.java Fri Feb 6 00:05:00 2009
@@ -17,6 +17,8 @@
*/
package org.apache.lenya.cms.repository;
+import javax.servlet.http.HttpSession;
+
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.cocoon.environment.Request;
import org.apache.lenya.ac.Identity;
@@ -33,6 +35,31 @@
* @return A session.
* @throws RepositoryException if an error occurs.
*/
+ public static Session getSession(RepositoryManager repoManager, Request request)
+ throws RepositoryException {
+ Session session = (Session) request.getAttribute(Session.class.getName());
+ if (session == null) {
+ Identity identity = getIdentity(request);
+ // attach a read-only repository session to the HTTP request
+ session = repoManager.createSession(identity, false);
+ request.setAttribute(Session.class.getName(), session);
+ } else if (session.getIdentity() == null) {
+ Identity identity = getIdentity(request);
+ if (identity != null) {
+ session.setIdentity(identity);
+ }
+ }
+ return session;
+ }
+
+ /**
+ * Returns the session attached to the request or creates a session.
+ * @param manager The service manager.
+ * @param request The request.
+ * @return A session.
+ * @throws RepositoryException if an error occurs.
+ * @deprecated
+ */
public static Session getSession(ServiceManager manager, Request request)
throws RepositoryException {
Session session = (Session) request.getAttribute(Session.class.getName());
@@ -51,9 +78,8 @@
}
protected static Identity getIdentity(Request request) {
- org.apache.cocoon.environment.Session cocoonSession = request.getCocoonSession();
- Identity identity = (Identity) cocoonSession.getAttribute(Identity.class.getName());
- return identity;
+ HttpSession cocoonSession = request.getSession();
+ return (Identity) cocoonSession.getAttribute(Identity.class.getName());
}
/**
@@ -63,6 +89,7 @@
* @param modifiable Determines if the repository items in this session should be modifiable.
* @return a session.
* @throws RepositoryException if an error occurs.
+ * @deprecated
*/
public static Session createSession(ServiceManager manager, Identity identity, boolean modifiable)
throws RepositoryException {
Added: lenya/trunk/org.apache.lenya.core.api/src/main/resources/META-INF/cocoon/spring/lenya-core-inputModules.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.api/src/main/resources/META-INF/cocoon/spring/lenya-core-inputModules.xml?rev=741350&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.core.api/src/main/resources/META-INF/cocoon/spring/lenya-core-inputModules.xml (added)
+++ lenya/trunk/org.apache.lenya.core.api/src/main/resources/META-INF/cocoon/spring/lenya-core-inputModules.xml Fri Feb 6 00:05:00 2009
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
+ xmlns="http://www.springframework.org/schema/beans">
+ <bean name="org.apache.cocoon.components.modules.input.InputModule/fallback"
+ class="org.apache.lenya.cms.cocoon.components.modules.input.FallbackModule">
+ <property name="protocol" value="fallback"/>
+ <property name="sourceResolver" ref="org.apache.excalibur.source.SourceResolver"/>
+ <property name="repositoryManager" ref="org.apache.lenya.cms.repository.RepositoryManager"/>
+ </bean>
+ <bean name="org.apache.cocoon.components.modules.input.InputModule/page-envelope"
+ class="org.apache.lenya.cms.cocoon.components.modules.input.PageEnvelopeModule"/>
+ <bean name="org.apache.cocoon.components.modules.input/resource-type"
+ class="org.apache.lenya.cms.cocoon.components.modules.input.ResourceTypeModule"/>
+ <bean name="org.apache.cocoon.components.modules.input/doc-info"
+ class="org.apache.lenya.cms.cocoon.components.modules.input.DocumentInfoModule"/>
+ <bean name="org.apache.cocoon.components.modules.input/document-url"
+ class="org.apache.lenya.cms.cocoon.components.modules.input.DocumentURLModule"/>
+</beans>
Added: lenya/trunk/org.apache.lenya.core.impl/src/main/resources/META-INF/cocoon/spring/lenya-core-impl-components.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.impl/src/main/resources/META-INF/cocoon/spring/lenya-core-impl-components.xml?rev=741350&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.core.impl/src/main/resources/META-INF/cocoon/spring/lenya-core-impl-components.xml (added)
+++ lenya/trunk/org.apache.lenya.core.impl/src/main/resources/META-INF/cocoon/spring/lenya-core-impl-components.xml Fri Feb 6 00:05:00 2009
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
+ xmlns="http://www.springframework.org/schema/beans">
+ <bean name="org.apache.lenya.cms.repository.RepositoryManager"
+ class="org.apache.lenya.cms.repository.RepositoryManagerImpl"/>
+ <bean name="org.apache.lenya.cms.publication.DocumentFactoryBuilder"
+ class="org.apache.lenya.cms.publication.DocumentFactoryBuilderImpl"/>
+</beans>
Added: lenya/trunk/org.apache.lenya.core.linking/src/main/resources/META-INF/cocoon/spring/lenya-core-linking-components.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.linking/src/main/resources/META-INF/cocoon/spring/lenya-core-linking-components.xml?rev=741350&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.core.linking/src/main/resources/META-INF/cocoon/spring/lenya-core-linking-components.xml (added)
+++ lenya/trunk/org.apache.lenya.core.linking/src/main/resources/META-INF/cocoon/spring/lenya-core-linking-components.xml Fri Feb 6 00:05:00 2009
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
+ xmlns="http://www.springframework.org/schema/beans">
+ <bean name="org.apache.cocoon.components.modules.input.InputModule/proxy"
+ class="org.apache.lenya.cms.cocoon.components.modules.input.ProxyModule"/>
+ <bean name="org.apache.cocoon.components.modules.input.InputModule/uuid2url"
+ class="org.apache.lenya.cms.cocoon.components.modules.input.UuidToUrlModule"/>
+</beans>
Modified: lenya/trunk/org.apache.lenya.parent/pom.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.parent/pom.xml?rev=741350&r1=741349&r2=741350&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.parent/pom.xml (original)
+++ lenya/trunk/org.apache.lenya.parent/pom.xml Fri Feb 6 00:05:00 2009
@@ -294,6 +294,11 @@
</dependency>
<dependency>
<groupId>org.apache.lenya</groupId>
+ <artifactId>lenya-core-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lenya</groupId>
<artifactId>lenya-core-ldap</artifactId>
<version>${project.version}</version>
</dependency>
@@ -417,7 +422,7 @@
</reporting>
<properties>
- <cocoon.version>2.2.0</cocoon.version>
+ <cocoon.version>2.2.1-SNAPSHOT</cocoon.version>
<avalon.version>4.3.1</avalon.version>
</properties>
</project>
Modified: lenya/trunk/org.apache.lenya.welcome/pom.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.welcome/pom.xml?rev=741350&r1=741349&r2=741350&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.welcome/pom.xml (original)
+++ lenya/trunk/org.apache.lenya.welcome/pom.xml Fri Feb 6 00:05:00 2009
@@ -70,6 +70,10 @@
<!-- Lenya -->
<dependency>
<groupId>org.apache.lenya</groupId>
+ <artifactId>lenya-core-ac</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lenya</groupId>
<artifactId>lenya-core-api</artifactId>
</dependency>
<dependency>
@@ -78,6 +82,10 @@
</dependency>
<dependency>
<groupId>org.apache.lenya</groupId>
+ <artifactId>lenya-core-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lenya</groupId>
<artifactId>lenya-core-linking</artifactId>
</dependency>
<dependency>
Added: lenya/trunk/org.apache.lenya.welcome/src/main/resources/COB-INF/error.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.welcome/src/main/resources/COB-INF/error.xmap?rev=741350&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.welcome/src/main/resources/COB-INF/error.xmap (added)
+++ lenya/trunk/org.apache.lenya.welcome/src/main/resources/COB-INF/error.xmap Fri Feb 6 00:05:00 2009
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+ <map:resources>
+ <map:resource name="style-cms-page">
+ <map:transform type="i18n">
+ <map:parameter name="locale" value="{request:locale}"/>
+ </map:transform>
+ <map:transform src="fallback://lenya/xslt/util/page2xhtml.xsl"/>
+ <map:transform type="proxy"/>
+ <map:transform src="context://lenya/xslt/util/strip_namespaces.xsl"/>
+ </map:resource>
+ </map:resources>
+
+ <map:pipelines>
+ <map:pipeline>
+ <map:match pattern="**">
+ <map:generate type="notifying"/>
+ <map:transform src="fallback://lenya/xslt/exception/generic.xsl"/>
+ <map:call resource="style-cms-page" />
+ <map:transform src="fallback://lenya/xslt/util/strip_namespaces.xsl"/>
+ <map:serialize type="xhtml" status-code="500" />
+ </map:match>
+ </map:pipeline>
+ </map:pipelines>
+
+</map:sitemap>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.