return new Scanner(url).useDelimiter("\\A").next();
}
private String doImport(TCMURI tcmUri, TransformContext context) {
if (tcmUri.getItemType() == 16) {
ComponentPresentationAssembler assembler = new ComponentPresentationAssembler(tcmUri.getPublicationId());
int ctId = Utils.getItemId(componentTemplate);
if (ctId < 0) {
ctId = getComponentTemplateId(tcmUri);
}
return ctId > 0 ? assembler.getContent(tcmUri.getItemId(), ctId) : "";
} else if (tcmUri.getItemType() == 64) {
PageContentAssembler assembler = new PageContentAssembler();
return assembler.getContent(tcmUri.toString(), getParameterMap(context));
}
log.error("Only Component or Page TCMURI URLs accepted, but found " + tcmUri);
return "";
}