Interface CdsResourcePath

All Superinterfaces:
Comparable<CdsResourcePath>

public interface CdsResourcePath extends Comparable<CdsResourcePath>
A CdsResourcePath describes the hierarchical structure of a resource along with additional meta information.
  • Method Details

    • getPath

      String getPath()
      The path including the resource's base path.
      Returns:
      The path of the resource endpoint
    • isPublic

      boolean isPublic()
      If true, the endpoint should be exposed to public, i.e. without authentication
      Returns:
      true if public
    • publicEvents

      Stream<String> publicEvents()
      A Stream of events that are public even if isPublic()==false.
      Returns:
      The stream of public events
    • subPaths

      Stream<CdsResourcePath> subPaths()
      A Stream of child paths.
      Returns:
      The child ResourcePaths
    • getCdsDefinition

      com.sap.cds.reflect.CdsDefinition getCdsDefinition()
      Returns the CDS model element attached to the resource
      Returns:
      The CDS model element
    • hasType

      default <T extends com.sap.cds.reflect.CdsDefinition> boolean hasType(Class<T> clazz)
      Checks if the referred CdsDefinition given with getCdsDefinition() is of given type.
      Type Parameters:
      T - The type parameter
      Parameters:
      clazz - The type to be checked
      Returns:
      true if the type matches the referred object
    • compareTo

      default int compareTo(CdsResourcePath o)
      Specified by:
      compareTo in interface Comparable<CdsResourcePath>