use of com.adobe.cq.commerce.core.components.services.urls.CategoryUrlFormat in project aem-core-cif-components by adobe.
the class UrlProviderImpl method toCategoryUrl.
@Override
public String toCategoryUrl(SlingHttpServletRequest request, @Nullable Page page, CategoryUrlFormat.Params params) {
CategoryUrlFormat categoryUrlFormat = getCategoryUrlFormatFromContext(request, page);
if (page != null) {
String pageParam = getPageParam(page, categoryUrlFormat, params, specificPageStrategy::getSpecificPage);
if (!pageParam.equals(params.getPage())) {
params = new CategoryUrlFormat.Params(params);
params.setPage(pageParam);
}
}
return categoryUrlFormat.format(params);
}
use of com.adobe.cq.commerce.core.components.services.urls.CategoryUrlFormat in project aem-core-cif-components by adobe.
the class UrlProviderImpl method parseCategoryUrlFormatParameters.
@Override
public CategoryUrlFormat.Params parseCategoryUrlFormatParameters(SlingHttpServletRequest request) {
Page page = getCurrentPage(request);
CategoryUrlFormat categoryUrlFormat = getCategoryUrlFormatFromContext(request, page);
return categoryUrlFormat.parse(request.getRequestPathInfo(), request.getRequestParameterMap());
}
Aggregations