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.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            @Override
043            public VariableInfo[] getVariableInfo(TagData tagData) {
044                    return _variableInfo;
045            }
046    
047            private static VariableInfo[] _variableInfo = new VariableInfo[] {
048                    new VariableInfo(
049                            "themeDisplay", ThemeDisplay.class.getName(), true,
050                            VariableInfo.AT_END),
051                    new VariableInfo(
052                            "company", Company.class.getName(), true, VariableInfo.AT_END),
053                    new VariableInfo(
054                            "account", Account.class.getName(), true, VariableInfo.AT_END),
055                    new VariableInfo(
056                            "user", User.class.getName(), true, VariableInfo.AT_END),
057                    new VariableInfo(
058                            "realUser", User.class.getName(), true, VariableInfo.AT_END),
059                    new VariableInfo(
060                            "contact", Contact.class.getName(), true, VariableInfo.AT_END),
061                    new VariableInfo(
062                            "layout", Layout.class.getName(), true, VariableInfo.AT_END),
063                    new VariableInfo(
064                            "layouts", List.class.getName(), true, VariableInfo.AT_END),
065                    new VariableInfo(
066                            "plid", Long.class.getName(), true, VariableInfo.AT_END),
067                    new VariableInfo(
068                            "layoutTypePortlet", LayoutTypePortlet.class.getName(), true,
069                            VariableInfo.AT_END),
070                    new VariableInfo(
071                            "scopeGroupId", Long.class.getName(), true, VariableInfo.AT_END),
072                    new VariableInfo(
073                            "permissionChecker", PermissionChecker.class.getName(), true,
074                            VariableInfo.AT_END),
075                    new VariableInfo(
076                            "locale", Locale.class.getName(), true, VariableInfo.AT_END),
077                    new VariableInfo(
078                            "timeZone", TimeZone.class.getName(), true, VariableInfo.AT_END),
079                    new VariableInfo(
080                            "theme", Theme.class.getName(), true, VariableInfo.AT_END),
081                    new VariableInfo(
082                            "colorScheme", ColorScheme.class.getName(), true,
083                            VariableInfo.AT_END),
084                    new VariableInfo(
085                            "portletDisplay", PortletDisplay.class.getName(), true,
086                            VariableInfo.AT_END),
087    
088                    // Deprecated
089    
090                    new VariableInfo(
091                            "portletGroupId", Long.class.getName(), true, VariableInfo.AT_END)
092            };
093    
094    }