com.sun.faces.config
private static class ConfigManager.ParseTask extends java.lang.Object implements java.util.concurrent.Callable<DocumentInfo>
This Callable
will be used by ConfigManager.getConfigDocuments(javax.servlet.ServletContext, java.util.List, java.util.concurrent.ExecutorService, boolean)
.
It represents a single configuration resource to be parsed into a DOM.
Modifier and Type | Field and Description |
---|---|
private java.net.URI |
documentURI |
private static java.lang.String |
EMPTY_FACES_CONFIG |
private javax.xml.parsers.DocumentBuilderFactory |
factory |
private static java.lang.String |
JAVAEE_SCHEMA_DEFAULT_NS |
private boolean |
validating |
Constructor and Description |
---|
ConfigManager.ParseTask(boolean validating,
java.net.URI documentURI)
Constructs a new ParseTask instance
|
Modifier and Type | Method and Description |
---|---|
DocumentInfo |
call() |
private javax.xml.parsers.DocumentBuilder |
getBuilderForSchema(DbfFactory.FacesSchema schema) |
private org.w3c.dom.Document |
getDocument() |
private static java.io.InputStream |
getInputStream(java.net.URL url) |
private javax.xml.parsers.DocumentBuilder |
getNonValidatingBuilder() |
private static javax.xml.transform.Transformer |
getTransformer(java.lang.String documentNS)
Obtain a
Transformer using the style sheet
referenced by the XSL constant. |
private boolean |
streamIsZeroLengthOrEmpty(java.io.InputStream is) |
private static final java.lang.String JAVAEE_SCHEMA_DEFAULT_NS
private static final java.lang.String EMPTY_FACES_CONFIG
private java.net.URI documentURI
private javax.xml.parsers.DocumentBuilderFactory factory
private boolean validating
public ConfigManager.ParseTask(boolean validating, java.net.URI documentURI) throws java.lang.Exception
Constructs a new ParseTask instance
validating
- whether or not we're validatingdocumentURI
- a URL to the configuration resource to be parsedjava.lang.Exception
- general errorpublic DocumentInfo call() throws java.lang.Exception
call
in interface java.util.concurrent.Callable<DocumentInfo>
java.lang.Exception
- if an error occurs during the parsing processprivate org.w3c.dom.Document getDocument() throws java.lang.Exception
Document
based on documentURI
.java.lang.Exception
- if an error occurs during the process of building a
Document
private boolean streamIsZeroLengthOrEmpty(java.io.InputStream is) throws java.io.IOException
java.io.IOException
private static javax.xml.transform.Transformer getTransformer(java.lang.String documentNS) throws java.lang.Exception
Transformer
using the style sheet
referenced by the XSL
constant.java.lang.Exception
- if a Tranformer instance could not be createdprivate static java.io.InputStream getInputStream(java.net.URL url) throws java.io.IOException
url
- source URL
InputStream
to the resource referred to by
url
java.io.IOException
- if an error occursprivate javax.xml.parsers.DocumentBuilder getNonValidatingBuilder() throws java.lang.Exception
java.lang.Exception
private javax.xml.parsers.DocumentBuilder getBuilderForSchema(DbfFactory.FacesSchema schema) throws java.lang.Exception
java.lang.Exception
Copyright © 2002-2010 Oracle America, Inc. All Rights Reserved.