Example usage for com.liferay.portal.kernel.model Theme hasColorSchemes

List of usage examples for com.liferay.portal.kernel.model Theme hasColorSchemes

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.model Theme hasColorSchemes.

Prototype

public boolean hasColorSchemes();

Source Link

Usage

From source file:com.liferay.layout.admin.web.internal.portlet.action.ActionUtil.java

License:Open Source License

public String getColorSchemeId(long companyId, String themeId, String colorSchemeId) throws Exception {

    Theme theme = _themeLocalService.getTheme(companyId, themeId);

    if (!theme.hasColorSchemes()) {
        colorSchemeId = StringPool.BLANK;
    }/*w  w  w.ja va 2s  .com*/

    if (Validator.isNull(colorSchemeId)) {
        ColorScheme colorScheme = _themeLocalService.getColorScheme(companyId, themeId, colorSchemeId);

        colorSchemeId = colorScheme.getColorSchemeId();
    }

    return colorSchemeId;
}