@@ -0,0 +1,2649 @@
+%0Apackage net.sourceforge.guacamole.properties;%0A%0A/* ***** BEGIN LICENSE BLOCK *****%0A * Version: MPL 1.1/GPL 2.0/LGPL 2.1%0A *%0A * The contents of this file are subject to the Mozilla Public License Version%0A * 1.1 (the %22License%22); you may not use this file except in compliance with%0A * the License. You may obtain a copy of the License at%0A * http://www.mozilla.org/MPL/%0A *%0A * Software distributed under the License is distributed on an %22AS IS%22 basis,%0A * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License%0A * for the specific language governing rights and limitations under the%0A * License.%0A *%0A * The Original Code is guacamole-ext.%0A *%0A * The Initial Developer of the Original Code is%0A * Michael Jumper.%0A * Portions created by the Initial Developer are Copyright (C) 2010%0A * the Initial Developer. All Rights Reserved.%0A *%0A * Contributor(s):%0A *%0A * Alternatively, the contents of this file may be used under the terms of%0A * either the GNU General Public License Version 2 or later (the %22GPL%22), or%0A * the GNU Lesser General Public License Version 2.1 or later (the %22LGPL%22),%0A * in which case the provisions of the GPL or the LGPL are applicable instead%0A * of those above. If you wish to allow use of your version of this file only%0A * under the terms of either the GPL or the LGPL, and not to allow others to%0A * use your version of this file under the terms of the MPL, indicate your%0A * decision by deleting the provisions above and replace them with the notice%0A * and other provisions required by the GPL or the LGPL. If you do not delete%0A * the provisions above, a recipient may use your version of this file under%0A * the terms of any one of the MPL, the GPL or the LGPL.%0A *%0A * ***** END LICENSE BLOCK ***** */%0A%0Aimport net.sourceforge.guacamole.GuacamoleException;%0Aimport net.sourceforge.guacamole.GuacamoleServerException;%0A%0A/**%0A * A GuacamoleProperty whose value is an boolean. Legal true values are %22true%22,%0A * or %22false%22. Case does not matter.%0A *%0A * @author Michael Jumper%0A */%0Apublic abstract class BooleanGuacamoleProperty implements GuacamoleProperty%3CBoolean%3E %7B%0A%0A    @Override%0A    public Boolean parseValue(String value) throws GuacamoleException %7B%0A%0A        // If no property provided, return null.%0A        if (value == null)%0A            return null;%0A%0A        // If %22true%22, return true%0A        if (value.equalsIgnoreCase(%22true%22))%0A            return true;%0A%0A        // If %22false%22, return false%0A        if (value.equalsIgnoreCase(%22false%22))%0A            return false;%0A%0A        // Otherwise, fail%0A        throw new GuacamoleServerException(%22Property %5C%22%22 + getName()%0A                + %22%5C%22 must be either %5C%22true%5C%22 or %5C%22false%5C%22.%22);%0A%0A    %7D%0A%0A%7D%0A

Implement BooleanGuacamoleProperty.