001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.lar;
016    
017    /**
018     * @author Raymond Aug??
019     */
020    public class PortletDataHandlerBoolean extends PortletDataHandlerControl {
021    
022            public PortletDataHandlerBoolean(String namespace, String controlName) {
023                    this(namespace, controlName, true);
024            }
025    
026            public PortletDataHandlerBoolean(
027                    String namespace, String controlName, boolean defaultState) {
028    
029                    this(namespace, controlName, defaultState, false);
030            }
031    
032            public PortletDataHandlerBoolean(
033                    String namespace, String controlName, boolean defaultState,
034                    boolean disabled) {
035    
036                    this(namespace, controlName, defaultState, disabled, null);
037            }
038    
039            public PortletDataHandlerBoolean(
040                    String namespace, String controlName, boolean defaultState,
041                    boolean disabled, PortletDataHandlerControl[] children) {
042    
043                    super(namespace, controlName, disabled);
044    
045                    _children = children;
046                    _defaultState = defaultState;
047            }
048    
049            public PortletDataHandlerBoolean(
050                    String namespace, String controlName, boolean defaultState,
051                    PortletDataHandlerControl[] children) {
052    
053                    this(namespace, controlName, defaultState, false, children);
054            }
055    
056            public PortletDataHandlerControl[] getChildren() {
057                    return _children;
058            }
059    
060            public boolean getDefaultState() {
061                    return _defaultState;
062            }
063    
064            private PortletDataHandlerControl[] _children;
065            private boolean _defaultState;
066    
067    }