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 */ 017package org.apache.wicket.request; 018 019/** 020 * An interface that a Url can implement if it knows how to 021 * render itself as full url or relative to a base url 022 */ 023public interface IUrlRenderer 024{ 025 /** 026 * Renders the passed url as full/absolute. 027 * 028 * @param url 029 * the url to render as full 030 * @param baseUrl 031 * the url of the currently rendered page 032 * @return The full url. 033 */ 034 String renderFullUrl(final Url url, Url baseUrl); 035 036 /** 037 * Renders the passed url as relative to a base url. 038 * 039 * @param url 040 * the url to render as relative 041 * @param baseUrl 042 * the url of the currently rendered page 043 * @return The relative url. 044 */ 045 String renderRelativeUrl(final Url url, Url baseUrl); 046}