edu.nrao.sss.webapp.faces.conf
Class SelectorConfiguration

java.lang.Object
  extended by edu.nrao.sss.webapp.faces.conf.SelectorConfiguration

public class SelectorConfiguration
extends Object


Nested Class Summary
static class SelectorConfiguration.Region
           
static class SelectorConfiguration.RegionMap
           
 
Constructor Summary
SelectorConfiguration()
          creates a new empty SelectorConfiguration
 
Method Summary
static SelectorConfiguration fromXml(Reader reader)
          Creates a new SelectorConfiguration based on the XML data read from reader.
static SelectorConfiguration fromXml(String xmlFile)
          creates a SelectorConfiguration from the xml file specified with xmlFile.
 SelectorConfiguration.RegionMap getRegionMap(String name)
           
 List<SelectorConfiguration.RegionMap> getRegionMaps()
           
static void main(String[] a)
          quick xml to/from test
 void setRegionMaps(List<SelectorConfiguration.RegionMap> maps)
          set our list of available RegionMaps.
 String toXml()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectorConfiguration

public SelectorConfiguration()
creates a new empty SelectorConfiguration

Method Detail

getRegionMaps

public List<SelectorConfiguration.RegionMap> getRegionMaps()
Returns:
our list of available RegionMaps. This should never return null.

setRegionMaps

public void setRegionMaps(List<SelectorConfiguration.RegionMap> maps)
set our list of available RegionMaps. if maps is null, an empty List is saved instead.


getRegionMap

public SelectorConfiguration.RegionMap getRegionMap(String name)
Returns:
RegionMap with matching name. null if none found.

fromXml

public static SelectorConfiguration fromXml(String xmlFile)
                                     throws JAXBException,
                                            XMLStreamException,
                                            FileNotFoundException
creates a SelectorConfiguration from the xml file specified with xmlFile.

Throws:
JAXBException
XMLStreamException
FileNotFoundException

fromXml

public static SelectorConfiguration fromXml(Reader reader)
                                     throws JAXBException,
                                            XMLStreamException
Creates a new SelectorConfiguration based on the XML data read from reader.

Parameters:
reader - the source of the XML data. If this value is null, null is returned.
Returns:
a new SelectorConfiguration based on the XML data read from reader.
Throws:
XMLStreamException - if the XML is not well-formed, or for some other "unexpected processing conditions".
JAXBException - if anything else goes wrong during the transformation.

toXml

public String toXml()
             throws JAXBException
Returns:
an xml representation of this configuration.
Throws:
JAXBException

main

public static void main(String[] a)
quick xml to/from test



Copyright © 2009. All Rights Reserved.