1 /** 2 * This file Copyright (c) 2003-2011 Magnolia International 3 * Ltd. (http://www.magnolia-cms.com). All rights reserved. 4 * 5 * 6 * This file is dual-licensed under both the Magnolia 7 * Network Agreement and the GNU General Public License. 8 * You may elect to use one or the other of these licenses. 9 * 10 * This file is distributed in the hope that it will be 11 * useful, but AS-IS and WITHOUT ANY WARRANTY; without even the 12 * implied warranty of MERCHANTABILITY or FITNESS FOR A 13 * PARTICULAR PURPOSE, TITLE, or NONINFRINGEMENT. 14 * Redistribution, except as permitted by whichever of the GPL 15 * or MNA you select, is prohibited. 16 * 17 * 1. For the GPL license (GPL), you can redistribute and/or 18 * modify this file under the terms of the GNU General 19 * Public License, Version 3, as published by the Free Software 20 * Foundation. You should have received a copy of the GNU 21 * General Public License, Version 3 along with this program; 22 * if not, write to the Free Software Foundation, Inc., 51 23 * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 24 * 25 * 2. For the Magnolia Network Agreement (MNA), this file 26 * and the accompanying materials are made available under the 27 * terms of the MNA which accompanies this distribution, and 28 * is available at http://www.magnolia-cms.com/mna.html 29 * 30 * Any modifications to this file must keep this entire header 31 * intact. 32 * 33 */ 34 package info.magnolia.module.templating; 35 36 37 /** 38 * Represents a paragraph definition. Following are most of the properties you can use 39 * to configure your paragraphs. Of course, if you're using specific subclasses, 40 * other properties could be available. 41 * <br/> 42 * <br/> 43 * <table border="1"> 44 * <tbody> 45 * <tr> 46 * <th>Property</th> 47 * <th>Default</th> 48 * <th>Values</th> 49 * <th>Description</th> 50 * </tr> 51 * <tr> 52 * <td>class</td> 53 * <td> {@link Paragraph}</td> 54 * <td> </td> 55 * <td> </td> 56 * </tr> 57 * <tr> 58 * <td>type</td> 59 * <td><code>jsp</code>,<code>freemarker</code>, ...</td> 60 * <td>Determines which <code>ParagraphRenderer</code> to use. Out of the box, 61 * Magnolia provides support for JSP and FreeMarker.</td> 62 * </tr> 63 * <tr> 64 * <td>templatePath</td> 65 * <td> </td> 66 * <td>This property follows conventional syntax for path definitions.</td> 67 * <td>This property defines the path to the template to be used for this 68 * paragraph.</td> 69 * </tr> 70 * <tr> 71 * <td>modelClass</td> 72 * <td> </td> 73 * <td>The fully qualified name of a class implementing 74 * {@link RenderingModel}</td> 75 * <td>The bean created by the renderer based on the modelClass defined on the 76 * paragraph or template definition. The current content, definition and the 77 * parent model are passed to the constructor. This object is instantiated for 78 * each rendering of a template or a paragraph.</td> 79 * </tr> 80 * <tr> 81 * <td>i18nBasename</td> 82 * <td>info.magnolia.module. admininterface.messages or whatever the 83 * i18nBasename is set to in the dialog for this paragraph.</td> 84 * <td>This can be any properly defined Magnolia message bundle.</td> 85 * <td>This property defines the message bundle to use for this paragraph.</td> 86 * </tr> 87 * <tr> 88 * <td>title</td> 89 * <td> </td> 90 * <td>The title or a message bundle key to be used with the bundle defined by 91 * <code>i18nBasename</code>.</td> 92 * <td>This property defines the title of the paragraph.</td> 93 * </tr> 94 * <tr> 95 * <td>description</td> 96 * <td> </td> 97 * <td>The description or a message bundle key to be used with the bundle 98 * defined by <code>i18nBasename</code>.</td> 99 * <td>This property is used to describe the paragraph.</td> 100 * </tr> 101 * <tr> 102 * <td>dialog</td> 103 * <td> </td> 104 * <td> </td> 105 * <td>This property is used to specify the name of the dialog associated with 106 * this paragraph.</td> 107 * </tr> 108 * </tbody> 109 * </table> 110 * 111 * @deprecated since 4.5, the differentiation of paragraphs and templates were removed. Use {@link RenderableDefinition} instead. 112 */ 113 public class Paragraph extends AbstractRenderable { 114 @SuppressWarnings({"unchecked", "rawtypes"}) 115 public Paragraph() { 116 setModelClass(RenderingModelImpl.class); 117 } 118 }