Class CdsResourcePathBuilder

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

public class CdsResourcePathBuilder extends Object
A builder for creating CdsResourcePaths conveniently.
  • Constructor Details

    • CdsResourcePathBuilder

      public CdsResourcePathBuilder()
  • Method Details

    • cds

      public static CdsResourcePathBuilder cds(com.sap.cds.reflect.CdsDefinition cdsDefinition)
    • path

      public CdsResourcePathBuilder path(String... paths)
      Sets the path of the resource.
      Parameters:
      paths - The path parts
      Returns:
      The builder
    • isPublic

      public CdsResourcePathBuilder isPublic(boolean isPublic)
      Specifies if the current path should be public accessible
      Parameters:
      isPublic - if true the path should be accessible for public
      Returns:
      The builder
    • publicEvents

      public CdsResourcePathBuilder publicEvents(Stream<String> publicEvents)
      Specifies public events. Makes only sense for non-public endpoints.
      Parameters:
      publicEvents - The public events
      Returns:
      The builder
    • subPath

      public CdsResourcePathBuilder subPath(CdsResourcePath subPath)
      Adds a new CdsResourcePath as child of the current path.
      Parameters:
      subPath - The sub path to be added
      Returns:
      The builder
    • subPaths

      public CdsResourcePathBuilder subPaths(Stream<CdsResourcePath> subPaths)
      Adds new CdsResourcePaths as children of the current path.
      Parameters:
      subPaths - The sub paths to be added
      Returns:
      The builder
    • build

      public CdsResourcePath build()
      Finally constructs the CdsResourcePath
      Returns:
      The constructed CdsResourcePath