001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.dynamicdatamapping.model;
016    
017    import java.util.ArrayList;
018    import java.util.List;
019    
020    /**
021     * @author Marcellus Tavares
022     */
023    public class DDMFormLayoutPage {
024    
025            public DDMFormLayoutPage() {
026            }
027    
028            public DDMFormLayoutPage(DDMFormLayoutPage ddmFormLayoutPage) {
029                    for (DDMFormLayoutRow ddmFormLayoutRow :
030                                    ddmFormLayoutPage._ddmFormLayoutRows) {
031    
032                            addDDMFormLayoutRow(new DDMFormLayoutRow(ddmFormLayoutRow));
033                    }
034    
035                    _description = new LocalizedValue(ddmFormLayoutPage._description);
036                    _title = new LocalizedValue(ddmFormLayoutPage._title);
037            }
038    
039            public void addDDMFormLayoutRow(DDMFormLayoutRow ddmFormLayoutRow) {
040                    _ddmFormLayoutRows.add(ddmFormLayoutRow);
041            }
042    
043            public DDMFormLayoutRow getDDMFormLayoutRow(int index) {
044                    return _ddmFormLayoutRows.get(index);
045            }
046    
047            public List<DDMFormLayoutRow> getDDMFormLayoutRows() {
048                    return _ddmFormLayoutRows;
049            }
050    
051            public LocalizedValue getDescription() {
052                    return _description;
053            }
054    
055            public LocalizedValue getTitle() {
056                    return _title;
057            }
058    
059            public void setDDMFormLayoutRows(List<DDMFormLayoutRow> ddmFormLayoutRows) {
060                    _ddmFormLayoutRows = ddmFormLayoutRows;
061            }
062    
063            public void setDescription(LocalizedValue description) {
064                    _description = description;
065            }
066    
067            public void setTitle(LocalizedValue title) {
068                    _title = title;
069            }
070    
071            private List<DDMFormLayoutRow> _ddmFormLayoutRows = new ArrayList<>();
072            private LocalizedValue _description = new LocalizedValue();
073            private LocalizedValue _title = new LocalizedValue();
074    
075    }