Module watamebot

Interface PropertyProvider<C,K,G,M extends PropertyMapping>

Type Parameters:
C - property category type
K - property key type
G - lookup type
M - property mapping type
All Known Subinterfaces:
LCKPropertyProvider, PluginPropertyProvider

public interface PropertyProvider<C,K,G,M extends PropertyMapping>
Base interface defining methods to provide and register LCKProperty and PropertyInfo.
Author:
Ashley
  • Method Details

    • registerProperty

      PropertyInfo registerProperty(@NotNull C category, @NotNull K key, boolean modifiable, @NotNull @NotNull PropertyType type)
      Register a new PropertyInfo inside the configuration.
      Parameters:
      category - - property owner
      key - - property key
      modifiable - - if can be modified by the user
      type - - property storage type
      Returns:
      Returns the created PropertyInfo
    • upsertProperty

      default Property<G,M> upsertProperty(@NotNull C category, @NotNull K key, boolean modifiable, @NotNull @NotNull PropertyType type)
      Register a PropertyInfo if it does not exist inside the configuration and return a new LCKProperty created with the property information.
      Parameters:
      category - - property owner
      key - - property key
      modifiable - - if can be modified by the end user
      type - - property storage type
      Returns:
      Returns a LCKProperty with the specified PropertyInfo
    • getPropertyByID

      Property<G,M> getPropertyByID(int id)
      Get a LCKProperty based on the specified property information id.
      Parameters:
      id - - PropertyInfo id
      Returns:
      Returns a LCKProperty using the specified PropertyInfo id
    • getProperty

      Property<G,M> getProperty(@NotNull C category, @NotNull K key)
      Get a LCKProperty based on the specified property category and key.
      Parameters:
      category - - property owner
      key - - property key
      Returns:
      Returns a LCKProperty linked to the PropertyInfo category and name
    • getProperty

      Property<G,M> getProperty(@NotNull @NotNull PropertyInfo info)
      Get a LCKProperty linked to the specified PropertyInfo.
      Parameters:
      info - - property information
      Returns:
      Returns a LCKProperty with the specified info
    • propertyExists

      boolean propertyExists(@NotNull C category, @NotNull K key)
      Check if a PropertyInfo is registered inside the configuration
      Parameters:
      category - - property owner
      key - - property key
      Returns:
      Returns true if the property already exists inside the configuration, otherwise false
    • getPropertyList

      List<PropertyInfo> getPropertyList()
      Get a list of all registered PropertyInfo.}
      Returns:
      Returns a List of all PropertyInfo registered inside the configuration