Expose lots of constructors and accessors
[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         public GetConfig(String identifer) {
37                 this();
38                 setField("Identifier", identifer);
39         }
40
41         /**
42          * Sets whether the {@link ConfigData} result message shall include the
43          * current values.
44          *
45          * @param withCurrent
46          *            <code>true</code> to include current values in the result,
47          *            <code>false</code> otherwise
48          */
49         public void setWithCurrent(boolean withCurrent) {
50                 setField("WithCurrent", String.valueOf(withCurrent));
51         }
52
53         /**
54          * Sets whether the {@link ConfigData} result message shall include the
55          * short descriptions.
56          *
57          * @param withShortDescription
58          *            <code>true</code> to include the short descriptions in the
59          *            result, <code>false</code> otherwise
60          */
61         public void setWithShortDescription(boolean withShortDescription) {
62                 setField("WithShortDescription", String.valueOf(withShortDescription));
63         }
64
65         /**
66          * Sets whether the {@link ConfigData} result message shall include the
67          * long descriptions.
68          *
69          * @param withLongDescription
70          *            <code>true</code> to include the long descriptions in the
71          *            result, <code>false</code> otherwise
72          */
73         public void setWithLongDescription(boolean withLongDescription) {
74                 setField("WithLongDescription", String.valueOf(withLongDescription));
75         }
76
77         /**
78          * Sets whether the {@link ConfigData} result message shall include the
79          * data types.
80          *
81          * @param withDataTypes
82          *            <code>true</code> to include the data types in the result,
83          *            <code>false</code> otherwise
84          */
85         public void setWithDataTypes(boolean withDataTypes) {
86                 setField("WithDataTypes", String.valueOf(withDataTypes));
87         }
88
89         /**
90          * Sets whether the {@link ConfigData} result message shall include the
91          * defaults.
92          *
93          * @param setWithDefaults
94          *            <code>true</code> to include the defaults in the result,
95          *            <code>false</code> otherwise
96          */
97         public void setWithDefaults(boolean setWithDefaults) {
98                 setField("WithDefaults", String.valueOf(setWithDefaults));
99         }
100
101         /**
102          * Sets whether the {@link ConfigData} result message shall include the
103          * sort order.
104          *
105          * @param withSortOrder
106          *            <code>true</code> to include the sort order in the result,
107          *            <code>false</code> otherwise
108          */
109         public void setWithSortOrder(boolean withSortOrder) {
110                 setField("WithSortOrder", String.valueOf(withSortOrder));
111         }
112
113         /**
114          * Sets whether the {@link ConfigData} result message shall include the
115          * expert flag.
116          *
117          * @param withExpertFlag
118          *            <code>true</code> to include the expert flag in the result,
119          *            <code>false</code> otherwise
120          */
121         public void setWithExpertFlag(boolean withExpertFlag) {
122                 setField("WithExpertFlag", String.valueOf(withExpertFlag));
123         }
124
125         /**
126          * Sets whether the {@link ConfigData} result message shall include the
127          * force-write flag.
128          *
129          * @param withForceWriteFlag
130          *            <code>true</code> to include the force-write flag in the
131          *            result, <code>false</code> otherwise
132          */
133         public void setWithForceWriteFlag(boolean withForceWriteFlag) {
134                 setField("WithForceWriteFlag", String.valueOf(withForceWriteFlag));
135         }
136
137 }