001/* 002 * This library is part of OpenCms - 003 * the Open Source Content Management System 004 * 005 * Copyright (c) Alkacon Software GmbH & Co. KG (https://www.alkacon.com) 006 * 007 * This library is free software; you can redistribute it and/or 008 * modify it under the terms of the GNU Lesser General Public 009 * License as published by the Free Software Foundation; either 010 * version 2.1 of the License, or (at your option) any later version. 011 * 012 * This library is distributed in the hope that it will be useful, 013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 015 * Lesser General Public License for more details. 016 * 017 * For further information about Alkacon Software GmbH & Co. KG, please see the 018 * company website: https://www.alkacon.com 019 * 020 * For further information about OpenCms, please see the 021 * project website: https://www.opencms.org 022 * 023 * You should have received a copy of the GNU Lesser General Public 024 * License along with this library; if not, write to the Free Software 025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 026 */ 027 028package org.opencms.jsp; 029 030import org.opencms.configuration.I_CmsConfigurationParameterHandler; 031import org.opencms.xml.containerpage.CmsContainerElementBean; 032import org.opencms.xml.containerpage.I_CmsFormatterBean; 033 034import jakarta.servlet.jsp.PageContext; 035 036/** 037 * Plug-in interface for emitting a marker into the page output around each element while the container 038 * and display tags render a page.<p> 039 * 040 * The markers are written at the same positions as the ADE edit markers; an implementation may use 041 * them for purposes such as building a content summary of the rendered page. The implementation is 042 * optional and configured through the system configuration (the <code>edit-marker-handler</code> 043 * element). When none is configured the no-op {@link CmsDefaultElementMarker} is used, so nothing is 044 * emitted and normal rendering is unaffected. The configured instance is created once at startup and 045 * reached through {@link org.opencms.main.OpenCms#getElementMarker()}.<p> 046 * 047 * Implementations are parameter handlers, so they can be configured with nested 048 * <code><param></code> elements that are read from and written back to the configuration.<p> 049 * 050 * @since 22.0.0 051 */ 052public interface I_CmsElementMarker extends I_CmsConfigurationParameterHandler { 053 054 /** 055 * Adds the end marker for an element to the page output.<p> 056 * 057 * @param context the page context 058 * @param element the element 059 */ 060 void addEndMarker(PageContext context, CmsContainerElementBean element); 061 062 /** 063 * Adds the start marker for an element to the page output.<p> 064 * 065 * @param context the page context 066 * @param element the element 067 * @param formatter the formatter the element is rendered with, or <code>null</code> 068 */ 069 void addStartMarker(PageContext context, CmsContainerElementBean element, I_CmsFormatterBean formatter); 070}