<?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. | |
--> | |
<xmap remove="/sitemap/pipelines" | |
unless="/sitemap/pipelines/pipeline/match[@pattern = 'lenya-screen.xsl']" | |
xpath="/sitemap" | |
insert-after="/sitemap/resources" | |
xmlns:map="http://apache.org/cocoon/sitemap/1.0"> | |
<!-- =========================== Pipelines ================================= --> | |
<map:pipelines> | |
<!-- I18N --> | |
<map:pipeline> | |
<map:match pattern="i18n-catalogue/**"> | |
<map:mount uri-prefix="" src="lenya/i18n.xmap" check-reload="true" reload-method="synchron"/> | |
</map:match> | |
</map:pipeline> | |
<map:pipeline> | |
<!-- Lenya GUI screen --> | |
<map:match pattern="lenya-screen.xsl"> | |
<map:generate src="fallback://lenya/xslt/util/page2xhtml.xsl"/> | |
<map:serialize type="xml"/> | |
</map:match> | |
<map:match pattern="ac.login" type="usecase"> | |
<map:mount src="fallback://lenya/modules/usecase/usecase.xmap" uri-prefix="" check-reload="yes" reload-method="synchron"/> | |
</map:match> | |
<map:match pattern="ac.logout" type="usecase"> | |
<map:mount src="fallback://lenya/modules/usecase/usecase.xmap" uri-prefix="" check-reload="yes" reload-method="synchron"/> | |
</map:match> | |
<!-- favicon --> | |
<map:match pattern="favicon.ico"> | |
<map:read mime-type="image/x-icon" src="lenya/resources/images/lenya.ico"/> | |
</map:match> | |
</map:pipeline> | |
<map:pipeline internal-only="true"> | |
<map:match pattern="**"> | |
<map:mount uri-prefix="" src="global-sitemap.xmap" check-reload="true" reload-method="synchron"/> | |
</map:match> | |
</map:pipeline> | |
<map:pipeline> | |
<map:match pattern="**"> | |
<!-- redirect to SSL if the policy requires this --> | |
<map:act type="ssl-redirect"> | |
<map:redirect-to uri="{redirectUri}" session="true"/> | |
</map:act> | |
<map:match pattern="*/webdav**"> | |
<map:act type="authorizer"> | |
<map:mount check-reload="true" reload-method="synchron" src="global-sitemap.xmap" uri-prefix=""/> | |
</map:act> | |
<map:act type="authenticator"> | |
<map:act type="authorizer"> | |
<map:mount uri-prefix="" src="global-sitemap.xmap" check-reload="true" reload-method="synchron"/> | |
</map:act> | |
<map:act type="set-header"> | |
<map:parameter name="WWW-Authenticate" value="Basic Realm=lenya" /> | |
<map:generate src="context://lenya/content/util/empty.xml" /> | |
<map:transform src="fallback://lenya/xslt/exception/forbidden.xsl"> | |
<map:parameter name="documentid" value="{page-envelope:document-uuid}"/> | |
<map:parameter name="documenturl" value="{page-envelope:document-url}"/> | |
<map:parameter name="area" value="{page-envelope:area}"/> | |
</map:transform> | |
<map:serialize type="xhtml" status-code="401"/> | |
</map:act> | |
</map:act> | |
<map:act type="set-header"> | |
<map:parameter name="WWW-Authenticate" value="Basic Realm=lenya" /> | |
<map:generate src="context://lenya/content/util/empty.xml" /> | |
<map:transform src="fallback://lenya/xslt/exception/forbidden.xsl"> | |
<map:parameter name="documentid" value="{page-envelope:document-uuid}"/> | |
<map:parameter name="documenturl" value="{page-envelope:document-url}"/> | |
<map:parameter name="area" value="{page-envelope:area}"/> | |
</map:transform> | |
<map:serialize type="xhtml" status-code="401"/> | |
</map:act> | |
</map:match> | |
<map:act type="authorizer"> | |
<map:mount uri-prefix="" src="global-sitemap.xmap" check-reload="true" reload-method="synchron"/> | |
</map:act> | |
<map:redirect-to session="true" uri="{proxy:/{1}}?lenya.usecase=ac.login&referrerQueryString={url-encode:{request:queryString}}"/> | |
</map:match> | |
</map:pipeline> | |
<!-- this is the default error handler --> | |
<map:handle-errors> | |
<map:mount src="{fallback:error.xmap}" check-reload="true" reload-method="synchron" uri-prefix=""/> | |
</map:handle-errors> | |
</map:pipelines></xmap> |