1 16 17 package org.apache.catalina.storeconfig; 18 19 import java.io.PrintWriter ; 20 21 import org.apache.catalina.Lifecycle; 22 import org.apache.catalina.LifecycleListener; 23 import org.apache.catalina.connector.Connector; 24 import org.apache.commons.logging.Log; 25 import org.apache.commons.logging.LogFactory; 26 27 32 public class ConnectorSF extends StoreFactoryBase { 33 34 private static Log log = LogFactory.getLog(ConnectorSF.class); 35 36 44 public void storeChilds(PrintWriter aWriter, int indent, Object aConnector, 45 StoreDescription parentDesc) throws Exception { 46 47 if (aConnector instanceof Connector) { 48 Connector connector = (Connector) aConnector; 49 if (connector instanceof Lifecycle) { 51 LifecycleListener listeners[] = ((Lifecycle) connector) 52 .findLifecycleListeners(); 53 storeElementArray(aWriter, indent, listeners); 54 } 55 } 56 } 57 58 protected void printOpenTag(PrintWriter aWriter, int indent, Object bean, 59 StoreDescription aDesc) throws Exception { 60 aWriter.print("<"); 61 aWriter.print(aDesc.getTag()); 62 storeConnectorAttribtues(aWriter, indent, bean, aDesc); 63 aWriter.println(">"); 64 } 65 66 protected void storeConnectorAttribtues(PrintWriter aWriter, int indent, 67 Object bean, StoreDescription aDesc) throws Exception { 68 if (aDesc.isAttributes()) { 69 getStoreAppender().printAttributes(aWriter, indent, false, bean, 70 aDesc); 71 80 } 81 } 82 83 protected void printTag(PrintWriter aWriter, int indent, Object bean, 84 StoreDescription aDesc) throws Exception { 85 aWriter.print("<"); 86 aWriter.print(aDesc.getTag()); 87 storeConnectorAttribtues(aWriter, indent, bean, aDesc); 88 aWriter.println("/>"); 89 } 90 91 } | Popular Tags |