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