001 package railo.runtime.tag; 002 003 import railo.runtime.Mapping; 004 import railo.runtime.PageContext; 005 import railo.runtime.config.ConfigWebImpl; 006 import railo.runtime.customtag.InitFile; 007 import railo.runtime.exp.PageException; 008 009 public class CFTagCore extends CFTag { 010 011 private String name; 012 private String filename; 013 private boolean isweb; 014 015 016 /** 017 * @return the name 018 */ 019 public String getName() { 020 return name; 021 } 022 /** 023 * @return the filename 024 */ 025 public String getFilename() { 026 return filename; 027 } 028 029 030 public void set__name(String name){ 031 this.name=name; 032 } 033 public void set__filename(String filename){ 034 this.filename=filename; 035 } 036 public void set__isweb(boolean isweb){ 037 this.isweb=isweb; 038 } 039 public InitFile initFile(PageContext pageContext) throws PageException { 040 return createInitFile(pageContext,isweb,filename); 041 042 } 043 044 public static InitFile createInitFile(PageContext pageContext,boolean isweb,String filename) throws PageException { 045 ConfigWebImpl config = (ConfigWebImpl) pageContext.getConfig(); 046 Mapping mapping=isweb?config.getTagMapping():config.getServerTagMapping(); 047 048 return new InitFile( 049 mapping.getPageSource(filename), 050 filename, 051 filename.endsWith('.'+config.getCFCExtension())); 052 053 } 054 055 /* * 056 * @see railo.runtime.tag.CFTag#doEndTag() 057 * / 058 public int doEndTag() { 059 PageContextImpl pci=(PageContextImpl) pageContext; 060 boolean old=pci.useSpecialMappings(true); 061 try{ 062 return super.doEndTag(); 063 } 064 finally{ 065 pci.useSpecialMappings(old); 066 } 067 }*/ 068 /* * 069 * @see railo.runtime.tag.CFTag#doStartTag() 070 * / 071 public int doStartTag() throws PageException { 072 PageContextImpl pci=(PageContextImpl) pageContext; 073 boolean old=pci.useSpecialMappings(true); 074 try{ 075 return super.doStartTag(); 076 } 077 finally{ 078 pci.useSpecialMappings(old); 079 } 080 }*/ 081 }