001/*
002 *  Copyright 2010 Anyware Services
003 *
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016
017package org.ametys.web;
018
019import org.ametys.web.repository.page.Page;
020import org.ametys.web.repository.page.ZoneItem;
021import org.ametys.web.repository.site.Site;
022import org.ametys.web.repository.sitemap.Sitemap;
023
024/**
025 * Constants for the Web plugin.
026 */
027public interface WebConstants
028{
029   /** Name of the JCR live workspace */
030    public static final String LIVE_WORKSPACE = "live";
031    
032    /** The request attribute name holding the current URL prefix */
033    public static final String PATH_PREFIX = "path-prefix";
034    
035    /** Label for the validated version of contents. */
036    public static final String LIVE_LABEL = "Live";
037    
038    /** The request attribute name pointing out an anonymous access */
039    public static final String ANONYMOUS_MODE = "X-Ametys-AnonymousMode";
040    
041    /** The request attribute name holding the current page id */
042    public static final String REQUEST_ATTR_PAGE_ID = "pageId";
043    /** The request attribute name holding the current page object */
044    public static final String REQUEST_ATTR_PAGE = Page.class.getName();
045    /** The request attribute name holding the current zone name */
046    public static final String REQUEST_ATTR_ZONE_NAME = "zoneName";
047    /** The request attribute name holding the current zone item object */
048    public static final String REQUEST_ATTR_ZONEITEM = ZoneItem.class.getName();
049    /** The request attribute name holding the current zone item id */
050    public static final String REQUEST_ATTR_ZONEITEM_ID = "zoneItemId";
051    /** The request attribute name holding the service id */
052    public static final String REQUEST_ATTR_SERVICE_ID = "serviceId";
053    /** The request attribute name holding the site name */
054    public static final String REQUEST_ATTR_SITE_NAME = "site";
055    /** The request attribute name holding the site object */
056    public static final String REQUEST_ATTR_SITE = Site.class.getName();
057    /** The request attribute name holding the sitemap language */
058    public static final String REQUEST_ATTR_SITEMAP_NAME = "sitemapLanguage";
059    /** The request attribute name holding the sitemap object */
060    public static final String REQUEST_ATTR_SITEMAP = Sitemap.class.getName();
061    /** The request attribute name holding the current skin id */
062    public static final String REQUEST_ATTR_SKIN_ID = "skin";
063    /** The request attribute name holding the current template */
064    public static final String REQUEST_ATTR_TEMPLATE_ID = "template";
065}