Package org.pathvisio.libgpml.prop
Class PropertyManager
java.lang.Object
org.pathvisio.libgpml.prop.PropertyManager
public class PropertyManager
extends java.lang.Object
This PropertyManager handles the registration/lookups of everything related
to TypedProperties.
Plugins with custom Properties or PropertyTypes should register them here.
- Author:
- Mark Woon
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.String,Property>
PROPERTIES
private static java.util.Map<java.lang.String,PropertyType>
PROPERTY_TYPES
-
Constructor Summary
Constructors Modifier Constructor Description private
PropertyManager()
Private constructor - not meant to be instantiated. -
Method Summary
Modifier and Type Method Description static Property
getProperty(java.lang.String id)
Gets the property matching the given ID.static PropertyType
getPropertyType(java.lang.String id)
Gets the property type matching the given ID.static void
registerProperty(Property prop)
Registers a property.static void
registerPropertyType(PropertyType type)
Registers a property type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
PROPERTY_TYPES
-
PROPERTIES
-
-
Constructor Details
-
PropertyManager
private PropertyManager()Private constructor - not meant to be instantiated.
-
-
Method Details
-
registerPropertyType
Registers a property type. Must have unique IDs.- Throws:
java.lang.IllegalArgumentException
- if there is an existing type that uses the same ID
-
getPropertyType
Gets the property type matching the given ID.- Returns:
- the property type matching the given ID or null if none exists
-
registerProperty
Registers a property. Properties must have unique IDs.- Throws:
java.lang.IllegalArgumentException
- if there is an existing property that uses the same ID
-
getProperty
Gets the property matching the given ID.- Returns:
- the property matching the given ID or null if none exists
-