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>PROPERTIESprivate static java.util.Map<java.lang.String,PropertyType>PROPERTY_TYPES -
Constructor Summary
Constructors Modifier Constructor Description privatePropertyManager()Private constructor - not meant to be instantiated. -
Method Summary
Modifier and Type Method Description static PropertygetProperty(java.lang.String id)Gets the property matching the given ID.static PropertyTypegetPropertyType(java.lang.String id)Gets the property type matching the given ID.static voidregisterProperty(Property prop)Registers a property.static voidregisterPropertyType(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
-