X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Ffcp%2FConfigData.java;fp=src%2Fnet%2Fpterodactylus%2Ffcp%2FConfigData.java;h=0000000000000000000000000000000000000000;hb=508624458578f01a393f8b44f32b98b40054fdc8;hp=4eb7954beb7fb0ebe61067305ee756246e3b1c08;hpb=dd605aee444057a874fabf7fb0045b8448b0d1cd;p=jFCPlib.git diff --git a/src/net/pterodactylus/fcp/ConfigData.java b/src/net/pterodactylus/fcp/ConfigData.java deleted file mode 100644 index 4eb7954..0000000 --- a/src/net/pterodactylus/fcp/ConfigData.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * jFCPlib - ConfigData.java - Copyright © 2008 David Roden - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package net.pterodactylus.fcp; - -/** - * A “ConfigData” message contains various aspects of the node’s configuration. - * - * @see GetConfig - * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - */ -public class ConfigData extends BaseMessage { - - /** - * Creates a new “ConfigData” message that wraps the received message. - * - * @param receivedMessage - * The received message - */ - ConfigData(FcpMessage receivedMessage) { - super(receivedMessage); - } - - /** - * Returns the current value of the given option. - * - * @param option - * The name of the option - * @return The current value of the option - */ - public String getCurrent(String option) { - return getField("current." + option); - } - - /** - * Returns the short description of the given option. - * - * @param option - * The name of the option - * @return The short description of the option - */ - public String getShortDescription(String option) { - return getField("shortDescription." + option); - } - - /** - * Returns the long description of the given option. - * - * @param option - * The name of the option - * @return The long description of the option - */ - public String getLongDescription(String option) { - return getField("longDescription." + option); - } - - /** - * Returns the data type of the given option. - * - * @param option - * The name of the option - * @return The data type of the option - */ - public String getDataType(String option) { - return getField("dataType." + option); - } - - /** - * Returns the default value of the given option. - * - * @param option - * The name of the option - * @return The default value of the option - */ - public String getDefault(String option) { - return getField("default." + option); - } - - /** - * Returns the sort order of the given option. - * - * @param option - * The name of the option - * @return The sort order of the option, or -1 if the sort - * order could not be parsed - */ - public int getSortOrder(String option) { - return FcpUtils.safeParseInt(getField("sortOrder." + option)); - } - - /** - * Returns the expert flag of the given option. - * - * @param option - * The name of the option - * @return The expert flag of the option - */ - public boolean getExpertFlag(String option) { - return Boolean.valueOf(getField("expertFlag." + option)); - } - - /** - * Returns the force-write flag of the given option - * - * @param option - * The name of the option - * @return The force-write flag of the given option - */ - public boolean getForceWriteFlag(String option) { - return Boolean.valueOf(getField("forceWriteFlag." + option)); - } - -}