contentInfo.setContentDefaultImageUrl(imageUrl);
}
Vector<String> contentImages = new Vector<String>();
Iterator<?> iterator = contentLanguageDefault.getImages().iterator();
while (iterator.hasNext()) {
ContentImage image = (ContentImage) iterator.next();
String imageUrl = imageUrlPrefix +
"?type=C" +
"&imageId=" + image.getImageId();
contentImages.add(imageUrl);
}
contentInfo.setContentImageUrls(contentImages);
if (!contentBean.getContentSessionBean().isSiteProfileClassDefault()) {
ContentLanguage contentLanguage = null;
for (ContentLanguage language : content.getContentLanguages()) {
if (language.getSiteProfileClass().getSiteProfileClassId().equals(siteProfile.getSiteProfileClass().getSiteProfileClassId())) {
contentLanguage = language;
break;
}
}
if (contentLanguage != null) {
if (contentLanguage.getContentTitle() != null) {
contentInfo.setContentTitle(contentLanguage.getContentTitle());
}
if (contentLanguage.getContentShortDesc() != null) {
contentInfo.setContentShortDesc(contentLanguage.getContentShortDesc());
}
if (contentLanguage.getContentDesc() != null) {
contentInfo.setContentDesc(contentLanguage.getContentDesc());
}
if (Format.isNullOrEmpty(contentLanguageDefault.getPageTitle())) {
if (contentLanguage.getContentTitle() != null) {
contentInfo.setPageTitle(contentLanguage.getContentTitle());
}
}
else {
if (contentLanguage.getPageTitle() != null) {
contentInfo.setPageTitle(contentLanguage.getPageTitle());
}
}
if (Format.isNullOrEmpty(contentLanguageDefault.getMetaKeywords())) {
if (contentLanguage.getContentTitle() != null) {
contentInfo.setMetaKeywords(contentLanguage.getContentTitle());
}
}
else {
if (contentLanguage.getMetaKeywords() != null) {
contentInfo.setMetaKeywords(contentLanguage.getMetaKeywords());
}
}
if (Format.isNullOrEmpty(contentLanguageDefault.getMetaDescription())) {
if (contentLanguage.getContentTitle() != null) {
contentInfo.setMetaDescription(contentLanguage.getContentTitle());
}
}
else {
if (contentLanguage.getMetaKeywords() != null) {
contentInfo.setMetaDescription(contentLanguage.getMetaDescription());
}
}
if (contentLanguage.getContentImageOverride().equals(String.valueOf(Constants.VALUE_YES))) {
if (contentLanguage.getContentImageOverride().equals(String.valueOf(Constants.VALUE_YES))) {
String url = null;
contentInfo.setContentDefaultImageUrl(null);
if (contentLanguage.getImage() != null) {
url = "?type=C&" +
"&imageId=" + contentLanguage.getImage().getImageId();
contentInfo.setContentDefaultImageUrl(imageUrlPrefix + url);
}
contentImages = new Vector<String>();
Iterator<?> images = contentLanguage.getImages().iterator();
while (images.hasNext()) {
ContentImage image = (ContentImage) images.next();
url = "?type=C" +
"&imageId=" + image.getImageId();
contentImages.add(imageUrlPrefix + url);
}
contentInfo.setContentImageUrls(contentImages);
}
}