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                    this(namespace, controlName, defaultState, disabled, children, null);
044            }
045    
046            public PortletDataHandlerBoolean(
047                    String namespace, String controlName, boolean defaultState,
048                    boolean disabled, PortletDataHandlerControl[] children,
049                    String className) {
050    
051                    this(
052                            namespace, controlName, defaultState, disabled, children, className,
053                            null);
054            }
055    
056            public PortletDataHandlerBoolean(
057                    String namespace, String controlName, boolean defaultState,
058                    boolean disabled, PortletDataHandlerControl[] children,
059                    String className, String referrerClassName) {
060    
061                    this(
062                            namespace, controlName, controlName, defaultState, disabled,
063                            children, className, referrerClassName);
064            }
065    
066            public PortletDataHandlerBoolean(
067                    String namespace, String controlName, boolean defaultState,
068                    PortletDataHandlerControl[] children) {
069    
070                    this(namespace, controlName, defaultState, false, children);
071            }
072    
073            public PortletDataHandlerBoolean(
074                    String namespace, String controlName, String controlLabel,
075                    boolean defaultState, boolean disabled,
076                    PortletDataHandlerControl[] children, String className,
077                    String referrerClassName) {
078    
079                    super(
080                            namespace, controlName, controlLabel, disabled, className,
081                            referrerClassName);
082    
083                    _children = children;
084                    _defaultState = defaultState;
085            }
086    
087            public PortletDataHandlerControl[] getChildren() {
088                    return _children;
089            }
090    
091            public boolean getDefaultState() {
092                    return _defaultState;
093            }
094    
095            private PortletDataHandlerControl[] _children;
096            private boolean _defaultState;
097    
098    }