Package io.openems.edge.app.api
Class RestJsonApiReadOnly
java.lang.Object
io.openems.edge.core.appmanager.AbstractOpenemsApp<PROPERTY>
io.openems.edge.core.appmanager.AbstractOpenemsAppWithProps<RestJsonApiReadOnly,RestJsonApiReadOnly.Property,Type.Parameter.BundleParameter>
io.openems.edge.app.api.RestJsonApiReadOnly
- All Implemented Interfaces:
OpenemsApp
public class RestJsonApiReadOnly
extends AbstractOpenemsAppWithProps<RestJsonApiReadOnly,RestJsonApiReadOnly.Property,Type.Parameter.BundleParameter>
implements OpenemsApp
Describes a App for ReadOnly Rest JSON Api.
{
"appId":"App.Api.RestJson.ReadOnly",
"alias":"REST/JSON-Api Read-Only",
"instanceId": UUID,
"image": base64,
"properties":{
"ACTIVE": true,
"CONTROLLER_ID": "ctrlApiRest0"
},
"appDescriptor": {
"websiteUrl": AppDescriptor.getWebsiteUrl()
}
}
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class io.openems.edge.core.appmanager.AbstractOpenemsAppWithProps
AbstractOpenemsAppWithProps.Singleton<T>
-
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
ConstructorsConstructorDescriptionRestJsonApiReadOnly
(ComponentManager componentManager, org.osgi.service.component.ComponentContext context, org.osgi.service.cm.ConfigurationAdmin cm, ComponentUtil componentUtil) -
Method Summary
Modifier and TypeMethodDescriptionprotected ThrowingTriFunction<ConfigurationTarget,
Map<RestJsonApiReadOnly.Property, com.google.gson.JsonElement>, Language, AppConfiguration, OpenemsError.OpenemsNamedException> Provides a factory forAppConfigurations
.protected RestJsonApiReadOnly
getApp()
getAppAssistant
(Language language) Gets theAppAssistant
for thisOpenemsApp
.Gets theAppDescriptor
of theOpenemsApp
.Gets theOpenemsAppCardinality
of theOpenemsApp
.Gets theOpenemsAppCategory
of theOpenemsApp
.protected RestJsonApiReadOnly.Property[]
Methods inherited from class io.openems.edge.core.appmanager.AbstractOpenemsAppWithProps
fillUpProperties, getAppConfiguration, getBoolean, getBoolean, getEnum, getEnum, getId, getInt, getInt, getJsonArray, getProperties, getString, getString, getValidationErrors, getValueOrDefault
Methods inherited from class io.openems.edge.core.appmanager.AbstractOpenemsApp
assertCheckables, base64OfImage, getAppId, getAppPermissions, getComponentWithFactoryId, getId, getImage, getName, getPropertyByName, getTranslation, getTranslationBundle, getValidateBuilder, getValidatorConfig, 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, getAppPermissions, getImage, getName, getProperties, getValidatorConfig, validate
-
Constructor Details
-
RestJsonApiReadOnly
public RestJsonApiReadOnly(ComponentManager componentManager, org.osgi.service.component.ComponentContext context, org.osgi.service.cm.ConfigurationAdmin cm, ComponentUtil componentUtil)
-
-
Method Details
-
getAppAssistant
Description copied from interface:OpenemsApp
Gets theAppAssistant
for thisOpenemsApp
.- Specified by:
getAppAssistant
in interfaceOpenemsApp
- Overrides:
getAppAssistant
in classAbstractOpenemsAppWithProps<RestJsonApiReadOnly,
RestJsonApiReadOnly.Property, Type.Parameter.BundleParameter> - Parameters:
language
- the language of theAppAssistant
- Returns:
- the AppAssistant
-
getAppDescriptor
Description copied from interface:OpenemsApp
Gets theAppDescriptor
of theOpenemsApp
.- Specified by:
getAppDescriptor
in interfaceOpenemsApp
- Returns:
- the
AppDescriptor
-
getCategories
Description copied from interface:OpenemsApp
Gets theOpenemsAppCategory
of theOpenemsApp
.- Specified by:
getCategories
in interfaceOpenemsApp
- Returns:
- the category's
-
getCardinality
Description copied from interface:OpenemsApp
Gets theOpenemsAppCardinality
of theOpenemsApp
.- Specified by:
getCardinality
in interfaceOpenemsApp
- Returns:
- the usage
-
appPropertyConfigurationFactory
protected ThrowingTriFunction<ConfigurationTarget,Map<RestJsonApiReadOnly.Property, appPropertyConfigurationFactory()com.google.gson.JsonElement>, Language, AppConfiguration, OpenemsError.OpenemsNamedException> Description copied from class:AbstractOpenemsApp
Provides a factory forAppConfigurations
.- Specified by:
appPropertyConfigurationFactory
in classAbstractOpenemsApp<RestJsonApiReadOnly.Property>
- Returns:
- a
ThrowingFunction
that creates aAppConfiguration
from aMap
of configuration properties for a givenConfigurationTarget
in the specified language.
-
propertyValues
- Specified by:
propertyValues
in classAbstractOpenemsApp<RestJsonApiReadOnly.Property>
-
getApp
- Specified by:
getApp
in classAbstractOpenemsAppWithProps<RestJsonApiReadOnly,
RestJsonApiReadOnly.Property, Type.Parameter.BundleParameter>
-