@Override
public ComponentPresentationResultItem<String> getDynamicComponentPresentationItem(int componentId, int
templateId, int publicationId) throws ItemNotFoundException, SerializationException {
ComponentPresentation result = getComponentPresentation(componentId, templateId, publicationId);
String resultString;
ComponentPresentationResultItemImpl resultModel;
if (result != null) {
resultModel = new ComponentPresentationResultItemImpl(result.getPublicationId(), result.getComponentId(),
result.getComponentTemplateId());
assertQueryResultNotNull(result, componentId, templateId, publicationId);
resultString = result.getContent();
if (!StringUtils.isEmpty(resultString)) {
resultModel.setContentSource(decodeAndDecompressContent(resultString));
} else {
resultModel.setContentSource(resultString);
}
} else {
resultModel = new ComponentPresentationResultItemImpl(0, 0, 0);
}
return resultModel;
}