Enum Class ConfigurationType

java.lang.Object
java.lang.Enum<ConfigurationType>
me.remigio07.chatplugin.api.common.storage.configuration.ConfigurationType
All Implemented Interfaces:
Serializable, Comparable<ConfigurationType>, Constable

public enum ConfigurationType extends Enum<ConfigurationType>
Represents a configuration's type.

It comprehends the internal and CUSTOM configurations, which are handled by the plugin's addons.

See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static ConfigurationType[] 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

      public static ConfigurationType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getFolder

      public String getFolder()
      Gets this configuration's folder's path.

      Will return null for files in the plugin's folder (not inside any sub-folder) or if this == CUSTOM.

      Returns:
      Configuration's folder's path
    • getFileName

      public String getFileName()
      Gets this configuration's file's name.

      Note: if this == CUSTOM this method will return "custom.yml", which is not applicable in most cases.

      Returns:
      Configuration's file's name
    • getFile

      public File getFile()
      Gets this configuration's file. The file may not exist.

      Note: if this == CUSTOM this method will return a custom.yml file, which is not applicable in most cases.

      Returns:
      Configuration's file
    • get

      public Configuration get()
      Gets this configuration from the loaded ConfigurationManager.getConfigurations().

      Will return null if this == CUSTOM or if it is not loaded.

      Returns:
      Corresponding Configuration
    • isAvailableOnProxy

      public boolean isAvailableOnProxy()
      Checks if this configuration is available on the proxy implementation of the plugin.

      The only ones supported on proxies are CONFIG, DISCORD_INTEGRATION, TELEGRAM_INTEGRATION and CUSTOM for custom configurations.

      Returns:
      Whether this configuration is available on proxy implementations
    • getConfigurationTypes

      public static List<ConfigurationType> getConfigurationTypes()
      Gets the configuration types available on Environment.getCurrent().
      Returns:
      Available configuration types
      See Also: