Package io.openems.edge.app.api
Class RestJsonApiReadWrite
- java.lang.Object
-
- io.openems.edge.core.appmanager.AbstractOpenemsApp<RestJsonApiReadWrite.Property>
-
- io.openems.edge.app.api.RestJsonApiReadWrite
-
- All Implemented Interfaces:
OpenemsApp
public class RestJsonApiReadWrite extends AbstractOpenemsApp<RestJsonApiReadWrite.Property> implements OpenemsApp
Describes a App for ReadWrite Rest JSON Api.{ "appId":"App.Api.RestJson.ReadWrite", "alias":"Rest/JSON-Api Read-Write", "instanceId": UUID, "image": base64, "properties":{ "CONTROLLER_ID": "ctrlApiRest0", "API_TIMEOUT": 60 }, "dependencies": [ { "key": "READ_ONLY", "instanceId": UUID } ], "appDescriptor": { "websiteUrl":
AppDescriptor.getWebsiteUrl()
} }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RestJsonApiReadWrite.Property
-
Field Summary
-
Fields inherited from class io.openems.edge.core.appmanager.AbstractOpenemsApp
cm, componentContext, componentManager, componentUtil
-
Fields inherited from interface io.openems.edge.core.appmanager.OpenemsApp
FALLBACK_IMAGE
-
-
Constructor Summary
Constructors Constructor Description RestJsonApiReadWrite(ComponentManager componentManager, org.osgi.service.component.ComponentContext context, org.osgi.service.cm.ConfigurationAdmin cm, ComponentUtil componentUtil)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ThrowingTriFunction<ConfigurationTarget,java.util.EnumMap<RestJsonApiReadWrite.Property,com.google.gson.JsonElement>,Language,AppConfiguration,OpenemsError.OpenemsNamedException>
appConfigurationFactory()
Provides a factory forAppConfigurations
.AppAssistant
getAppAssistant(Language language)
Gets theAppAssistant
for thisOpenemsApp
.AppDescriptor
getAppDescriptor()
Gets theAppDescriptor
of theOpenemsApp
.OpenemsAppCardinality
getCardinality()
Gets theOpenemsAppCardinality
of theOpenemsApp
.OpenemsAppCategory[]
getCategorys()
Gets theOpenemsAppCategory
of theOpenemsApp
.protected java.lang.Class<RestJsonApiReadWrite.Property>
getPropertyClass()
-
Methods inherited from class io.openems.edge.core.appmanager.AbstractOpenemsApp
assertCheckables, base64OfImage, getAppConfiguration, getAppId, getComponentWithFactoryId, getId, getId, getImage, getName, getTranslation, getTranslationBundle, getValidateBuilder, getValidatorConfig, getValueOrDefault, getValueOrDefault, hasProperty, installationValidation, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.openems.edge.core.appmanager.OpenemsApp
getAppConfiguration, getAppId, getImage, getName, getValidatorConfig, validate
-
-
-
-
Constructor Detail
-
RestJsonApiReadWrite
public RestJsonApiReadWrite(ComponentManager componentManager, org.osgi.service.component.ComponentContext context, org.osgi.service.cm.ConfigurationAdmin cm, ComponentUtil componentUtil)
-
-
Method Detail
-
getAppAssistant
public AppAssistant getAppAssistant(Language language)
Description copied from interface:OpenemsApp
Gets theAppAssistant
for thisOpenemsApp
.- Specified by:
getAppAssistant
in interfaceOpenemsApp
- Parameters:
language
- the language of theAppAssistant
- Returns:
- the AppAssistant
-
getAppDescriptor
public AppDescriptor getAppDescriptor()
Description copied from interface:OpenemsApp
Gets theAppDescriptor
of theOpenemsApp
.- Specified by:
getAppDescriptor
in interfaceOpenemsApp
- Returns:
- the
AppDescriptor
-
getCategorys
public OpenemsAppCategory[] getCategorys()
Description copied from interface:OpenemsApp
Gets theOpenemsAppCategory
of theOpenemsApp
.- Specified by:
getCategorys
in interfaceOpenemsApp
- Returns:
- the category's
-
getCardinality
public OpenemsAppCardinality getCardinality()
Description copied from interface:OpenemsApp
Gets theOpenemsAppCardinality
of theOpenemsApp
.- Specified by:
getCardinality
in interfaceOpenemsApp
- Returns:
- the usage
-
appConfigurationFactory
protected ThrowingTriFunction<ConfigurationTarget,java.util.EnumMap<RestJsonApiReadWrite.Property,com.google.gson.JsonElement>,Language,AppConfiguration,OpenemsError.OpenemsNamedException> appConfigurationFactory()
Description copied from class:AbstractOpenemsApp
Provides a factory forAppConfigurations
.- Specified by:
appConfigurationFactory
in classAbstractOpenemsApp<RestJsonApiReadWrite.Property>
- Returns:
- a
ThrowingFunction
that creates aAppConfiguration
from aEnumMap
of configuration properties for a givenConfigurationTarget
in the specified language.
-
getPropertyClass
protected java.lang.Class<RestJsonApiReadWrite.Property> getPropertyClass()
- Specified by:
getPropertyClass
in classAbstractOpenemsApp<RestJsonApiReadWrite.Property>
-
-