Interface SlugService

All Known Implementing Classes:
SlugServiceImpl

public interface SlugService
Service for generating unique URL-friendly slugs from post titles.
  • Method Summary

    Modifier and Type
    Method
    Description
    Generates a unique slug from a title with appended suffix.
    Generates a random unique suffix for slug uniqueness.
  • Method Details

    • generateSuffix

      String generateSuffix()
      Generates a random unique suffix for slug uniqueness.
      Returns:
      12-character random suffix
    • generate

      String generate(String title)
      Generates a unique slug from a title with appended suffix.
      Parameters:
      title - the title to convert to slug
      Returns:
      URL-friendly slug with unique suffix