Interface ISlugSupport

  • All Implemented Interfaces:

    
    public interface ISlugSupport<ID extends Object>
    
                        

    Interface to be implemented by entities that support slugs.

    This interface defines the contract for entities that require a slug field, typically for use in SEO-friendly URLs or human-readable identifiers.

    Implementing this interface allows the slug generation mechanism (e.g., via ISlugGenerator) to interact with the entity's identifier and slug field in a consistent way.

    Usage example:

    <pre>{@code
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract ID getId() The unique identifier of the entity.
      abstract String getSlug() The current slug value of the entity.
      abstract Unit setSlug(String slug) The current slug value of the entity.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getId

         abstract ID getId()

        The unique identifier of the entity.

        Returns:

        the entity ID

      • getSlug

         abstract String getSlug()

        The current slug value of the entity.

        Returns:

        the slug

      • setSlug

         abstract Unit setSlug(String slug)

        The current slug value of the entity.

        Returns:

        the slug