public class ExtendedProperties
extends java.lang.Object
Application.getExtendedPropertyFiles()
are parsed.ExtendableData
,
ExtendedProperty
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<java.lang.String,java.util.List<ExtendedProperty>> |
allProperties
A map from class name --> a list of extended properties of for
that class.
|
private static java.util.List<java.lang.String> |
classes
A list with the
name attribute of all classes found in
the xml file. |
private static java.net.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.
|
private static java.util.Map<java.lang.String,java.util.List<ExtendedProperty>> |
visibleProperties
A map from class name --> a list of extended properties of for
that class.
|
Constructor and Description |
---|
ExtendedProperties() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.String> |
getClasses()
Get a list with the name of all classes.
|
static java.util.List<ExtendedProperty> |
getProperties(java.lang.String className)
Get a list of extended properties for the specified class.
|
static java.util.List<ExtendedProperty> |
getProperties(java.lang.String className,
boolean includeHidden)
Get a list of extended properties for the specified class.
|
static ExtendedProperty |
getProperty(java.lang.String className,
java.lang.String property)
Find an extended property in a given class.
|
(package private) static void |
init()
Initialize the class.
|
static boolean |
isExtendable(java.lang.String className)
Check if extended properties has been defined for the
specified class.
|
private static void |
loadClasses(java.util.Set<java.lang.String> usedNames,
Document dom,
java.lang.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(java.util.Set<java.lang.String> usedNames,
Element classElement,
java.lang.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 java.util.List<java.lang.String> classes
name
attribute of all classes found in
the xml file.private static java.util.Map<java.lang.String,java.util.List<ExtendedProperty>> allProperties
ExtendedProperty
objects.private static java.util.Map<java.lang.String,java.util.List<ExtendedProperty>> visibleProperties
ExtendedProperty
objects that
are not hidden.private static final java.net.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
,
allProperties
and visibleProperties
variables.BaseException
public static java.util.List<java.lang.String> getClasses()
List
containing the names of the classes.public static boolean isExtendable(java.lang.String className)
className
- The name of the class with or without
the package namepublic static java.util.List<ExtendedProperty> getProperties(java.lang.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 java.util.List<ExtendedProperty> getProperties(java.lang.String className, boolean includeHidden)
className
- The name of the class with or without
the package nameincludeHidden
- A flag to indicate if hidden properties should be included or notList
object containing ExtendedProperty
objects, or null if the specified class is not extendable or
no extended properties has been definedpublic static ExtendedProperty getProperty(java.lang.String className, java.lang.String property)
className
- The name of an extendable class with or without
the package nameproperty
- The name of the propertyprivate static void loadClasses(java.util.Set<java.lang.String> usedNames, Document dom, java.lang.String xmlFile)
classes
variable.private static void loadProperties(java.util.Set<java.lang.String> usedNames, Element classElement, java.lang.String xmlFile)
allProperties
variable.