1 28 29 30 package com.opencms.template; 31 32 import org.opencms.file.CmsObject; 33 import org.opencms.file.CmsRequestContext; 34 import org.opencms.main.CmsException; 35 36 import com.opencms.template.cache.A_CmsElement; 37 38 import java.util.Hashtable ; 39 40 47 public class CmsJavascriptTemplate extends A_CmsTemplate implements I_CmsJavascriptTemplate { 48 49 67 public byte[] getContent(CmsObject cms, String templateFile, String elementName, Hashtable parameters) throws CmsException { 68 return "".getBytes(); 69 } 70 71 84 public byte[] getContent(CmsObject cms, String templateFile, String elementName, Hashtable parameters, String templateSelector) throws CmsException { 85 return "".getBytes(); 86 } 87 88 101 public Object getKey(CmsObject cms, String templateFile, Hashtable parameters, String templateSelector) { 102 CmsRequestContext reqContext = cms.getRequestContext(); 103 return "" + reqContext.currentProject().getId() + ":" + reqContext.addSiteRoot(templateFile); 104 } 105 106 119 122 123 147 public boolean isStreamable(CmsObject cms, String templateFile, String elementName, Hashtable parameters, String templateSelector) { 148 return false; 149 } 150 154 public boolean isTemplateCacheSet() { 155 return true; 156 } 157 158 164 public void setTemplateCache(I_CmsTemplateCache c) { 165 } 167 168 178 public boolean shouldReload(CmsObject cms, String templateFile, String elementName, Hashtable parameters, String templateSelector) { 179 return true; 180 } 181 182 190 public A_CmsElement createElement(CmsObject cms, String templateFile, Hashtable parameters) { 191 return null; 193 } 194 } 195
| Popular Tags
|