Package io.openems.edge.core.appmanager
Class AbstractOpenemsAppWithProps<APP extends AbstractOpenemsAppWithProps<APP,PROPERTY,PARAMETER>,PROPERTY extends Type<PROPERTY,APP,PARAMETER> & Nameable,PARAMETER>
java.lang.Object
io.openems.edge.core.appmanager.AbstractOpenemsApp<PROPERTY>
io.openems.edge.core.appmanager.AbstractOpenemsAppWithProps<APP,PROPERTY,PARAMETER>
- All Implemented Interfaces:
ComponentManagerSupplier
,ComponentUtilSupplier
,OpenemsApp
- Direct Known Subclasses:
AlpitronicEvcs
,AwattarHourly
,CombinedHeatAndPower
,DezonyEvcs
,EntsoE
,EvcsCluster
,FeneconHome
,FeneconHome20
,FeneconHome30
,FixActivePower
,HardyBarthEvcs
,HeatingElement
,HeatPump
,IesKeywattEvcs
,Isk010
,Isk011
,Isk110
,JanitzaMeter
,KdkMeter
,KebaEvcs
,KMtronic8Channel
,ManualRelayControl
,MicrocareSdm630Meter
,ModbusTcpApiReadOnly
,ModbusTcpApiReadWrite
,PeakShaving
,PhaseAccuratePeakShaving
,PrepareBatteryExtension
,RestJsonApiReadOnly
,SmaPvInverter
,SocomecMeter
,StromdaoCorrently
,ThresholdControl
,Tibber
,WebastoNextEvcs
,WebastoUniteEvcs
public abstract class AbstractOpenemsAppWithProps<APP extends AbstractOpenemsAppWithProps<APP,PROPERTY,PARAMETER>,PROPERTY extends Type<PROPERTY,APP,PARAMETER> & Nameable,PARAMETER>
extends AbstractOpenemsApp<PROPERTY>
implements OpenemsApp
-
Nested Class Summary
Nested Classes -
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
ConstructorsModifierConstructorDescriptionprotected
AbstractOpenemsAppWithProps
(ComponentManager componentManager, org.osgi.service.component.ComponentContext componentContext, org.osgi.service.cm.ConfigurationAdmin cm, ComponentUtil componentUtil) -
Method Summary
Modifier and TypeMethodDescriptionFlag[]
flags()
GetsFlags
for thisOpenemsApp
.protected abstract APP
getApp()
getAppAssistant
(User user) Gets theAppAssistant
for thisOpenemsApp
.getAppConfiguration
(ConfigurationTarget target, com.google.gson.JsonObject config, Language language) Gets theAppConfiguration
needed for theOpenemsApp
.protected boolean
getBoolean
(Map<PROPERTY, com.google.gson.JsonElement> map, PROPERTY property) protected boolean
getBoolean
(Map<PROPERTY, com.google.gson.JsonElement> map, PROPERTY property, Function<PROPERTY, AppDef<? super APP, ? super PROPERTY, ? super PARAMETER>> mapper) protected <E extends Enum<E>>
Eprotected <E extends Enum<E>>
EgetEnum
(Map<PROPERTY, com.google.gson.JsonElement> map, Class<E> enumType, PROPERTY property, Function<PROPERTY, AppDef<? super APP, ? super PROPERTY, ? super PARAMETER>> mapper) protected String
getId
(ConfigurationTarget target, Map<PROPERTY, com.google.gson.JsonElement> map, PROPERTY property) protected int
protected int
getInt
(Map<PROPERTY, com.google.gson.JsonElement> map, PROPERTY property, Function<PROPERTY, AppDef<? super APP, ? super PROPERTY, ? super PARAMETER>> mapper) protected com.google.gson.JsonArray
getJsonArray
(Map<PROPERTY, com.google.gson.JsonElement> map, PROPERTY property) Gets allOpenemsAppPropertyDefinition
of the app.protected OpenemsAppStatus
protected String
protected String
getString
(Map<PROPERTY, com.google.gson.JsonElement> map, Language l, PROPERTY property, Function<PROPERTY, AppDef<? super APP, ? super PROPERTY, ? super PARAMETER>> mapper) protected String
protected com.google.gson.JsonElement
getValueOrDefault
(Map<PROPERTY, com.google.gson.JsonElement> map, Language l, PROPERTY property, Function<PROPERTY, AppDef<? super APP, ? super PROPERTY, ? super PARAMETER>> mapper) Methods inherited from class io.openems.edge.core.appmanager.AbstractOpenemsApp
appPropertyConfigurationFactory, base64OfImage, createResourceBundle, fillUpProperties, getAppAssistant, getAppId, getAppPermissions, getComponentManager, getComponentUtil, getComponentWithFactoryId, getId, getImage, getName, getNullableTranslation, getPropertyByName, getShortName, getTranslation, getTranslationBundle, getValidateBuilder, getValidatorConfig, getValueOrDefault, hasProperty, installationValidation, propertyValues
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
getAppDescriptor, getAppId, getAppPermissions, getCardinality, getCategories, getImage, getName, getShortName, getValidatorConfig
-
Constructor Details
-
AbstractOpenemsAppWithProps
protected AbstractOpenemsAppWithProps(ComponentManager componentManager, org.osgi.service.component.ComponentContext componentContext, org.osgi.service.cm.ConfigurationAdmin cm, ComponentUtil componentUtil)
-
-
Method Details
-
getId
protected String getId(ConfigurationTarget target, Map<PROPERTY, com.google.gson.JsonElement> map, PROPERTY property) throws OpenemsException- Throws:
OpenemsException
-
getValueOrDefault
-
getString
-
getString
-
getString
protected String getString(Map<PROPERTY, com.google.gson.JsonElement> map, PROPERTY property) throws OpenemsError.OpenemsNamedException -
getJsonArray
protected com.google.gson.JsonArray getJsonArray(Map<PROPERTY, com.google.gson.JsonElement> map, PROPERTY property) throws OpenemsError.OpenemsNamedException -
getInt
-
getInt
protected int getInt(Map<PROPERTY, com.google.gson.JsonElement> map, PROPERTY property) throws OpenemsError.OpenemsNamedException -
getEnum
-
getEnum
-
getBoolean
-
getBoolean
protected boolean getBoolean(Map<PROPERTY, com.google.gson.JsonElement> map, PROPERTY property) throws OpenemsError.OpenemsNamedException -
getProperties
Description copied from interface:OpenemsApp
Gets allOpenemsAppPropertyDefinition
of the app.- Specified by:
getProperties
in interfaceOpenemsApp
- Overrides:
getProperties
in classAbstractOpenemsApp<PROPERTY extends Type<PROPERTY,
APP, PARAMETER> & Nameable> - Returns:
- the
OpenemsAppPropertyDefinitions
-
getAppAssistant
Description copied from interface:OpenemsApp
Gets theAppAssistant
for thisOpenemsApp
.- Specified by:
getAppAssistant
in interfaceOpenemsApp
- Overrides:
getAppAssistant
in classAbstractOpenemsApp<PROPERTY extends Type<PROPERTY,
APP, PARAMETER> & Nameable> - Parameters:
user
- theUser
- Returns:
- the AppAssistant
-
getAppConfiguration
public AppConfiguration getAppConfiguration(ConfigurationTarget target, com.google.gson.JsonObject config, Language language) throws OpenemsError.OpenemsNamedException Description copied from interface:OpenemsApp
Gets theAppConfiguration
needed for theOpenemsApp
.- Specified by:
getAppConfiguration
in interfaceOpenemsApp
- Overrides:
getAppConfiguration
in classAbstractOpenemsApp<PROPERTY extends Type<PROPERTY,
APP, PARAMETER> & Nameable> - Parameters:
target
- theConfigurationTarget
config
- the configured app 'properties'language
- the language of the configuration- Returns:
- the app Configuration
- Throws:
OpenemsError.OpenemsNamedException
-
getApp
-
flags
Description copied from interface:OpenemsApp
GetsFlags
for thisOpenemsApp
. A Flag could be anything that would describe the app more.Flags may be specific for Monitoring e. g. only show the app after a key was entered (
Flags.SHOW_AFTER_KEY_REDEEM
).- Specified by:
flags
in interfaceOpenemsApp
- Returns:
- an array of
Flags
-
getStatus
-