001 /**
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements. See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License. You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017 package org.apache.geronimo.console.gbean;
018
019 /**
020 * Interface for a GBean that describes a context forward (that is, a
021 * certain URL pattern in the console should be forwarded to a similar URL in
022 * one of the portlet web applications without requiring a separate login).
023 *
024 * This is managed by a single servlet in the portal web app (say, mapped to
025 * /forwards/*). Therefore each ContextForward must specify three pieces of
026 * information -- the prefix under the portal servlet that should be forwarded,
027 * the context to forward to, and the path to forward to within the context.
028 * For example, if it specified "myimages/", "myportlet", and "images" then a
029 * request to /console/forwards/myimages/foo.png would be forwarded to
030 * /myportlet/images/foo.png
031 *
032 * @version $Rev: 476061 $ $Date: 2006-11-17 01:36:50 -0500 (Fri, 17 Nov 2006) $
033 */
034 public interface ContextForward {
035 /**
036 * Gets the prefix for the portal servlet's path that should be forwarded
037 * according to this definition. This is "myimages/" in the example above.
038 */
039 String getPortalPathPrefix();
040 /**
041 * Gets the context root that this request should forward to ("myportlet"
042 * in the example above).
043 */
044 String getPortletContextPath();
045
046 /**
047 * Gets the servlet path that this request should forward to in the
048 * destination context. Any data after the servlet path and portal path
049 * prefix in the original URL will be appended to the portlet context
050 * path and servlet path to construct the destination URL.
051 */
052 String getPortletServletPath();
053 }