org.apache.myfaces.test.config
Class ConfigParser

java.lang.Object
  extended by org.apache.myfaces.test.config.ConfigParser

public class ConfigParser
extends Object

Utility class to parse JavaServer Faces configuration resources, and register JSF artifacts with the mock object hierarchy.

The following artifacts are registered:

Note that any declared factory instances are explicitly NOT registered, allowing the mock object hierarchy of the Myfaces Test Framework to manage these APIs.

USAGE NOTE - If you are using an instance of this class within a subclass of AbstractJsfTestCase or AbstractJmockJsfTestCase, be sure you have completed the setUp() processing in this base class before calling one of the parse() methods.

Since:
1.0.0

Constructor Summary
ConfigParser()
          Creates a new instance of ConfigParser
 
Method Summary
 URL[] getPlatformURLs()
          Return the URLs of the platform configuration resources for this application.
 void parse(URL url)
          Parse the specified JavaServer Faces configuration resource, causing the appropriate JSF artifacts to be registered with the mock object hierarchy.
 void parse(URL[] urls)
          Parse the specified set of JavaServer Faces configuration resources, in the listed order, causing the appropriate JSF artifacts to be registered with the mock object hierarchy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigParser

public ConfigParser()
Creates a new instance of ConfigParser

Method Detail

getPlatformURLs

public URL[] getPlatformURLs()

Return the URLs of the platform configuration resources for this application. The following platforms are currently supported:

If MyFaces (version 1.2), currently under development, does not change the name of the configuration resource, it will be supported as well.


parse

public void parse(URL url)
           throws IOException,
                  SAXException

Parse the specified JavaServer Faces configuration resource, causing the appropriate JSF artifacts to be registered with the mock object hierarchy.

Parameters:
url - URL of the configuration resource to parse
Throws:
IOException - if an input/output error occurs
SAXException - if a parsing error occurs

parse

public void parse(URL[] urls)
           throws IOException,
                  SAXException

Parse the specified set of JavaServer Faces configuration resources, in the listed order, causing the appropriate JSF artifacts to be registered with the mock object hierarchy.

Parameters:
urls - URLs of the configuration resources to parse
Throws:
IOException - if an input/output error occurs
SAXException - if a parsing error occurs


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.