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

      private static final java.util.Map<java.lang.String,​PropertyType> PROPERTY_TYPES
    • PROPERTIES

      private static final java.util.Map<java.lang.String,​Property> PROPERTIES
  • Constructor Details

    • PropertyManager

      private PropertyManager()
      Private constructor - not meant to be instantiated.
  • Method Details

    • registerPropertyType

      public static void registerPropertyType​(PropertyType type)
      Registers a property type. Must have unique IDs.
      Throws:
      java.lang.IllegalArgumentException - if there is an existing type that uses the same ID
    • getPropertyType

      public static PropertyType getPropertyType​(java.lang.String id)
      Gets the property type matching the given ID.
      Returns:
      the property type matching the given ID or null if none exists
    • registerProperty

      public static void registerProperty​(Property prop)
      Registers a property. Properties must have unique IDs.
      Throws:
      java.lang.IllegalArgumentException - if there is an existing property that uses the same ID
    • getProperty

      public static Property getProperty​(java.lang.String id)
      Gets the property matching the given ID.
      Returns:
      the property matching the given ID or null if none exists