001 /* 002 * Created on Jan 20, 2005 003 * 004 * To change the template for this generated file go to 005 * Window>Preferences>Java>Code Generation>Code and Comments 006 */ 007 package railo.runtime.cfx.customtag; 008 009 import railo.runtime.cfx.CFXTagException; 010 011 import com.allaire.cfx.CustomTag; 012 013 /** 014 * 015 * 016 * To change the template for this generated type comment go to 017 * Window>Preferences>Java>Code Generation>Code and Comments 018 */ 019 public final class CPPCFXTagClass implements CFXTagClass { 020 021 private String name; 022 private boolean readonly=false; 023 private String serverLibrary; 024 private String procedure; 025 private boolean keepAlive; 026 027 /** 028 * @param name 029 * @param readonly 030 * @param serverLibrary 031 * @param procedure 032 * @param keepAlive 033 */ 034 private CPPCFXTagClass(String name, boolean readonly, String serverLibrary, 035 String procedure, boolean keepAlive) { 036 super(); 037 this.name = name; 038 this.readonly = readonly; 039 this.serverLibrary = serverLibrary; 040 this.procedure = procedure; 041 this.keepAlive = keepAlive; 042 } 043 044 public CPPCFXTagClass(String name, String serverLibrary, String procedure, boolean keepAlive) { 045 if(name.startsWith("cfx_"))name=name.substring(4); 046 this.name=name; 047 this.serverLibrary=serverLibrary; 048 this.procedure=procedure; 049 this.keepAlive=keepAlive; 050 } 051 052 /** 053 * @return the serverLibrary 054 */ 055 public String getServerLibrary() { 056 return serverLibrary; 057 } 058 059 /** 060 * @return the procedure 061 */ 062 public String getProcedure() { 063 return procedure; 064 } 065 066 /** 067 * @see railo.runtime.cfx.customtag.CFXTagClass#newInstance() 068 */ 069 public CustomTag newInstance() throws CFXTagException { 070 return new CPPCustomTag(serverLibrary,procedure,keepAlive); 071 072 } 073 074 /** 075 * @see railo.runtime.cfx.customtag.CFXTagClass#isReadOnly() 076 */ 077 public boolean isReadOnly() { 078 return readonly; 079 } 080 081 /** 082 * @see railo.runtime.cfx.customtag.CFXTagClass#cloneReadOnly() 083 */ 084 public CFXTagClass cloneReadOnly() { 085 return new CPPCFXTagClass(name,true,serverLibrary,procedure,keepAlive); 086 } 087 088 /** 089 * @see railo.runtime.cfx.customtag.CFXTagClass#getDisplayType() 090 */ 091 public String getDisplayType() { 092 return "cpp"; 093 } 094 095 /** 096 * @see railo.runtime.cfx.customtag.CFXTagClass#getSourceName() 097 */ 098 public String getSourceName() { 099 return serverLibrary; 100 } 101 102 /** 103 * @see railo.runtime.cfx.customtag.CFXTagClass#isValid() 104 */ 105 public boolean isValid() { 106 return false; 107 } 108 109 /** 110 * @return the name 111 */ 112 public String getName() { 113 return name; 114 } 115 116 /** 117 * @return the keepAlive 118 */ 119 public boolean getKeepAlive() { 120 return keepAlive; 121 } 122 123 }