    001    package org.apache.turbine.services.rundata;
    002
    003    /*
    004     * Licensed to the Apache Software Foundation (ASF) under one
    005     * or more contributor license agreements.  See the NOTICE file
    006     * distributed with this work for additional information
    007     * regarding copyright ownership.  The ASF licenses this file
    008     * to you under the Apache License, Version 2.0 (the
    009     * "License"); you may not use this file except in compliance
    010     * with the License.  You may obtain a copy of the License at
    011     *
    012     *   http://www.apache.org/licenses/LICENSE-2.0
    013     *
    014     * Unless required by applicable law or agreed to in writing,
    015     * software distributed under the License is distributed on an
    016     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    017     * KIND, either express or implied.  See the License for the
    018     * specific language governing permissions and limitations
    019     * under the License.
    020     */
    021
    022    import javax.servlet.ServletConfig;
    023    import javax.servlet.http.HttpServletRequest;
    024    import javax.servlet.http.HttpServletResponse;
    025
    026    import org.apache.fulcrum.parser.CookieParser;
    027    import org.apache.fulcrum.parser.ParameterParser;
    028    import org.apache.fulcrum.pool.Recyclable;
    029    import org.apache.turbine.util.RunData;
    030    import org.apache.turbine.util.ServerData;
    031
    032    /**
    033     * TurbineRunData is an extension to the RunData interface to be
    034     * implemented by RunData implementations to be distributed by
    035     * the Turbine RunData Service. The extensions define methods
    036     * that are used by the service for initilizing the implementation,
    037     * but which are not meant to be called by the actual client objects.
    038     *
    039     * <p>TurbineRunData extends also the Recyclable interface making
    040     * it possible to pool its implementations for recycling.
    041     *
    042     * @author <a href="mailto:ilkka.priha@simsoft.fi">Ilkka Priha</a>
    043     * @author <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>
    044     * @author <a href="mailto:bhoeneis@ee.ethz.ch">Bernie Hoeneisen</a>
    045     * @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>
    046     * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
    047     * @version $Id: TurbineRunData.java 1066938 2011-02-03 20:14:53Z ludwig $
    048     */
    049    public interface TurbineRunData
    050        extends RunData,
    051                Recyclable
    052    {
    053        /**
    054         * Gets the parameter parser without parsing the parameters.
    055         *
    056         * @return the parameter parser.
    057         */
    058        ParameterParser getParameterParser();
    059
    060        /**
    061         * Sets the parameter parser.
    062         *
    063         * @param parser a parameter parser.
    064         */
    065        void setParameterParser(ParameterParser parser);
    066
    067        /**
    068         * Gets the cookie parser without parsing the cookies.
    069         *
    070         * @return the cookie parser.
    071         */
    072        CookieParser getCookieParser();
    073
    074        /**
    075         * Sets the cookie parser.
    076         *
    077         * @param parser a cookie parser.
    078         */
    079        void setCookieParser(CookieParser parser);
    080
    081        /**
    082         * Sets the servlet request.
    083         *
    084         * @param req a request.
    085         */
    086        void setRequest(HttpServletRequest req);
    087
    088        /**
    089         * Sets the servlet response.
    090         *
    091         * @param res a response.
    092         */
    093        void setResponse(HttpServletResponse res);
    094
    095        /**
    096         * Sets the servlet configuration used during servlet init.
    097         *
    098         * @param config a configuration.
    099         */
    100        void setServletConfig(ServletConfig config);
    101
    102        /**
    103         * Sets the server data of the request.
    104         *
    105         * @param serverData server data.
    106         */
    107        void setServerData(ServerData serverData);
    108    }