org.apache.shale.tiger.config
Class FacesConfigParser

java.lang.Object
  extended by org.apache.shale.tiger.config.FacesConfigParser

public class FacesConfigParser
extends Object

Parser utility for processing faces-config.xml resources. Information parsed by each call to the parse() method is merged with any previous information stored in the specified FacesConfigConfig bean.

To use this utility, instantiate a new instance and set the facesConfig, resource, and validating properties. Then, call the parse() method. You can parse more than one resource by resetting the resource property and calling parse() again.


Constructor Summary
FacesConfigParser()
           
 
Method Summary
 FacesConfigConfig getFacesConfig()
          Return the FacesConfigConfig bean summarizing all of the configuration metadata from resources that have been parsed so far.
 URL getResource()
          Return the URL of the configuration resource to be parsed.
 boolean isValidating()
          Return the validating parse flag.
 void parse()
          Parse the configuration resource specified by the resource property, storing resulting information in the configuration bean specified by the facesConfig property.
 void setFacesConfig(FacesConfigConfig facesConfig)
          Set the FacesConfigConfig bean that will summarize all of the configuration metadata from parsed resources.
 void setResource(URL resource)
          Set the URL of the configuration resource to be parsed.
 void setValidating(boolean validating)
          Set the validating parse flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacesConfigParser

public FacesConfigParser()
Method Detail

getFacesConfig

public FacesConfigConfig getFacesConfig()

Return the FacesConfigConfig bean summarizing all of the configuration metadata from resources that have been parsed so far.


setFacesConfig

public void setFacesConfig(FacesConfigConfig facesConfig)

Set the FacesConfigConfig bean that will summarize all of the configuration metadata from parsed resources.

Parameters:
facesConfig - New FacesConfigConfig instance to be populated

getResource

public URL getResource()

Return the URL of the configuration resource to be parsed.


setResource

public void setResource(URL resource)

Set the URL of the configuration resource to be parsed.

Parameters:
resource - The new configuration resource URL

isValidating

public boolean isValidating()

Return the validating parse flag.


setValidating

public void setValidating(boolean validating)

Set the validating parse flag.

Parameters:
validating - The new validating parse flag

parse

public void parse()
           throws IOException,
                  SAXException

Parse the configuration resource specified by the resource property, storing resulting information in the configuration bean specified by the facesConfig property.

Throws:
IOException - if an input/output error occurs
SAXException - if an XML parsing error occurs


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.