use of org.asqatasun.contentadapter.util.LocalRsrc in project Asqatasun by Asqatasun.
the class CSSJsoupPhlocContentAdapterImpl method adaptLocaleCSS.
/**
* Retrieve css content and adapt it for each locale resource
*/
private void adaptLocaleCSS() {
Set<Long> relatedCssIdSet = new HashSet<>();
for (Element el : localeCssElements) {
Resource cssResource;
String rawCss = el.data();
if (!StringUtils.isBlank(rawCss)) {
cssResource = new CSSResourceImpl(rawCss, 0, new LocalRsrc());
StylesheetContent cssContent = getStylesheetFromLocaleResource(cssResource.getResource());
adaptContent(cssContent, cssResource, getCurrentResourcePath(el.baseUri()), getListOfMediaFromAttributeValue(el));
relatedCssIdSet.add(getContentDataService().saveOrUpdate(cssContent).getId());
}
}
getContentDataService().saveContentRelationShip(getSSP(), relatedCssIdSet);
}
Aggregations