Package com.sap.cds.services.utils.path
Class CdsResourcePathBuilder
java.lang.Object
com.sap.cds.services.utils.path.CdsResourcePathBuilder
A builder for creating
CdsResourcePaths conveniently.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finally constructs theCdsResourcePathstatic CdsResourcePathBuildercds(com.sap.cds.reflect.CdsDefinition cdsDefinition) isPublic(boolean isPublic) Specifies if the current path should be public accessibleSets the path of the resource.publicEvents(Stream<String> publicEvents) Specifies public events.subPath(CdsResourcePath subPath) Adds a newCdsResourcePathas child of the current path.subPaths(Stream<CdsResourcePath> subPaths) Adds newCdsResourcePaths as children of the current path.
-
Constructor Details
-
CdsResourcePathBuilder
public CdsResourcePathBuilder()
-
-
Method Details
-
cds
-
path
Sets the path of the resource.- Parameters:
paths- The path parts- Returns:
- The builder
-
isPublic
Specifies if the current path should be public accessible- Parameters:
isPublic- iftruethe path should be accessible for public- Returns:
- The builder
-
publicEvents
Specifies public events. Makes only sense for non-public endpoints.- Parameters:
publicEvents- The public events- Returns:
- The builder
-
subPath
Adds a newCdsResourcePathas child of the current path.- Parameters:
subPath- The sub path to be added- Returns:
- The builder
-
subPaths
Adds newCdsResourcePaths as children of the current path.- Parameters:
subPaths- The sub paths to be added- Returns:
- The builder
-
build
Finally constructs theCdsResourcePath- Returns:
- The constructed
CdsResourcePath
-