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 GmbH & Co. KG, 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.importexport;
029
030/**
031 * The CmsExtendedHtmlImportManager keeps the default values for the HTML-> OpenCms Template converter.<p>
032 *
033 * This default values are saved in the configuration file <code>opencms-importexport.xml</code>.<p>
034 *
035 * @see org.opencms.importexport.CmsImportExportManager#getExtendedHtmlImportDefault()
036 *
037 * @since 7.0.2
038 */
039public class CmsExtendedHtmlImportDefault {
040
041    /** the destination directory in the OpenCms VFS. */
042    private String m_destinationDir;
043
044    /** the gallery name of the downloads. */
045    private String m_downloadGallery;
046
047    /** the element name of the template. */
048    private String m_element;
049
050    /** the encoding used for all imported input files. */
051    private String m_encoding;
052
053    /** the end pattern for extracting content. */
054    private String m_endPattern;
055
056    /** the image gallery name. */
057    private String m_imageGallery;
058
059    /** the input directory in the "real" file system. */
060    private String m_inputDir;
061
062    /** should broken links be kept. */
063    private String m_keepBrokenLinks;
064
065    /** the external link gallery name. */
066    private String m_linkGallery;
067
068    /** the local use for content definition. */
069    private String m_locale;
070
071    /** the overwrite value new resources. */
072    private String m_overwrite;
073
074    /** the start pattern for extracting content. */
075    private String m_startPattern;
076
077    /** the template use for all pages. */
078    private String m_template;
079
080    /**
081     * Default Constructor.<p>
082     */
083    public CmsExtendedHtmlImportDefault() {
084
085        m_overwrite = "true";
086        m_keepBrokenLinks = "";
087        m_template = "/system/modules/org.opencms.welcome/templates/empty";
088        m_startPattern = "";
089        m_locale = "en";
090        m_linkGallery = "";
091        m_encoding = "ISO-8859-1";
092        m_inputDir = "";
093        m_imageGallery = "";
094        m_endPattern = "";
095        m_element = "body";
096        m_downloadGallery = "";
097        m_destinationDir = "";
098    }
099
100    /**
101     * Returns the destinationDir.<p>
102     *
103     * @return the destinationDir
104     */
105    public String getDestinationDir() {
106
107        return m_destinationDir;
108    }
109
110    /**
111     * Returns the downloadGallery.<p>
112     *
113     * @return the downloadGallery
114     */
115    public String getDownloadGallery() {
116
117        return m_downloadGallery;
118    }
119
120    /**
121     * Returns the element.<p>
122     *
123     * @return the element
124     */
125    public String getElement() {
126
127        return m_element;
128    }
129
130    /**
131     * Returns the encoding.<p>
132     *
133     * @return the encoding
134     */
135    public String getEncoding() {
136
137        return m_encoding;
138    }
139
140    /**
141     * Returns the endPattern.<p>
142     *
143     * @return the endPattern
144     */
145    public String getEndPattern() {
146
147        return m_endPattern;
148    }
149
150    /**
151     * Returns the imageGallery.<p>
152     *
153     * @return the imageGallery
154     */
155    public String getImageGallery() {
156
157        return m_imageGallery;
158    }
159
160    /**
161     * Returns the inputDir.<p>
162     *
163     * @return the inputDir
164     */
165    public String getInputDir() {
166
167        return m_inputDir;
168    }
169
170    /**
171     * Returns the keepBrokenLinks.<p>
172     *
173     * @return the keepBrokenLinks
174     */
175    public String getKeepBrokenLinks() {
176
177        return m_keepBrokenLinks;
178    }
179
180    /**
181     * Returns the linkGallery.<p>
182     *
183     * @return the linkGallery
184     */
185    public String getLinkGallery() {
186
187        return m_linkGallery;
188    }
189
190    /**
191     * Returns the locale.<p>
192     *
193     * @return the locale
194     */
195    public String getLocale() {
196
197        return m_locale;
198    }
199
200    /**
201     * Returns the overwrite.<p>
202     *
203     * @return the overwrite
204     */
205    public String getOverwrite() {
206
207        return m_overwrite;
208    }
209
210    /**
211     * Returns the startPattern.<p>
212     *
213     * @return the startPattern
214     */
215    public String getStartPattern() {
216
217        return m_startPattern;
218    }
219
220    /**
221     * Returns the template.<p>
222     *
223     * @return the template
224     */
225    public String getTemplate() {
226
227        return m_template;
228    }
229
230    /**
231     * Sets the destinationDir.<p>
232     *
233     * @param destinationDir the destinationDir to set
234     */
235    public void setDestinationDir(String destinationDir) {
236
237        m_destinationDir = destinationDir;
238    }
239
240    /**
241     * Sets the downloadGallery.<p>
242     *
243     * @param downloadGallery the downloadGallery to set
244     */
245    public void setDownloadGallery(String downloadGallery) {
246
247        m_downloadGallery = downloadGallery;
248    }
249
250    /**
251     * Sets the element.<p>
252     *
253     * @param element the element to set
254     */
255    public void setElement(String element) {
256
257        m_element = element;
258    }
259
260    /**
261     * Sets the encoding.<p>
262     *
263     * @param encoding the encoding to set
264     */
265    public void setEncoding(String encoding) {
266
267        m_encoding = encoding;
268    }
269
270    /**
271     * Sets the endPattern.<p>
272     *
273     * @param endPattern the endPattern to set
274     */
275    public void setEndPattern(String endPattern) {
276
277        m_endPattern = endPattern;
278    }
279
280    /**
281     * Sets the imageGallery.<p>
282     *
283     * @param imageGallery the imageGallery to set
284     */
285    public void setImageGallery(String imageGallery) {
286
287        m_imageGallery = imageGallery;
288    }
289
290    /**
291     * Sets the inputDir.<p>
292     *
293     * @param inputDir the inputDir to set
294     */
295    public void setInputDir(String inputDir) {
296
297        m_inputDir = inputDir;
298    }
299
300    /**
301     * Sets the keepBrokenLinks.<p>
302     *
303     * @param keepBrokenLinks the keepBrokenLinks to set
304     */
305    public void setKeepBrokenLinks(String keepBrokenLinks) {
306
307        m_keepBrokenLinks = keepBrokenLinks;
308    }
309
310    /**
311     * Sets the linkGallery.<p>
312     *
313     * @param linkGallery the linkGallery to set
314     */
315    public void setLinkGallery(String linkGallery) {
316
317        m_linkGallery = linkGallery;
318    }
319
320    /**
321     * Sets the locale.<p>
322     *
323     * @param locale the locale to set
324     */
325    public void setLocale(String locale) {
326
327        m_locale = locale;
328    }
329
330    /**
331     * Sets the overwrite.<p>
332     *
333     * @param overwrite the overwrite to set
334     */
335    public void setOverwrite(String overwrite) {
336
337        m_overwrite = overwrite;
338    }
339
340    /**
341     * Sets the startPattern.<p>
342     *
343     * @param startPattern the startPattern to set
344     */
345    public void setStartPattern(String startPattern) {
346
347        m_startPattern = startPattern;
348    }
349
350    /**
351     * Sets the template.<p>
352     *
353     * @param template the template to set
354     */
355    public void setTemplate(String template) {
356
357        m_template = template;
358    }
359
360    /**
361     * @see java.lang.Object#toString()
362     */
363    @Override
364    public String toString() {
365
366        StringBuffer result = new StringBuffer();
367        result.append("\n DestinationDir:").append(getDestinationDir());
368        result.append("\n InputDir:").append(getInputDir());
369        result.append("\n DownloadGallery:").append(getDownloadGallery());
370        result.append("\n ImageGallery:").append(getImageGallery());
371        result.append("\n LinkGallery:").append(getLinkGallery());
372        result.append("\n Template:").append(getTemplate());
373        result.append("\n Element:").append(getElement());
374        result.append("\n Locale:").append(getLocale());
375        result.append("\n Encoding:").append(getEncoding());
376        result.append("\n StartPattern:").append(getStartPattern());
377        result.append("\n EndPattern:").append(getEndPattern());
378        result.append("\n Overwrite:").append(getOverwrite());
379        result.append("\n KeepBrokenLinks:").append(getKeepBrokenLinks());
380        return result.toString();
381    }
382}