Reformat source code, new line length for comments (79), some trailing whitespace...
[jFCPlib.git] / src / main / java / net / pterodactylus / fcp / GetConfig.java
1 /*
2  * jFCPlib - GetConfig.java - Copyright © 2008 David Roden
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 2 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, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  */
18
19 package net.pterodactylus.fcp;
20
21 /**
22  * The “GetConfig” command tells the node to send its configuration to the
23  * client.
24  *
25  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
26  */
27 public class GetConfig extends FcpMessage {
28
29         /**
30          * Creates a new “GetConfig” command.
31          */
32         public GetConfig() {
33                 super("GetConfig");
34         }
35
36         /**
37          * Sets whether the {@link ConfigData} result message shall include the
38          * current values.
39          *
40          * @param withCurrent
41          *            <code>true</code> to include current values in the result,
42          *            <code>false</code> otherwise
43          */
44         public void setWithCurrent(boolean withCurrent) {
45                 setField("WithCurrent", String.valueOf(withCurrent));
46         }
47
48         /**
49          * Sets whether the {@link ConfigData} result message shall include the
50          * short descriptions.
51          *
52          * @param withShortDescription
53          *            <code>true</code> to include the short descriptions in the
54          *            result, <code>false</code> otherwise
55          */
56         public void setWithShortDescription(boolean withShortDescription) {
57                 setField("WithShortDescription", String.valueOf(withShortDescription));
58         }
59
60         /**
61          * Sets whether the {@link ConfigData} result message shall include the
62          * long descriptions.
63          *
64          * @param withLongDescription
65          *            <code>true</code> to include the long descriptions in the
66          *            result, <code>false</code> otherwise
67          */
68         public void setWithLongDescription(boolean withLongDescription) {
69                 setField("WithLongDescription", String.valueOf(withLongDescription));
70         }
71
72         /**
73          * Sets whether the {@link ConfigData} result message shall include the
74          * data types.
75          *
76          * @param withDataTypes
77          *            <code>true</code> to include the data types in the result,
78          *            <code>false</code> otherwise
79          */
80         public void setWithDataTypes(boolean withDataTypes) {
81                 setField("WithDataTypes", String.valueOf(withDataTypes));
82         }
83
84         /**
85          * Sets whether the {@link ConfigData} result message shall include the
86          * defaults.
87          *
88          * @param setWithDefaults
89          *            <code>true</code> to include the defaults in the result,
90          *            <code>false</code> otherwise
91          */
92         public void setWithDefaults(boolean setWithDefaults) {
93                 setField("WithDefaults", String.valueOf(setWithDefaults));
94         }
95
96         /**
97          * Sets whether the {@link ConfigData} result message shall include the
98          * sort order.
99          *
100          * @param withSortOrder
101          *            <code>true</code> to include the sort order in the result,
102          *            <code>false</code> otherwise
103          */
104         public void setWithSortOrder(boolean withSortOrder) {
105                 setField("WithSortOrder", String.valueOf(withSortOrder));
106         }
107
108         /**
109          * Sets whether the {@link ConfigData} result message shall include the
110          * expert flag.
111          *
112          * @param withExpertFlag
113          *            <code>true</code> to include the expert flag in the result,
114          *            <code>false</code> otherwise
115          */
116         public void setWithExpertFlag(boolean withExpertFlag) {
117                 setField("WithExpertFlag", String.valueOf(withExpertFlag));
118         }
119
120         /**
121          * Sets whether the {@link ConfigData} result message shall include the
122          * force-write flag.
123          *
124          * @param withForceWriteFlag
125          *            <code>true</code> to include the force-write flag in the
126          *            result, <code>false</code> otherwise
127          */
128         public void setWithForceWriteFlag(boolean withForceWriteFlag) {
129                 setField("WithForceWriteFlag", String.valueOf(withForceWriteFlag));
130         }
131
132 }