com.liferay.segments.web.internal.portlet.SegmentsPortlet Maven / Gradle / Ivy
The newest version!
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
package com.liferay.segments.web.internal.portlet;
import com.liferay.analytics.settings.rest.manager.AnalyticsSettingsManager;
import com.liferay.item.selector.ItemSelector;
import com.liferay.portal.kernel.language.Language;
import com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet;
import com.liferay.portal.kernel.service.GroupLocalService;
import com.liferay.portal.kernel.util.Portal;
import com.liferay.roles.admin.role.type.contributor.provider.RoleTypeContributorProvider;
import com.liferay.segments.configuration.provider.SegmentsConfigurationProvider;
import com.liferay.segments.constants.SegmentsPortletKeys;
import com.liferay.segments.service.SegmentsEntryService;
import com.liferay.segments.web.internal.display.context.SegmentsDisplayContext;
import java.io.IOException;
import javax.portlet.Portlet;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
/**
* @author Eduardo García
*/
@Component(
property = {
"com.liferay.portlet.add-default-resource=true",
"com.liferay.portlet.css-class-wrapper=portlet-segments",
"com.liferay.portlet.display-category=category.hidden",
"com.liferay.portlet.header-portlet-css=/css/main.css",
"com.liferay.portlet.layout-cacheable=true",
"com.liferay.portlet.preferences-owned-by-group=true",
"com.liferay.portlet.preferences-unique-per-layout=false",
"com.liferay.portlet.private-request-attributes=false",
"com.liferay.portlet.private-session-attributes=false",
"com.liferay.portlet.render-weight=50",
"javax.portlet.display-name=Segments",
"javax.portlet.expiration-cache=0",
"javax.portlet.init-param.view-template=/view.jsp",
"javax.portlet.name=" + SegmentsPortletKeys.SEGMENTS,
"javax.portlet.resource-bundle=content.Language",
"javax.portlet.security-role-ref=power-user,user",
"javax.portlet.version=3.0"
},
service = Portlet.class
)
public class SegmentsPortlet extends MVCPortlet {
@Override
public void render(
RenderRequest renderRequest, RenderResponse renderResponse)
throws IOException, PortletException {
renderRequest.setAttribute(
SegmentsDisplayContext.class.getName(),
new SegmentsDisplayContext(
_analyticsSettingsManager, _groupLocalService, _itemSelector,
_language, _portal, renderRequest, renderResponse,
_roleTypeContributorProvider, _segmentsConfigurationProvider,
_segmentsEntryService));
super.render(renderRequest, renderResponse);
}
@Reference
private AnalyticsSettingsManager _analyticsSettingsManager;
@Reference
private GroupLocalService _groupLocalService;
@Reference
private ItemSelector _itemSelector;
@Reference
private Language _language;
@Reference
private Portal _portal;
@Reference
private RoleTypeContributorProvider _roleTypeContributorProvider;
@Reference
private SegmentsConfigurationProvider _segmentsConfigurationProvider;
@Reference
private SegmentsEntryService _segmentsEntryService;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy