1 /*
2 * Copyright (C) 2013 Room Work eXperience
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17 package net.rwx.maven.asciidoc.configuration;
18
19 /**
20 * A configuration bean to describe a document to generate.
21 *
22 * @author Arnaud Fonce <arnaud.fonce@r-w-x.net>
23 */
24 public class Document {
25
26 /**
27 * Document title.
28 * @parameter
29 */
30 private String title;
31
32 /**
33 * Document source path.
34 * @parameter
35 */
36 private String path;
37
38 /**
39 * Document type.
40 * Sould be article or book.
41 * @parameter
42 */
43 private String documentType;
44
45 /**
46 * Document backend.
47 * Should be one of backend defined in AsciidocBackendSingleton.
48 * @parameter
49 */
50 private String backend;
51
52 /**
53 * Output path for the generated document.
54 * @parameter
55 */
56 private String outputPath;
57
58 public String getBackend() {
59 return backend;
60 }
61
62 public void setBackend( String backend ) {
63 this.backend = backend;
64 }
65
66 public String getDocumentType() {
67 return documentType;
68 }
69
70 public void setDocumentType( String documentType ) {
71 this.documentType = documentType;
72 }
73
74 public String getPath() {
75 return path;
76 }
77
78 public void setPath( String path ) {
79 this.path = path;
80 }
81
82 public String getTitle() {
83 return title;
84 }
85
86 public void setTitle( String title ) {
87 this.title = title;
88 }
89
90 public String getOutputPath() {
91 return outputPath;
92 }
93
94 public void setOutputPath( String outputPath ) {
95 this.outputPath = outputPath;
96 }
97
98 @Override
99 public String toString() {
100
101 StringBuilder builder = new StringBuilder();
102
103 builder.append( "[title : ");
104 builder.append( title );
105 builder.append( ",path : ");
106 builder.append( path );
107 builder.append( ",backend : ");
108 builder.append( backend );
109 builder.append( ",documentType : ");
110 builder.append( documentType );
111 builder.append( ",outputPath : ");
112 builder.append( outputPath );
113 builder.append( "]");
114
115 return builder.toString();
116 }
117 }