Class UrlResourcePathBuilder

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

public class UrlResourcePathBuilder extends Object
A builder for creating UrlResourcePaths conveniently.
  • Constructor Details

    • UrlResourcePathBuilder

      public UrlResourcePathBuilder()
  • Method Details

    • path

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

      public UrlResourcePathBuilder 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
    • recursive

      public UrlResourcePathBuilder recursive()
      Specifies that the current path includes all sub paths
      Returns:
      The builder
    • directory

      public UrlResourcePathBuilder directory()
      Specifies that the current path includes all endpoints in the directory
      Returns:
      The builder
    • publicEvents

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

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

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

      public UrlResourcePath build()
      Finally constructs the ResourcePath
      Returns:
      The constructed ResourcePath