Enum Class DependencyDeclaration.CreatePolicy
java.lang.Object
java.lang.Enum<DependencyDeclaration.CreatePolicy>
io.openems.edge.core.appmanager.dependency.DependencyDeclaration.CreatePolicy
- All Implemented Interfaces:
Serializable
,Comparable<DependencyDeclaration.CreatePolicy>
,Constable
- Enclosing class:
- DependencyDeclaration
public static enum DependencyDeclaration.CreatePolicy
extends Enum<DependencyDeclaration.CreatePolicy>
Defines if the dependency app should get created when creating the parent
app.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAlways creates the dependent app except anOpenemsAppInstance
is already created and not a dependency of another app.lazy singleton.Never allowed to create the app. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
isAllowedToCreate
(List<OpenemsAppInstance> allInstances, String appId) Determines if the app of the given appId is allowed to create.Returns the enum constant of this class with the specified name.static DependencyDeclaration.CreatePolicy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ALWAYS
Always creates the dependent app except anOpenemsAppInstance
is already created and not a dependency of another app. -
IF_NOT_EXISTING
lazy singleton. -
NEVER
Never allowed to create the app.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isAllowedToCreate
Determines if the app of the given appId is allowed to create. This does not mean an existing app can't be used as the dependency.- Parameters:
allInstances
- all app instancesappId
- the appId- Returns:
- s true if the app is allowed to create
-