All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.liferay.bookmarks.internal.security.permission.resource.BookmarksPortletResourcePermissionWrapper 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.bookmarks.internal.security.permission.resource;

import com.liferay.bookmarks.constants.BookmarksConstants;
import com.liferay.bookmarks.constants.BookmarksPortletKeys;
import com.liferay.exportimport.kernel.staging.permission.StagingPermission;
import com.liferay.portal.kernel.security.permission.resource.BasePortletResourcePermissionWrapper;
import com.liferay.portal.kernel.security.permission.resource.PortletResourcePermission;
import com.liferay.portal.kernel.security.permission.resource.PortletResourcePermissionFactory;
import com.liferay.portal.kernel.security.permission.resource.StagedPortletPermissionLogic;

import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;

/**
 * @author Preston Crary
 */
@Component(
	property = "resource.name=" + BookmarksConstants.RESOURCE_NAME,
	service = PortletResourcePermission.class
)
public class BookmarksPortletResourcePermissionWrapper
	extends BasePortletResourcePermissionWrapper {

	@Override
	protected PortletResourcePermission doGetPortletResourcePermission() {
		return PortletResourcePermissionFactory.create(
			BookmarksConstants.RESOURCE_NAME,
			new StagedPortletPermissionLogic(
				_stagingPermission, BookmarksPortletKeys.BOOKMARKS_ADMIN));
	}

	@Reference
	private StagingPermission _stagingPermission;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy