Example usage for com.liferay.portal.kernel.theme ThemeDisplay setPermissionChecker

List of usage examples for com.liferay.portal.kernel.theme ThemeDisplay setPermissionChecker

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.theme ThemeDisplay setPermissionChecker.

Prototype

public void setPermissionChecker(PermissionChecker permissionChecker) 

Source Link

Usage

From source file:com.liferay.blogs.portlet.test.PortletLayoutFinderTest.java

License:Open Source License

protected ThemeDisplay getThemeDisplay() throws Exception {
    ThemeDisplay themeDisplay = new ThemeDisplay();

    themeDisplay.setScopeGroupId(_group.getGroupId());

    PermissionChecker permissionChecker = PermissionCheckerFactoryUtil.create(TestPropsValues.getUser());

    themeDisplay.setPermissionChecker(permissionChecker);

    themeDisplay.setPlid(_assetLayout.getPlid());

    return themeDisplay;
}

From source file:com.liferay.calendar.util.test.CalendarUtilTest.java

License:Open Source License

protected ThemeDisplay createThemeDisplay() throws PortalException {
    ThemeDisplay themeDisplay = new ThemeDisplay();

    Company company = CompanyLocalServiceUtil.getCompany(_group.getCompanyId());

    themeDisplay.setCompany(company);//from   w  w w .j  ava  2  s  .com

    themeDisplay.setLocale(LocaleUtil.getDefault());

    themeDisplay.setScopeGroupId(_group.getGroupId());

    themeDisplay.setPermissionChecker(PermissionThreadLocal.getPermissionChecker());

    themeDisplay.setUser(_user);

    return themeDisplay;
}