Class Flag
java.lang.Object
cn.lunadeer.dominion.api.dtos.flag.Flag
Represents a flag in the Dominion system.
This abstract class provides the basic structure and methods
for flags, including their name, display name, description,
default value, and enable status.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract String
Returns the configuration key for the default value of this flag.abstract String
Returns the configuration key for the description of this flag.abstract String
Returns the configuration key for the enable status of this flag.abstract String
Returns the configuration key for the name of this flag.@NotNull Boolean
Returns the default value of the flag.@NotNull String
Returns the description of the flag.Returns the configuration key for the description of the flag.@NotNull String
Returns the display name of the flag.Returns the configuration key for the display name of the flag.@NotNull Boolean
Returns the enable status of the flag.@NotNull String
Returns the name of the flag.void
setDefaultValue
(Boolean defaultValue) Sets the default value of the flag.void
setDescription
(String description) Sets the description of the flag.void
setDisplayName
(String displayName) Sets the display name of the flag.void
Sets the enable status of the flag.
-
Constructor Details
-
Flag
public Flag(@NotNull @NotNull String flag_name, @NotNull @NotNull String display_name, @NotNull @NotNull String description, @NotNull @NotNull Boolean default_value, @NotNull @NotNull Boolean enable) Constructs a new Flag with the specified parameters.- Parameters:
flag_name
- the name of the flagdisplay_name
- the display name of the flagdescription
- the description of the flagdefault_value
- the default value of the flagenable
- the enable status of the flag
-
-
Method Details
-
getFlagName
Returns the name of the flag.- Returns:
- the name of the flag
-
getDisplayName
Returns the display name of the flag. This is the name that will be displayed to the user. Can be translated in language files.- Returns:
- the display name of the flag
-
getDescription
Returns the description of the flag. Can be translated in language files.- Returns:
- the description of the flag
-
getDefaultValue
Returns the default value of the flag.- Returns:
- the default value of the flag
-
getEnable
Returns the enable status of the flag.- Returns:
- the enable status of the flag
-
setDisplayName
Sets the display name of the flag.- Parameters:
displayName
- the new display name of the flag
-
setDescription
Sets the description of the flag.- Parameters:
description
- the new description of the flag
-
setDefaultValue
Sets the default value of the flag.- Parameters:
defaultValue
- the new default value of the flag
-
setEnable
Sets the enable status of the flag.- Parameters:
enable
- the new enable status of the flag
-
getDisplayNameKey
Returns the configuration key for the display name of the flag.- Returns:
- the configuration key for the display name
-
getDescriptionKey
Returns the configuration key for the description of the flag.- Returns:
- the configuration key for the description
-
getConfigurationDescKey
Returns the configuration key for the description of this flag.- Returns:
- the configuration key for the description
-
getConfigurationDefaultKey
Returns the configuration key for the default value of this flag.- Returns:
- the configuration key for the default value
-
getConfigurationEnableKey
Returns the configuration key for the enable status of this flag.- Returns:
- the configuration key for the enable status
-
getConfigurationNameKey
Returns the configuration key for the name of this flag.- Returns:
- the configuration key for the name
-