Interface TanTerritoryManager


public interface TanTerritoryManager
The TanTerritoryManager interface provides methods for accessing and managing territories within the application. It allows retrieval of towns and regions by their IDs or names, and provides collections of all towns and regions. This interface is essential for handling territory-related operations and ensuring proper management of town and region data.
  • Method Details

    • getTown

      Optional<TanTown> getTown(String townID)
      Get a town by its ID
      Parameters:
      townID - the ID of the town
      Returns:
      The town if it exists. Optional.empty() otherwise
    • getTownByName

      Optional<TanTown> getTownByName(String townName)
      Get a town by its name
      It is recommended to use the UUID instead of the name because names duplicate can happen if the option is enabled in the configuration
      Parameters:
      townName - the name of the town
      Returns:
      The town if it exists. Optional.empty() otherwise
    • getTowns

      Collection<TanTown> getTowns()
      Get all the towns
      Returns:
      a Collection of all the towns
    • getRegion

      Optional<TanRegion> getRegion(String regionID)
      Get a region by its ID
      Parameters:
      regionID - the ID of the region
      Returns:
      The region if it exists. Optional.empty() otherwise
    • getRegionByName

      Optional<TanRegion> getRegionByName(String regionName)
      Get a region by its name
      It is recommended to use the UUID instead of the name because names duplicate can happen if the option is enabled in the configuration
      Parameters:
      regionName - the name of the region
      Returns:
      The region if it exists. Optional.empty() otherwise
    • getRegions

      Collection<TanRegion> getRegions()
      Get all the regions
      Returns:
      a Collection of all the regions