4b8d3753b3327ecb290161f99c2586dec28215de
[jFCPlib.git] / src / net / pterodactylus / fcp / GetConfig.java
1 /*
2  * jSite2 - GetConfig.java -
3  * Copyright © 2008 David Roden
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */
19
20 package net.pterodactylus.fcp;
21
22 /**
23  * The “GetConfig” command tells the node to send its configuration to the
24  * client.
25  * 
26  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
27  */
28 public class GetConfig extends FcpMessage {
29
30         /**
31          * Creates a new “GetConfig” command.
32          */
33         public GetConfig() {
34                 super("GetConfig");
35         }
36
37         /**
38          * Sets whether the {@link ConfigData} result message shall include the
39          * current values.
40          * 
41          * @param withCurrent
42          *            <code>true</code> to include current values in the result,
43          *            <code>false</code> otherwise
44          */
45         public void setWithCurrent(boolean withCurrent) {
46                 setField("WithCurrent", String.valueOf(withCurrent));
47         }
48
49         /**
50          * Sets whether the {@link ConfigData} result message shall include the
51          * short descriptions.
52          * 
53          * @param withShortDescription
54          *            <code>true</code> to include the short descriptions in the
55          *            result, <code>false</code> otherwise
56          */
57         public void setWithShortDescription(boolean withShortDescription) {
58                 setField("WithShortDescription", String.valueOf(withShortDescription));
59         }
60
61         /**
62          * Sets whether the {@link ConfigData} result message shall include the long
63          * descriptions.
64          * 
65          * @param withLongDescription
66          *            <code>true</code> to include the long descriptions in the
67          *            result, <code>false</code> otherwise
68          */
69         public void setWithLongDescription(boolean withLongDescription) {
70                 setField("WithLongDescription", String.valueOf(withLongDescription));
71         }
72
73         /**
74          * Sets whether the {@link ConfigData} result message shall include the data
75          * types.
76          * 
77          * @param withDataTypes
78          *            <code>true</code> to include the data types in the result,
79          *            <code>false</code> otherwise
80          */
81         public void setWithDataTypes(boolean withDataTypes) {
82                 setField("WithDataTypes", String.valueOf(withDataTypes));
83         }
84
85         /**
86          * Sets whether the {@link ConfigData} result message shall include the
87          * defaults.
88          * 
89          * @param setWithDefaults
90          *            <code>true</code> to include the defaults in the result,
91          *            <code>false</code> otherwise
92          */
93         public void setWithDefaults(boolean setWithDefaults) {
94                 setField("WithDefaults", String.valueOf(setWithDefaults));
95         }
96
97         /**
98          * Sets whether the {@link ConfigData} result message shall include the sort
99          * order.
100          * 
101          * @param withSortOrder
102          *            <code>true</code> to include the sort order in the result,
103          *            <code>false</code> otherwise
104          */
105         public void setWithSortOrder(boolean withSortOrder) {
106                 setField("WithSortOrder", String.valueOf(withSortOrder));
107         }
108
109         /**
110          * Sets whether the {@link ConfigData} result message shall include the
111          * expert flag.
112          * 
113          * @param withExpertFlag
114          *            <code>true</code> to include the expert flag in the result,
115          *            <code>false</code> otherwise
116          */
117         public void setWithExpertFlag(boolean withExpertFlag) {
118                 setField("WithExpertFlag", String.valueOf(withExpertFlag));
119         }
120
121         /**
122          * Sets whether the {@link ConfigData} result message shall include the
123          * force-write flag.
124          * 
125          * @param withForceWriteFlag
126          *            <code>true</code> to include the force-write flag in the
127          *            result, <code>false</code> otherwise
128          */
129         public void setWithForceWriteFlag(boolean withForceWriteFlag) {
130                 setField("WithForceWriteFlag", String.valueOf(withForceWriteFlag));
131         }
132
133 }