Enum Class DependencyDeclaration.DeletePolicy
java.lang.Object
java.lang.Enum<DependencyDeclaration.DeletePolicy>
io.openems.edge.core.appmanager.dependency.DependencyDeclaration.DeletePolicy
- All Implemented Interfaces:
Serializable
,Comparable<DependencyDeclaration.DeletePolicy>
,Constable
- Enclosing class:
- DependencyDeclaration
public static enum DependencyDeclaration.DeletePolicy
extends Enum<DependencyDeclaration.DeletePolicy>
Defines if the dependency app gets deleted when deleting its parent.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
isAllowedToDelete
(List<OpenemsAppInstance> allInstances, OpenemsAppInstance parent, OpenemsAppInstance app2Delete) Determines if anOpenemsAppInstance
is allowed to be deleted.Returns the enum constant of this class with the specified name.static DependencyDeclaration.DeletePolicy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ALWAYS
-
IF_MINE
-
NEVER
-
-
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
-
isAllowedToDelete
public final boolean isAllowedToDelete(List<OpenemsAppInstance> allInstances, OpenemsAppInstance parent, OpenemsAppInstance app2Delete) Determines if anOpenemsAppInstance
is allowed to be deleted.- Parameters:
allInstances
- allOpenemsAppInstance
parent
- the parentOpenemsAppInstance
app2Delete
- theOpenemsAppInstance
to delete- Returns:
- true if the instance is allowed to be deleted else false
-