TCMURI tcmUri = new TCMURI(componentTcmUris[0]);
int publicationId = tcmUri.getPublicationId();
String templateTcmUri = getTemplateTcmUri(publicationId);
ComponentPresentationFactory factory = new ComponentPresentationFactory(publicationId);
ComponentPresentation componentPresentation;
for (String componentTcmUri : componentTcmUris) {
if (templateTcmUri == null) {
componentPresentation = factory.getComponentPresentationWithHighestPriority(componentTcmUri);
} else {