1 23 24 package com.sun.enterprise.config.serverbeans.validation; 25 26 import java.util.Stack ; 27 import org.xml.sax.Attributes ; 28 import org.xml.sax.ContentHandler ; 29 import org.xml.sax.ContentHandler ; 30 import org.xml.sax.Locator ; 31 import org.xml.sax.SAXException ; 32 import org.xml.sax.XMLFilter ; 33 import org.xml.sax.helpers.DefaultHandler ; 34 import org.xml.sax.helpers.XMLFilterImpl ; 35 36 37 38 70 71 public class FrameHolderBuilder extends Framer 76 { 77 protected final Frame getClusterFrame(Attributes atts){ 78 final Frame f = super.getClusterFrame(atts); 79 inheritFromConfigPerhaps(f, atts); 80 return f; 85 } 86 87 protected final void handleStartServerRefEvent(Attributes atts){ 88 final String sr = atts.getValue(NAMESPACE, NAME); 89 if (sr != null){ 90 frameHolder.getServerFrame(sr).inheritFrom(currentFrame()); 91 } 92 } 93 94 protected final Frame getConfigFrame(Attributes atts){ 95 final Frame f = super.getConfigFrame(atts); 96 f.inheritFrom(frameHolder.getDomainFrame()); 97 return f; 98 } 99 100 protected final Frame getServerFrame(Attributes atts){ 101 final Frame f = super.getServerFrame(atts); 102 return inheritFromConfigPerhaps(f, atts); 103 } 104 105 private final Frame inheritFromConfigPerhaps(Frame f, Attributes atts){ 106 final String cr = atts.getValue(NAMESPACE, CONFIG_REF); 107 if (cr != null){ 108 f.inheritFrom(frameHolder.getConfigFrame(cr)); 109 } 110 return f; 111 } 112 113 } 114 115 116 117 | Popular Tags |