001 // Copyright 2007, 2008, 2011 The Apache Software Foundation
002 //
003 // Licensed under the Apache License, Version 2.0 (the "License");
004 // you may not use this file except in compliance with the License.
005 // You may obtain a copy of the License at
006 //
007 // http://www.apache.org/licenses/LICENSE-2.0
008 //
009 // Unless required by applicable law or agreed to in writing, software
010 // distributed under the License is distributed on an "AS IS" BASIS,
011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012 // See the License for the specific language governing permissions and
013 // limitations under the License.
014
015 package org.apache.tapestry5.services;
016
017 import org.apache.tapestry5.MarkupWriter;
018 import org.apache.tapestry5.ioc.annotations.UsesOrderedConfiguration;
019
020 /**
021 * An object which will perform rendering of a page (or portion of a page). This interface exists to be filtered via
022 * {@link org.apache.tapestry5.services.MarkupRendererFilter}.
023 * <p/>
024 * The MarkupRenderer service takes an ordered configuration of {@link org.apache.tapestry5.services.MarkupRendererFilter}s,
025 * which are used for ordinary page rendering (as opposed to {@linkplain org.apache.tapestry5.services.PartialMarkupRenderer
026 * partial page rendering} for Ajax requests). The MarkupRenderer service may be selected using the
027 *
028 * @see org.apache.tapestry5.ioc.annotations.Primary
029 */
030 @UsesOrderedConfiguration(MarkupRendererFilter.class)
031 public interface MarkupRenderer
032 {
033 /**
034 * Invoked to render some markup.
035 *
036 * @param writer to which markup should be written
037 */
038 void renderMarkup(MarkupWriter writer);
039 }