001    package org.apache.turbine.util.uri;
002    
003    
004    /*
005     * Licensed to the Apache Software Foundation (ASF) under one
006     * or more contributor license agreements.  See the NOTICE file
007     * distributed with this work for additional information
008     * regarding copyright ownership.  The ASF licenses this file
009     * to you under the Apache License, Version 2.0 (the
010     * "License"); you may not use this file except in compliance
011     * with the License.  You may obtain a copy of the License at
012     *
013     *   http://www.apache.org/licenses/LICENSE-2.0
014     *
015     * Unless required by applicable law or agreed to in writing,
016     * software distributed under the License is distributed on an
017     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
018     * KIND, either express or implied.  See the License for the
019     * specific language governing permissions and limitations
020     * under the License.
021     */
022    
023    
024    /**
025     * An interface class which describes the absolute minimum of methods that
026     * a Turbine URI class must implement.
027     *
028     * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
029     * @version $Id: URI.java 615328 2008-01-25 20:25:05Z tv $
030     */
031    
032    public interface URI
033    {
034        /**
035         * Gets the script name (/servlets/Turbine).
036         *
037         * @return A String with the script name.
038         */
039        String getScriptName();
040    
041        /**
042         * Gets the context path.
043         *
044         * @return A String with the context path.
045         */
046        String getContextPath();
047    
048        /**
049         * Gets the server name.
050         *
051         * @return A String with the server name.
052         */
053        String getServerName();
054    
055        /**
056         * Gets the server port.
057         *
058         * @return A String with the server port.
059         */
060        int getServerPort();
061    
062        /**
063         * Returns the current Server Scheme
064         *
065         * @return The current Server scheme
066         *
067         */
068        String getServerScheme();
069    
070        /**
071         * Returns the current reference anchor.
072         *
073         * @return A String containing the reference.
074         */
075        String getReference();
076    }