001    // Copyright 2006, 2007, 2008, 2009, 2010, 2011 The Apache Software Foundation
002    //
003    // Licensed under the Apache License, Version 2.0 (the "License");
004    // you may not use this file except in compliance with the License.
005    // You may obtain a copy of the License at
006    //
007    // http://www.apache.org/licenses/LICENSE-2.0
008    //
009    // Unless required by applicable law or agreed to in writing, software
010    // distributed under the License is distributed on an "AS IS" BASIS,
011    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012    // See the License for the specific language governing permissions and
013    // limitations under the License.
014    
015    package org.apache.tapestry5.internal.services;
016    
017    import org.apache.tapestry5.corelib.components.Form;
018    import org.apache.tapestry5.corelib.components.FormInjector;
019    import org.apache.tapestry5.corelib.components.Zone;
020    import org.apache.tapestry5.services.javascript.JavaScriptStack;
021    
022    /**
023     * Constants used when processing requests from the client web browser.
024     */
025    public final class RequestConstants
026    {
027    
028        /**
029         * Request path prefix that identifies an internal (on the classpath) asset.
030         */
031        public static final String ASSET_PATH_PREFIX = "/assets/";
032    
033        /**
034         * Virtual folder name for assets that are actually stored in the context, but are exposed (much like classpath
035         * assets) to gain far-future expires headers and automatic content compression.
036         * 
037         * @since 5.1.0.0
038         */
039        public static final String CONTEXT_FOLDER = "ctx";
040    
041        /**
042         * Folder for combined {@link JavaScriptStack} JavaScript files. The path consists of the locale (as a folder) and
043         * the name
044         * of the stack (suffixed with ".js").
045         * 
046         * @since 5.2.0
047         */
048        public static final String STACK_FOLDER = "stack";
049    
050        /**
051         * Name of parameter, in an Ajax update, that identifies the client-side id of the {@link Form} being extended. Used
052         * with {@link Zone}, {@link FormInjector} and other similar components that may be contained within a form.
053         * 
054         * @since 5.2.0
055         */
056        public static final String FORM_CLIENTID_PARAMETER = "t:formid";
057    
058        /**
059         * The server-side part of {@link #FORM_CLIENTID_PARAMETER} identifying the server-side component id.
060         * 
061         * @since 5.2.0
062         */
063        public static final String FORM_COMPONENTID_PARAMETER = "t:formcomponentid";
064    }