- if (key.equals("to_comments")) {
- try {
- _entCache.put(key, getComments());
- return (TemplateModel)_entCache.get(key);
- } catch (Exception ex) {
- theLog.printWarning("-- getComments: could not fetch data " + ex.toString());
- throw new TemplateModelException(ex.toString());
- }
- }
- if (key.equals("to_media_images")) {
- try {
- _entCache.put(key, getImagesForContent());
- return (TemplateModel)_entCache.get(key);
- }
- catch (Exception ex) {
- theLog.printWarning("-- getImagesForContent: could not fetch data " + ex.toString());
- throw new TemplateModelException(ex.toString());
- }
- }
- if (key.equals("to_media_audio")) {
- try {
- _entCache.put(key, getAudioForContent());
- return (TemplateModel)_entCache.get(key);
- }
- catch (Exception ex) {
- theLog.printWarning("-- getAudioForContent: could not fetch data " + ex.toString());
- throw new TemplateModelException(ex.toString());
- }
- }
- if (key.equals("to_media_video")) {
- try {
- _entCache.put(key, getVideoForContent());
- return (TemplateModel)_entCache.get(key);
- }
- catch (Exception ex) {
- theLog.printWarning("-- getVideoForContent: could not fetch data " + ex.toString());
- throw new TemplateModelException(ex.toString());
- }
- }
- if (key.equals("to_media_other")) {
- try {
- _entCache.put(key, getOtherMediaForContent());
- return (TemplateModel)_entCache.get(key);
- }
- catch (Exception ex) {
- theLog.printWarning("-- getOtherMediaForContent: could not fetch data " + ex.toString());
- throw new TemplateModelException(ex.toString());
- }
- }
- else if (key.equals("to_media_icon")) {
- try {
- _entCache.put(key, getUploadedMediaForNewswire());
- return (TemplateModel)_entCache.get(key);
- }
- catch (Exception ex) {
- theLog.printWarning("-- getUploadedMediaForNewswire: could not fetch data " + ex.toString());
- throw new TemplateModelException(ex.toString());
- }
- }
- else if (key.equals("to_topics")) {
- try {
- _entCache.put(key,
- DatabaseContentToTopics.getInstance().getTopics(this));
- return (TemplateModel)_entCache.get(key);
- }
- catch (Exception ex) {
- theLog.printWarning("-- getTopics: could not fetch data " + ex.toString());
- throw new TemplateModelException(ex.toString());
- }
- }
- else {
- return new SimpleScalar(getValue(key));