001    /**
002     * Copyright (c) 2000-2010 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.taglib.theme;
016    
017    import com.liferay.portal.model.Account;
018    import com.liferay.portal.model.ColorScheme;
019    import com.liferay.portal.model.Company;
020    import com.liferay.portal.model.Contact;
021    import com.liferay.portal.model.Layout;
022    import com.liferay.portal.model.LayoutTypePortlet;
023    import com.liferay.portal.model.Theme;
024    import com.liferay.portal.model.User;
025    import com.liferay.portal.security.permission.PermissionChecker;
026    import com.liferay.portal.theme.PortletDisplay;
027    import com.liferay.portal.theme.ThemeDisplay;
028    
029    import java.util.List;
030    import java.util.Locale;
031    import java.util.TimeZone;
032    
033    import javax.servlet.jsp.tagext.TagData;
034    import javax.servlet.jsp.tagext.TagExtraInfo;
035    import javax.servlet.jsp.tagext.VariableInfo;
036    
037    /**
038     * @author Brian Wing Shun Chan
039     */
040    public class DefineObjectsTei extends TagExtraInfo {
041    
042            public VariableInfo[] getVariableInfo(TagData tagData) {
043                    return _variableInfo;
044            }
045    
046            private static VariableInfo[] _variableInfo = new VariableInfo[] {
047                    new VariableInfo(
048                            "themeDisplay", ThemeDisplay.class.getName(), true,
049                            VariableInfo.AT_END),
050                    new VariableInfo(
051                            "company", Company.class.getName(), true, VariableInfo.AT_END),
052                    new VariableInfo(
053                            "account", Account.class.getName(), true, VariableInfo.AT_END),
054                    new VariableInfo(
055                            "user", User.class.getName(), true, VariableInfo.AT_END),
056                    new VariableInfo(
057                            "realUser", User.class.getName(), true, VariableInfo.AT_END),
058                    new VariableInfo(
059                            "contact", Contact.class.getName(), true, VariableInfo.AT_END),
060                    new VariableInfo(
061                            "layout", Layout.class.getName(), true, VariableInfo.AT_END),
062                    new VariableInfo(
063                            "layouts", List.class.getName(), true, VariableInfo.AT_END),
064                    new VariableInfo(
065                            "plid", Long.class.getName(), true, VariableInfo.AT_END),
066                    new VariableInfo(
067                            "layoutTypePortlet", LayoutTypePortlet.class.getName(), true,
068                            VariableInfo.AT_END),
069                    new VariableInfo(
070                            "scopeGroupId", Long.class.getName(), true, VariableInfo.AT_END),
071                    new VariableInfo(
072                            "permissionChecker", PermissionChecker.class.getName(), true,
073                            VariableInfo.AT_END),
074                    new VariableInfo(
075                            "locale", Locale.class.getName(), true, VariableInfo.AT_END),
076                    new VariableInfo(
077                            "timeZone", TimeZone.class.getName(), true, VariableInfo.AT_END),
078                    new VariableInfo(
079                            "theme", Theme.class.getName(), true, VariableInfo.AT_END),
080                    new VariableInfo(
081                            "colorScheme", ColorScheme.class.getName(), true,
082                            VariableInfo.AT_END),
083                    new VariableInfo(
084                            "portletDisplay", PortletDisplay.class.getName(), true,
085                            VariableInfo.AT_END),
086    
087                    // Deprecated
088    
089                    new VariableInfo(
090                            "portletGroupId", Long.class.getName(), true, VariableInfo.AT_END)
091            };
092    
093    }