Class MetadataConverter

java.lang.Object
com.aquima.web.rest.v1.converter.MetadataConverter
All Implemented Interfaces:
IResourceConverter<com.aquima.interactions.portal.ds.ProjectMetadata,Metadata>

public class MetadataConverter extends Object implements IResourceConverter<com.aquima.interactions.portal.ds.ProjectMetadata,Metadata>
Converts project metadata to metadata REST resources.
Since:
9.6
Author:
m.van.tilburg
  • Constructor Details Link icon

    • MetadataConverter Link icon

      public MetadataConverter(com.aquima.interactions.foundation.connectivity.IConnectionManager connectionManager, IResourceFactory factory, IResourceLinker<Metadata> linker)
      Parameters:
      connectionManager - the connection manager containing the configured endpoints
      factory - the factory used to create metadata (sub)resources
      linker - a linker capable of adding HATEOAS links to metadata resources
    • MetadataConverter Link icon

      public MetadataConverter(com.aquima.interactions.foundation.connectivity.IConnectionManager connectionManager, IResourceFactory resourceFactory, IResourceLinker<Metadata> metadataLinker, IResourceLinker<Webservice> webserviceLinker)
      Parameters:
      connectionManager - the connection manager containing the configured endpoints
      resourceFactory - the factory used to create metadata (sub)resources
      metadataLinker - a linker capable of adding HATEOAS links to metadata resources
      webserviceLinker - a linker capable of adding HATEOAS links to webservice resources
  • Method Details Link icon

    • convert Link icon

      public void convert(com.aquima.interactions.portal.ds.ProjectMetadata source, Metadata result)
      Description copied from interface: IResourceConverter
      Converts a source domain model to a destination REST resource. Also adds HATEOAS links.
      Specified by:
      convert in interface IResourceConverter<com.aquima.interactions.portal.ds.ProjectMetadata,Metadata>
      Parameters:
      source - the source domain model
      result - the destination REST resource
    • convert Link icon

      public List<Metadata> convert(List<com.aquima.interactions.portal.ds.ProjectMetadata> source)
      Description copied from interface: IResourceConverter
      Converts multiple source domain models into destination REST resources. Also adds HATEOAS links to all converted resources.
      Specified by:
      convert in interface IResourceConverter<com.aquima.interactions.portal.ds.ProjectMetadata,Metadata>
      Parameters:
      source - a list of domain models, must not be null
      Returns:
      list of converted REST resources, never null