Class EdgeConfig.Factory

  • Enclosing class:
    EdgeConfig

    public static class EdgeConfig.Factory
    extends java.lang.Object
    Represents an OpenEMS Component Factory.
    • Constructor Detail

      • Factory

        public Factory​(java.lang.String id,
                       java.lang.String name,
                       java.lang.String description,
                       EdgeConfig.Factory.Property[] properties,
                       java.lang.String[] natureIds)
    • Method Detail

      • create

        public static EdgeConfig.Factory create​(java.lang.String factoryId,
                                                org.osgi.service.metatype.ObjectClassDefinition ocd,
                                                java.lang.String[] natureIds)
      • getId

        public java.lang.String getId()
      • getName

        public java.lang.String getName()
      • getDescription

        public java.lang.String getDescription()
      • getProperty

        public java.util.Optional<EdgeConfig.Factory.Property> getProperty​(java.lang.String key)
        Gets the Property with the given key.
        Parameters:
        key - the property key
        Returns:
        the Property
      • getNatureIds

        public java.lang.String[] getNatureIds()
      • toJson

        public com.google.gson.JsonObject toJson()
        Returns the Factory configuration as a JSON Object.
         {
           natureIds: string[]
         }
         
        Returns:
        configuration as a JSON Object