/** * Copyright (C) 2017 Christian Pierre MOMON * * This file is part of (April) Hebdobot. * * Hebdobot is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Hebdobot 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Hebdobot. If not, see */ package org.april.hebdobot; import org.april.hebdobot.identica.IdenticaSettings; import org.april.hebdobot.pastebin.PastebinSettings; import org.april.hebdobot.twitter.TwitterSettings; /** * The Class IdenticaSettings. */ public class HebdobotSettings { private String name; private String host; private int port; private String channel; private String reviewFileSuffix; private IdenticaSettings identica; private PastebinSettings pastebin; private TwitterSettings twitter; /** * Instantiates a new hebdobot settings. */ public HebdobotSettings(final String name, final String host, final int port, final String channel, final String reviewFileSuffix) { this.name = name; this.host = host; this.port = port; this.channel = channel; this.reviewFileSuffix = reviewFileSuffix; this.identica = new IdenticaSettings(); this.pastebin = new PastebinSettings(); this.twitter = new TwitterSettings(); } public String getChannel() { return this.channel; } public String getHost() { return this.host; } public IdenticaSettings getIdentica() { return this.identica; } public String getName() { return this.name; } public PastebinSettings getPastebin() { return this.pastebin; } public int getPort() { return this.port; } public String getReviewFileSuffix() { return this.reviewFileSuffix; } public TwitterSettings getTwitter() { return this.twitter; } public void setChannel(final String channel) { this.channel = channel; } public void setHost(final String host) { this.host = host; } public void setName(final String name) { this.name = name; } public void setPort(final int port) { this.port = port; } /** * Checks if is valid. * * @param source * the source * @return true, if is valid */ public static boolean isValid(final HebdobotSettings source) { boolean result; if (source == null) { result = false; } else { result = true; } // return result; } }