001    /**
002     * Copyright (c) 2000-2013 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.wiki.model.impl;
016    
017    import com.liferay.portal.kernel.repository.model.FileEntry;
018    import com.liferay.portlet.wiki.model.WikiPageDisplay;
019    
020    import java.util.List;
021    
022    /**
023     * @author Jorge Ferrer
024     */
025    public class WikiPageDisplayImpl implements WikiPageDisplay {
026    
027            public WikiPageDisplayImpl(
028                    long userId, long nodeId, String title, double version, String content,
029                    String formattedContent, String format, boolean head,
030                    List<FileEntry> attachmentsFileEntries) {
031    
032                    _userId = userId;
033                    _nodeId = nodeId;
034                    _title = title;
035                    _version = version;
036                    _content = content;
037                    _formattedContent = formattedContent;
038                    _format = format;
039                    _head = head;
040                    _attachmentsFileEntries = attachmentsFileEntries;
041            }
042    
043            @Override
044            public List<FileEntry> getAttachmentsFileEntries() {
045                    return _attachmentsFileEntries;
046            }
047    
048            @Override
049            public String getContent() {
050                    return _content;
051            }
052    
053            @Override
054            public String getFormat() {
055                    return _format;
056            }
057    
058            @Override
059            public String getFormattedContent() {
060                    return _formattedContent;
061            }
062    
063            @Override
064            public boolean getHead() {
065                    return _head;
066            }
067    
068            @Override
069            public long getNodeId() {
070                    return _nodeId;
071            }
072    
073            @Override
074            public String getTitle() {
075                    return _title;
076            }
077    
078            @Override
079            public long getUserId() {
080                    return _userId;
081            }
082    
083            @Override
084            public double getVersion() {
085                    return _version;
086            }
087    
088            @Override
089            public boolean isHead() {
090                    return _head;
091            }
092    
093            @Override
094            public void setAttachmentsFileEntries(
095                    List<FileEntry> attachmentsFileEntries) {
096    
097                    _attachmentsFileEntries = attachmentsFileEntries;
098            }
099    
100            @Override
101            public void setContent(String content) {
102                    _content = content;
103            }
104    
105            @Override
106            public void setFormat(String format) {
107                    _format = format;
108            }
109    
110            @Override
111            public void setFormattedContent(String formattedContent) {
112                    _formattedContent = formattedContent;
113            }
114    
115            @Override
116            public void setHead(boolean head) {
117                    _head = head;
118            }
119    
120            @Override
121            public void setNodeId(long nodeId) {
122                    _nodeId = nodeId;
123            }
124    
125            @Override
126            public void setTitle(String title) {
127                    _title = title;
128            }
129    
130            @Override
131            public void setUserId(long userId) {
132                    _userId = userId;
133            }
134    
135            @Override
136            public void setVersion(double version) {
137                    _version = version;
138            }
139    
140            private List<FileEntry> _attachmentsFileEntries;
141            private String _content;
142            private String _format;
143            private String _formattedContent;
144            private boolean _head;
145            private long _nodeId;
146            private String _title;
147            private long _userId;
148            private double _version;
149    
150    }