com.liferay.fragment.web.internal.display.context.FragmentCollectionsManagementToolbarDisplayContext 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.fragment.web.internal.display.context;
import com.liferay.frontend.taglib.clay.servlet.taglib.display.context.SearchContainerManagementToolbarDisplayContext;
import com.liferay.petra.string.StringPool;
import com.liferay.portal.kernel.portlet.LiferayPortletRequest;
import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
import com.liferay.portal.kernel.portlet.url.builder.PortletURLBuilder;
import javax.servlet.http.HttpServletRequest;
/**
* @author Eudaldo Alonso
*/
public class FragmentCollectionsManagementToolbarDisplayContext
extends SearchContainerManagementToolbarDisplayContext {
public FragmentCollectionsManagementToolbarDisplayContext(
HttpServletRequest httpServletRequest,
LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse,
FragmentCollectionsDisplayContext fragmentCollectionsDisplayContext) {
super(
httpServletRequest, liferayPortletRequest, liferayPortletResponse,
fragmentCollectionsDisplayContext.getSearchContainer());
}
@Override
public String getClearResultsURL() {
return PortletURLBuilder.create(
getPortletURL()
).setKeywords(
StringPool.BLANK
).buildString();
}
@Override
public String getSearchContainerId() {
return "fragmentCollections";
}
@Override
protected String[] getOrderByKeys() {
return new String[] {"name", "create-date"};
}
}