Class CdsServicePath

java.lang.Object
com.sap.cds.services.utils.path.CdsServicePath

public class CdsServicePath extends Object
Provides a stream of CdsResourcePaths which are exposed by the ApplicationServices of a ServiceCatalog
  • Constructor Details

    • CdsServicePath

      public CdsServicePath()
  • Method Details

    • servicePaths

      public static Stream<CdsResourcePath> servicePaths(CdsRuntime runtime, String protocol)
      Creates a Stream of CdsResourcePath instances containing the paths of all exposed ApplicationServices given in the ServiceCatalog and configuration. Path in the configuration or annotations in the CDS service model are regarded with priority and override default paths reflecting the full qualified name of the service.
      Parameters:
      runtime - The CdsRuntime, containing the ServiceCatalog with all ApplicationServices
      protocol - The protocol adapter for which these paths should be determined
      Returns:
      A Stream of all CdsResourcePath instances of the given protocol adapter
    • basePaths

      public static Map<String,ApplicationService> basePaths(CdsRuntime runtime, String protocol)
      Creates a map of the base paths of each exposed service to their respective ApplicationService instance. The base paths are calculated for the given protocol adapter.
      Parameters:
      runtime - The CdsRuntime, containing the ServiceCatalog with all ApplicationServices
      protocol - The protocol adapter for which these paths should be determined
      Returns:
      A map of base paths to their ApplicationService