FileDocCategorySizeDatePackage
ServerValidationHandler.javaAPI DocGlassfish v2 API4768Wed May 23 21:12:46 BST 2007com.sun.enterprise.config.serverbeans

ServerValidationHandler

public class ServerValidationHandler extends DefaultHandler

Fields Summary
public static final String
SERVER_DTD_PUBLIC_ID
private static final String
SERVER_DTD_PUBLIC_ID_PATH
public static final String
SERVER_DTD_SYSTEM_ID
Constructors Summary
Methods Summary
public voiderror(org.xml.sax.SAXParseException e)

    
    //===========================================================
    // SAX ErrorHandler methods
    //===========================================================

    // treat validation errors as fatal
       
     
    
        /*
    _logger.log(Level.SEVERE,"config.errorhandler_msg",new Object[]{"" + e.getLineNumber(),
                                                                        "" + e.getColumnNumber(),
                                                                        "" + e.getSystemId(), 
                                                                        "" + e.getPublicId()});
    _logger.log(Level.SEVERE,"   " + e.getMessage());
         */
        throw e;
    
public voidfatalError(org.xml.sax.SAXParseException e)

        /*
    _logger.log(Level.SEVERE,"config.errorhandler_msg",new Object[]{"" + e.getLineNumber(),
                                                                        "" + e.getColumnNumber(),
                                                                        "" + e.getSystemId(), 
                                                                        "" + e.getPublicId()});
    _logger.log(Level.SEVERE, e.toString());
         */
        throw e;
    
public org.xml.sax.InputSourceresolveEntity(java.lang.String publicID, java.lang.String systemID)

        InputSource is = null;
        try {
            InputStream i = this.getClass().getResourceAsStream( SERVER_DTD_PUBLIC_ID_PATH );
            if( i!= null ) {
                is = new InputSource(i);
                return is;
            }

            
            is =  new InputSource(
               new FileInputStream(
               new File(new java.net.URI(
                   RelativePathResolver.resolvePath(systemID)))));
        } catch(Exception e) {
            throw new SAXException("cannot resolve dtd", e);
        }
        return is;
    
public voidwarning(org.xml.sax.SAXParseException e)

        /*
    _logger.log(Level.WARNING,"config.errorhandler_msg",new Object[]{"" + e.getLineNumber(),
                                                                        "" + e.getColumnNumber(),
                                                                        "" + e.getSystemId(), 
                                                                        "" + e.getPublicId()});
    _logger.log(Level.WARNING,"   " + e.getMessage());
         */
        //FIXME