public class

XMLObjectConfigurationFactory

extends Object
implements ObjectConfigurationFactory
java.lang.Object
   ↳ com.atlassian.configurable.XMLObjectConfigurationFactory

Class Overview

This class retrieves an Object Configuration with a particular id. The Object Configuration must be unique as a user will set there own parameters on the object during its lifetime.

Summary

Public Constructors
XMLObjectConfigurationFactory()
Creates a new XMLObjectConfigurationFactory object.
Public Methods
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 contruct 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 contruct a real object when the get function is called.
void loadObjectConfigurationFromElement(Element element, ObjectDescriptor od, String id)
void loadObjectConfigurationFromElement(Element element, ObjectDescriptor od, String id, ClassLoader classLoader)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.configurable.ObjectConfigurationFactory

Public Constructors

public XMLObjectConfigurationFactory ()

Creates a new XMLObjectConfigurationFactory object.

Public Methods

public ObjectConfiguration getObjectConfiguration (String id, Map params)

This function retrieves an ObjectConfiguration based on a specified identifier, N.B. must be mutable

Parameters
id Identifier for the object configuration to retrieve.
Returns
  • a ObjectConfiguration

public boolean hasObjectConfiguration (String id)

Does this factory know about an ObjectConfiguration with the specified id

Parameters
id Identifier for the object configuration to retrieve.
Returns
  • object configuration is available.

public void loadObjectConfiguration (String xmlFile, String id)

This procedure loads an xml file into a holder object which is then used to contruct a real object when the get function is called. Uses the same class loader that loaded this instance of XMLObjectConfigurationFactory to load the xml file and descriptor classes.

Parameters
xmlFile the name of the resource on the classpath from which to load the config.
id Identifier for the object configuration to retrieve.
Throws
ObjectConfigurationException if something is really wrong

public void loadObjectConfiguration (String xmlFile, String id, ClassLoader classLoader)

This procedure loads an xml file into a holder object which is then used to contruct a real object when the get function is called. Uses the provided class loader to load the xml file and descriptor classes.

Parameters
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 file
Throws
ObjectConfigurationException if something is really wrong

public void loadObjectConfigurationFromElement (Element element, ObjectDescriptor od, String id)

public void loadObjectConfigurationFromElement (Element element, ObjectDescriptor od, String id, ClassLoader classLoader)