Interface EnablementComponent
public interface EnablementComponent
Data component that can be attached to an
Entity
to provide information about the enabled state of the
entity, and to allow the enabled state to be changed.-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
setEnabled
(boolean enabled, String actor) Callback to alter the enabled state of the entity.
-
Method Details
-
isEnabled
boolean isEnabled()- Returns:
- current state of the enabled flag for the entity.
-
isEnabledStateMutable
boolean isEnabledStateMutable()- Returns:
- true if the enabled state can be changed, false if it is immutable.
-
setEnabled
Callback to alter the enabled state of the entity. You must check thatisEnabledStateMutable()
returns true before calling this method, otherwise will throwUnsupportedOperationException
.
-