Class IdentifierConverter

java.lang.Object
com.buralotech.oss.identifier.spring.IdentifierConverter
All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<String,Identifier>

public class IdentifierConverter extends Object implements org.springframework.core.convert.converter.Converter<String,Identifier>
Used to bind/inject identifiers in their text representation as identifiers objects.
  • Field Details

    • identifierService

      private final IdentifierService identifierService
      The identifier service.
  • Constructor Details

    • IdentifierConverter

      public IdentifierConverter(IdentifierService identifierService)
      Initialise the converter.
      Parameters:
      identifierService - The identifier service.
  • Method Details

    • convert

      public Identifier convert(String source)
      Perform the conversion by delegating to the identifier service.
      Specified by:
      convert in interface org.springframework.core.convert.converter.Converter<String,Identifier>
      Parameters:
      source - The textual representation of the identifier.
      Returns:
      The identifier object.