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.CmsConfigurationException; 031import org.opencms.configuration.CmsParameterConfiguration; 032import org.opencms.xml.containerpage.CmsContainerElementBean; 033import org.opencms.xml.containerpage.I_CmsFormatterBean; 034 035import jakarta.servlet.jsp.PageContext; 036 037/** 038 * Default {@link I_CmsElementMarker} that emits nothing.<p> 039 * 040 * Used when no <code>edit-marker-handler</code> is configured, so the container and display tags can 041 * always call the configured marker without a null check.<p> 042 * 043 * @since 22.0.0 044 */ 045public class CmsDefaultElementMarker implements I_CmsElementMarker { 046 047 /** The configuration. */ 048 private CmsParameterConfiguration m_config = new CmsParameterConfiguration(); 049 050 /** 051 * @see org.opencms.configuration.I_CmsConfigurationParameterHandler#addConfigurationParameter(java.lang.String, java.lang.String) 052 */ 053 public void addConfigurationParameter(String paramName, String paramValue) { 054 055 m_config.add(paramName, paramValue); 056 } 057 058 /** 059 * @see org.opencms.jsp.I_CmsElementMarker#addEndMarker(jakarta.servlet.jsp.PageContext, org.opencms.xml.containerpage.CmsContainerElementBean) 060 */ 061 public void addEndMarker(PageContext context, CmsContainerElementBean element) { 062 063 // no-op default 064 } 065 066 /** 067 * @see org.opencms.jsp.I_CmsElementMarker#addStartMarker(jakarta.servlet.jsp.PageContext, org.opencms.xml.containerpage.CmsContainerElementBean, org.opencms.xml.containerpage.I_CmsFormatterBean) 068 */ 069 public void addStartMarker(PageContext context, CmsContainerElementBean element, I_CmsFormatterBean formatter) { 070 071 // no-op default 072 } 073 074 /** 075 * @see org.opencms.configuration.I_CmsConfigurationParameterHandler#getConfiguration() 076 */ 077 public CmsParameterConfiguration getConfiguration() { 078 079 return m_config; 080 } 081 082 /** 083 * @see org.opencms.configuration.I_CmsConfigurationParameterHandler#initConfiguration() 084 */ 085 public void initConfiguration() throws CmsConfigurationException { 086 087 // no-op default 088 } 089}