Interface AssemblerRegistry


  • public interface AssemblerRegistry
    This registry allows to access assemblers programmatically.
    • Method Detail

      • getAssembler

        <A extends AggregateRoot<?>,​D> Assembler<A,​D> getAssembler​(Class<A> aggregateRootClass,
                                                                               Class<D> dtoClass)
        Returns the Assembler matching the given aggregate root class and the dto class.
        Type Parameters:
        A - the type of the aggregate root.
        D - the type of the DTO.
        Parameters:
        aggregateRootClass - the aggregate root class.
        dtoClass - the dto class.
        Returns:
        an assembler instance.
      • getAssembler

        <A extends AggregateRoot<?>,​D> Assembler<A,​D> getAssembler​(Class<A> aggregateRootClass,
                                                                               Class<D> dtoClass,
                                                                               @Nullable
                                                                               Annotation qualifier)
        Returns the Assembler matching the given aggregate root class and the dto class for the specified qualifier.
        Type Parameters:
        A - the type of the aggregate root.
        D - the type of the DTO.
        Parameters:
        aggregateRootClass - the aggregate root class.
        dtoClass - the dto class.
        qualifier - the assembler qualifier.
        Returns:
        an assembler instance.
      • getAssembler

        <A extends AggregateRoot<?>,​D> Assembler<A,​D> getAssembler​(Class<A> aggregateRootClass,
                                                                               Class<D> dtoClass,
                                                                               @Nullable
                                                                               Class<? extends Annotation> qualifier)
        Returns the Assembler matching the given aggregate root class and the dto class for the specified qualifier.
        Type Parameters:
        A - the type of the aggregate root.
        D - the type of the DTO.
        Parameters:
        aggregateRootClass - the aggregate root class.
        dtoClass - the dto class.
        qualifier - the assembler qualifier.
        Returns:
        an assembler instance.
      • getTupleAssembler

        <T extends org.javatuples.Tuple,​D> Assembler<T,​D> getTupleAssembler​(Class<? extends AggregateRoot<?>>[] aggregateRootClasses,
                                                                                        Class<D> dtoClass)
        Returns the Assembler matching the given list of aggregate root classes and the dto class.
        Type Parameters:
        T - the type of the tuple.
        D - the type of the DTO.
        Parameters:
        aggregateRootClasses - an array of aggregate root classes.
        dtoClass - the dto class.
        Returns:
        an assembler instance.
      • getTupleAssembler

        <T extends org.javatuples.Tuple,​D> Assembler<T,​D> getTupleAssembler​(Class<? extends AggregateRoot<?>>[] aggregateRootClasses,
                                                                                        Class<D> dtoClass,
                                                                                        @Nullable
                                                                                        Annotation qualifier)
        Returns the Assembler matching the given list of aggregate root classes and the dto class for the specified qualifier.
        Type Parameters:
        T - the type of the tuple.
        D - the type of the DTO.
        Parameters:
        aggregateRootClasses - an array of aggregate root classes.
        dtoClass - the dto class.
        qualifier - the assembler qualifier.
        Returns:
        an assembler instance.
      • getTupleAssembler

        <T extends org.javatuples.Tuple,​D> Assembler<T,​D> getTupleAssembler​(Class<? extends AggregateRoot<?>>[] aggregateRootClasses,
                                                                                        Class<D> dtoClass,
                                                                                        @Nullable
                                                                                        Class<? extends Annotation> qualifier)
        Returns the Assembler matching the given list of aggregate root classes and the dto class for the specified qualifier.
        Type Parameters:
        T - the type of the tuple.
        D - the type of the DTO.
        Parameters:
        aggregateRootClasses - an array of aggregate root classes.
        dtoClass - the dto class.
        qualifier - the assembler qualifier.
        Returns:
        an assembler instance.