public class ExtendedProperties extends Object
Application.getExtendedPropertyFiles()
are parsed.ExtendableData
,
ExtendedProperty
Modifier and Type | Field and Description |
---|---|
private static Map<String,List<ExtendedProperty>> |
allProperties
A map from class name --> a list of extended properties of for
that class.
|
private static List<String> |
classes
A list with the
name attribute of all classes found in
the xml file. |
private static URL |
dtdFile
The DTD which is used to validate the XML file.
|
private static boolean |
isInitialised |
private static org.slf4j.Logger |
log
Log core events.
|
Constructor and Description |
---|
ExtendedProperties() |
Modifier and Type | Method and Description |
---|---|
static List<String> |
getClasses()
Get a list with the name of all classes.
|
static List<ExtendedProperty> |
getProperties(String className)
Get a list of extended properties for the specified class.
|
static ExtendedProperty |
getProperty(String className,
String property)
Find an extended property in a given class.
|
(package private) static void |
init()
Initialize the class.
|
static boolean |
isExtendable(String className)
Check if extended properties has been defined for the
specified class.
|
private static void |
loadClasses(Set<String> usedNames,
org.jdom.Document dom,
String xmlFile)
Load the classes and put their names in the
classes
variable. |
private static void |
loadExtendedPropertiesFile()
Load and parse the file with predefined queries.
|
private static void |
loadProperties(Set<String> usedNames,
org.jdom.Element classElement,
String xmlFile)
Load the properties for the specified class node and
put the list in the
allProperties variable. |
(package private) static void |
unload()
Unload all settings.
|
private static final org.slf4j.Logger log
private static List<String> classes
name
attribute of all classes found in
the xml file.private static Map<String,List<ExtendedProperty>> allProperties
ExtendedProperty
objects.private static final URL dtdFile
private static boolean isInitialised
static void init() throws BaseException
BaseException
- This exception is thrown if there is an errorstatic void unload()
private static void loadExtendedPropertiesFile() throws BaseException
classes
and
allProperties
variables.BaseException
public static List<String> getClasses()
List
containing the names of the classes.public static boolean isExtendable(String className)
className
- The name of the class with or without
the package namepublic static List<ExtendedProperty> getProperties(String className)
className
- The name of the class with or without
the package nameList
object containing ExtendedProperty
objects, or null if the specified class is not extendable or
no extended properties has been definedpublic static ExtendedProperty getProperty(String className, String property)
className
- The name of an extendable class with or without
the package nameproperty
- The name of the propertyprivate static void loadClasses(Set<String> usedNames, org.jdom.Document dom, String xmlFile)
classes
variable.private static void loadProperties(Set<String> usedNames, org.jdom.Element classElement, String xmlFile)
allProperties
variable.