001/* 002 * This library is part of OpenCms - 003 * the Open Source Content Management System 004 * 005 * Copyright (c) Alkacon Software GmbH & Co. KG (http://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, please see the 018 * company website: http://www.alkacon.com 019 * 020 * For further information about OpenCms, please see the 021 * project website: http://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.xml.containerpage; 029 030import org.opencms.util.CmsUUID; 031import org.opencms.xml.content.CmsXmlContentProperty; 032 033import java.util.Collection; 034import java.util.Collections; 035import java.util.List; 036import java.util.Map; 037import java.util.Set; 038 039/** 040 * Formatter configuration for flex formatters.<p> 041 */ 042public class CmsFlexFormatterBean extends CmsFormatterBean { 043 044 /** The root path to the default content. */ 045 private String m_defaultContentRootPath; 046 047 /** The UUID of the default content resource. */ 048 private CmsUUID m_defaultContentStructureId; 049 050 /** The placeholder macro input. */ 051 private String m_placeholderStringTemplate; 052 053 /** The macro input. */ 054 private String m_stringTemplate; 055 056 /** 057 * Constructor for creating a new formatter configuration with resource structure id.<p> 058 * 059 * @param containerTypes the formatter container types 060 * @param jspRootPath the formatter JSP VFS root path 061 * @param jspStructureId the structure id of the formatter JSP 062 * @param minWidth the formatter min width 063 * @param maxWidth the formatter max width 064 * @param searchContent indicates if the content should be searchable in the online index when this formatter is used 065 * @param location the location where this formatter was defined, should be an OpenCms VFS resource path 066 * @param niceName the configuration display name 067 * @param description the help text for the formatter 068 * @param resourceTypeNames the resource type names 069 * @param rank the configuration rank 070 * @param id the configuration id 071 * @param defaultContentRootPath the root path to the default content 072 * @param defaultContentStructureId the UUID of the default content resource 073 * @param settings the settings configuration 074 * @param isDetail <code>true</code> if detail formatter 075 * @param isAutoEnabled <code>true</code> if auto enabled 076 * @param displayType the display type 077 * @param isAllowsSettingsInEditor whether this formatter allows settings to be edited in the content editor 078 * @param stringTemplate the string template 079 * @param placeholderStringTemplate the placeholder string template 080 * @param metaMappings the meta mappings 081 * @param useMetaMappingsForNormalElements if true, meta mappings will be evaluated for normal container elements, not just detail elements 082 */ 083 public CmsFlexFormatterBean( 084 Set<String> containerTypes, 085 String jspRootPath, 086 CmsUUID jspStructureId, 087 int minWidth, 088 int maxWidth, 089 boolean searchContent, 090 String location, 091 String niceName, 092 String description, 093 Collection<String> resourceTypeNames, 094 int rank, 095 String id, 096 String defaultContentRootPath, 097 CmsUUID defaultContentStructureId, 098 Map<String, CmsXmlContentProperty> settings, 099 boolean isAutoEnabled, 100 boolean isDetail, 101 String displayType, 102 boolean isAllowsSettingsInEditor, 103 String stringTemplate, 104 String placeholderStringTemplate, 105 List<CmsMetaMapping> metaMappings, 106 boolean useMetaMappingsForNormalElements) { 107 108 super( 109 containerTypes, 110 jspRootPath, 111 jspStructureId, 112 minWidth, 113 maxWidth, 114 false, 115 searchContent, 116 location, 117 Collections.<String> emptyList(), 118 "", 119 Collections.<String> emptyList(), 120 "", 121 niceName, 122 description, 123 resourceTypeNames, 124 rank, 125 id, 126 settings, 127 true, 128 isAutoEnabled, 129 isDetail, 130 displayType, 131 isAllowsSettingsInEditor, 132 false, 133 false, 134 metaMappings, 135 Collections.emptyMap(), 136 useMetaMappingsForNormalElements); 137 m_stringTemplate = stringTemplate; 138 m_placeholderStringTemplate = placeholderStringTemplate; 139 m_defaultContentRootPath = defaultContentRootPath; 140 m_defaultContentStructureId = defaultContentStructureId; 141 } 142 143 /** 144 * Returns the root path to the default content.<p> 145 * 146 * @return the root path to the default content 147 */ 148 public String getDefaultContentRootPath() { 149 150 return m_defaultContentRootPath; 151 } 152 153 /** 154 * Returns the UUID of the default content.<p> 155 * 156 * @return the UUID of the default content 157 */ 158 public CmsUUID getDefaultContentStructureId() { 159 160 return m_defaultContentStructureId; 161 } 162 163 /** 164 * Returns the placeholder string template.<p> 165 * 166 * @return the placeholder string template 167 */ 168 public String getPlaceholderStringTemplate() { 169 170 return m_placeholderStringTemplate; 171 } 172 173 /** 174 * Returns the string template.<p> 175 * 176 * @return the string template 177 */ 178 public String getStringTemplate() { 179 180 return m_stringTemplate; 181 } 182}