View Javadoc

    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements.  See the NOTICE file distributed with
    4    * this work for additional information regarding copyright ownership.
    5    * The ASF licenses this file to You under the Apache License, Version 2.0
    6    * (the "License"); you may not use this file except in compliance with
    7    * the License.  You may obtain a copy of the License at
    8    *
    9    *      http://www.apache.org/licenses/LICENSE-2.0
    10   *
    11   * Unless required by applicable law or agreed to in writing, software
    12   * distributed under the License is distributed on an "AS IS" BASIS,
    13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14   * See the License for the specific language governing permissions and
    15   * limitations under the License.
    16   */
    17  package org.apache.portals.bridges.common;
    18
    19  import java.util.Map;
    20
    21  import javax.portlet.PortletConfig;
    22  import javax.portlet.PortletException;
    23  import javax.portlet.RenderRequest;
    24  import javax.portlet.RenderResponse;
    25
    26  /***
    27   * A PortletResourceURLFactory can be used to generate an url for direct rendering of a Portlet, comparable (but more limited)
    28   * to what Portlet 2.0 (likely) is going to provide when it introduces ResourceURLs.
    29   * <p>
    30   * In a Portlet API 1.0 environment one is required to use portal specific extensions for directly rendering a Portlet.
    31   * </p>
    32   * <p>
    33   * This interface can be implemented by portals which provide this type of extension to allow portal agnostic usage of it.
    34   * Implementation classsz are required to provide a default constructor and only depend on the parameters provided on the
    35   * {@link createResourceURL(PortletConfig, RenderRequest, RenderResponse, Map) createResourceURL} method.
    36   * </p>
    37   * <p>
    38   * It is expected that portals will implement this interface as a RenderURL.
    39   * </p>
    40   * <p>
    41   * Note: this interface will be defined obsolete as soon as Portlet API 2.0 is available and this functionality then is provided natively.
    42   * </p>
    43   *
    44   * @author <a href="mailto:ate@douma.nu">Ate Douma</a>
    45   * @version $Id: PortletResourceURLFactory.java 543153 2007-05-31 15:11:49Z ate $
    46   */
    47  public interface PortletResourceURLFactory
    48  {
    49      public String createResourceURL(PortletConfig config, RenderRequest request, RenderResponse response, Map parameters) throws PortletException;
    50  }