public class XMLObjectConfigurationFactory extends Object implements ObjectConfigurationFactory
The Object Configuration must be unique as a user will set their own parameters on the object during its lifetime.
Constructor and Description |
---|
XMLObjectConfigurationFactory()
Creates a new XMLObjectConfigurationFactory object.
|
Modifier and Type | Method and Description |
---|---|
ObjectConfiguration |
getObjectConfiguration(String id,
Map params)
This function retrieves an ObjectConfiguration based on a specified identifier,
N.B.
|
boolean |
hasObjectConfiguration(String id)
Does this factory know about an ObjectConfiguration with the specified id
|
void |
loadObjectConfiguration(String xmlFile,
String id)
This procedure loads an xml file into a holder object which is then used to construct a real
object when the get function is called.
|
void |
loadObjectConfiguration(String xmlFile,
String id,
ClassLoader classLoader)
This procedure loads an xml file into a holder object which is then used to construct a real object when the get
function is called.
|
void |
loadObjectConfigurationFromElement(org.dom4j.Element element,
ObjectDescriptor od,
String id) |
void |
loadObjectConfigurationFromElement(org.dom4j.Element element,
ObjectDescriptor od,
String id,
ClassLoader classLoader) |
public XMLObjectConfigurationFactory()
public boolean hasObjectConfiguration(String id)
hasObjectConfiguration
in interface ObjectConfigurationFactory
id
- Identifier for the object configuration to retrieve.public ObjectConfiguration getObjectConfiguration(String id, Map params) throws ObjectConfigurationException
getObjectConfiguration
in interface ObjectConfigurationFactory
id
- Identifier for the object configuration to retrieve.ObjectConfigurationException
public void loadObjectConfiguration(String xmlFile, String id) throws ObjectConfigurationException
xmlFile
- the name of the resource on the classpath from which to load the config.id
- Identifier for the object configuration to retrieve.ObjectConfigurationException
- if something is really wrongpublic void loadObjectConfiguration(String xmlFile, String id, ClassLoader classLoader) throws ObjectConfigurationException
loadObjectConfiguration
in interface ObjectConfigurationFactory
xmlFile
- the name of the resource on the classpath from which to load the config.id
- Identifier for the object configuration to retrieve.classLoader
- ClassLoader to use to load ObjectDescriptor classes and the xml fileObjectConfigurationException
- if something is really wrongpublic void loadObjectConfigurationFromElement(org.dom4j.Element element, ObjectDescriptor od, String id)
public void loadObjectConfigurationFromElement(org.dom4j.Element element, ObjectDescriptor od, String id, ClassLoader classLoader)
loadObjectConfigurationFromElement
in interface ObjectConfigurationFactory
Copyright © 2002-2024 Atlassian. All Rights Reserved.