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