Package com.sap.cds.services.utils.path
Class UrlResourcePathBuilder
java.lang.Object
com.sap.cds.services.utils.path.UrlResourcePathBuilder
A builder for creating
UrlResourcePaths conveniently.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finally constructs the ResourcePathSpecifies that the current path includes all endpoints in the directoryisPublic(boolean isPublic) Specifies if the current path should be public accessiblestatic UrlResourcePathBuilderSets the path of the resource.publicEvents(Stream<String> publicEvents) Specifies public events.Specifies that the current path includes all sub pathssubPath(UrlResourcePath subPath) Adds a newResourcePathas child of the current path.subPaths(Stream<UrlResourcePath> subPaths) Adds newResourcePaths as children of the current path.
-
Constructor Details
-
UrlResourcePathBuilder
public UrlResourcePathBuilder()
-
-
Method Details
-
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
-
recursive
Specifies that the current path includes all sub paths- Returns:
- The builder
-
directory
Specifies that the current path includes all endpoints in the directory- 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 newResourcePathas child of the current path.- Parameters:
subPath- The sub path to be added- Returns:
- The builder
-
subPaths
Adds newResourcePaths as children of the current path.- Parameters:
subPaths- The sub paths to be added- Returns:
- The builder
-
build
Finally constructs the ResourcePath- Returns:
- The constructed ResourcePath
-