Interface HypermediaFTUtil<E extends dev.daymor.sakuraboot.DataPresentation<I>,I extends Comparable<? super I> & Serializable>

Type Parameters:
E - The entity type DataPresentation.
I - The ID of type Comparable and Serializable.
All Superinterfaces:
dev.daymor.sakuraboot.test.BasicTestUtil<E,I>, SuperFTUtil<E,I>, dev.daymor.sakuraboot.test.SuperITUtil<E,I>, dev.daymor.sakuraboot.test.SuperTestUtil<I>

public interface HypermediaFTUtil<E extends dev.daymor.sakuraboot.DataPresentation<I>,I extends Comparable<? super I> & Serializable> extends SuperFTUtil<E,I>
The interface for all the utility integration test function. This interface provides common functions for testing hypermedia class.

Example:

To create a concrete util class that inherits from HypermediaFTUtil, follow these steps:

Implements the HypermediaFTUtil interface:

 @Component
 public class YourFTUtil //
     implements HypermediaFTUtil<YourEntity, YourIdType> {

     private final GlobalSpecification globalSpecification;

     @Autowired
     public YourFTUtil(
         final GlobalSpecification globalSpecification) {

         this.globalSpecification = globalSpecification;
     }

     @Override
     public GlobalSpecification getGlobalSpecification() {

         return globalSpecification;
     }

     @Override
     public Optional<YourEntity> createValidation
     ErrorEntity(YourIdType id) {

         return YourEntity.builder().id(id).build();
         // If your class don't have a builder you can use the constructor
     }
 }
 
Since:
0.1.0
See Also:
  • Method Details

    • addOtherLink

      default String addOtherLink(Object body, String path)
      Return the additional links in the model.
      Parameters:
      body - The expected body of the response.
      path - The path use by the controller.
      Returns:
      the other links.
    • entityCollectionName

      default String entityCollectionName()
      Get the collection name used by the model.
      Returns:
      The collection name.