001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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                    PortletDataHandlerControl[] children) {
042    
043                    this(namespace, controlName, defaultState, false, children);
044            }
045    
046            public PortletDataHandlerBoolean(
047                    String namespace, String controlName, boolean defaultState,
048                    boolean disabled, PortletDataHandlerControl[] children) {
049    
050                    super(namespace, controlName, disabled);
051    
052                    _children = children;
053                    _defaultState = defaultState;
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    }