net.sourceforge.jfacets.impl
Class FacetDescriptorManager

java.lang.Object
  extended by net.sourceforge.jfacets.impl.FacetDescriptorManager
All Implemented Interfaces:
IFacetDescriptorManager

public class FacetDescriptorManager
extends java.lang.Object
implements IFacetDescriptorManager

The FacetDescriptorManager : handles loading of descriptors from an XML resource, and provides access to them.

Author:
Remi VANKEISBELCK - rvkb.com (remi 'at' rvkb.com)

Constructor Summary
FacetDescriptorManager(java.lang.String facetsFilePath)
          Creates the manager and loads descriptors.
 
Method Summary
 FacetDescriptor getDescriptor(java.lang.String name, java.lang.String profileId, java.lang.Class targetObjectType)
          returns the descriptor for passed parameters, null if not found.
 FacetDescriptor[] getDescriptors()
          returns an array of all loaded descriptors
protected  int loadDescriptors()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacetDescriptorManager

public FacetDescriptorManager(java.lang.String facetsFilePath)
                       throws java.io.IOException,
                              javax.xml.parsers.ParserConfigurationException,
                              org.xml.sax.SAXException,
                              javax.xml.parsers.FactoryConfigurationError
Creates the manager and loads descriptors.

Parameters:
facetsFilePath - The path of the facets XML descriptor to be used (CLASSPATH resource)
Throws:
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
javax.xml.parsers.FactoryConfigurationError
Method Detail

loadDescriptors

protected int loadDescriptors()
                       throws java.io.IOException,
                              javax.xml.parsers.ParserConfigurationException,
                              org.xml.sax.SAXException,
                              javax.xml.parsers.FactoryConfigurationError
Throws:
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
javax.xml.parsers.FactoryConfigurationError

getDescriptors

public FacetDescriptor[] getDescriptors()
returns an array of all loaded descriptors

Specified by:
getDescriptors in interface IFacetDescriptorManager

getDescriptor

public FacetDescriptor getDescriptor(java.lang.String name,
                                     java.lang.String profileId,
                                     java.lang.Class targetObjectType)
returns the descriptor for passed parameters, null if not found. strict match : does not handle inheritance

Specified by:
getDescriptor in interface IFacetDescriptorManager


Copyright © 2011. All Rights Reserved.