Save This Page
Home » struts-2.1.8.1-src » org.apache » struts2 » components » [javadoc | source]
    1   /*
    2    * $Id: UrlRenderer.java 788633 2009-06-26 08:43:42Z nilsga $
    3    *
    4    * Licensed to the Apache Software Foundation (ASF) under one
    5    * or more contributor license agreements.  See the NOTICE file
    6    * distributed with this work for additional information
    7    * regarding copyright ownership.  The ASF licenses this file
    8    * to you under the Apache License, Version 2.0 (the
    9    * "License"); you may not use this file except in compliance
   10    * with the License.  You may obtain a copy of the License at
   11    *
   12    *  http://www.apache.org/licenses/LICENSE-2.0
   13    *
   14    * Unless required by applicable law or agreed to in writing,
   15    * software distributed under the License is distributed on an
   16    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   17    * KIND, either express or implied.  See the License for the
   18    * specific language governing permissions and limitations
   19    * under the License.
   20    */
   21   
   22   package org.apache.struts2.components;
   23   
   24   import org.apache.struts2.dispatcher.mapper.ActionMapper;
   25   import java.io.Writer;
   26   
   27   /**
   28    * Implementations of this interface are responsible for rendering/creating URLs for a specific
   29    * environment (e.g. Servlet, Portlet). 
   30    *
   31    */
   32   public interface UrlRenderer {
   33   	
   34   	/**
   35   	 * Preprocessing step
   36   	 * @param urlComponent
   37   	 */
   38   	void beforeRenderUrl(UrlProvider provider);
   39   	
   40   	/**
   41   	 * Render a URL.
   42   	 * @param writer A writer that the implementation can use to write the result to.
   43   	 * @param urlComponent The {@link UrlProvider} component that "owns" this renderer.
   44   	 */
   45   	void renderUrl(Writer writer, UrlProvider provider);
   46   	
   47   	/**
   48   	 * Render a Form URL.
   49   	 * @param formComponent The {@link Form} component that "owns" this renderer.
   50   	 */
   51   	void renderFormUrl(Form formComponent);
   52   
   53         void setActionMapper(ActionMapper actionMapper);
   54   
   55   }

Save This Page
Home » struts-2.1.8.1-src » org.apache » struts2 » components » [javadoc | source]