Class Builders
- java.lang.Object
-
- org.apache.sling.api.request.builder.Builders
-
public final class Builders extends java.lang.Object
Creates builders.- Since:
- 1.0 (Sling API Bundle 2.24.0)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull SlingHttpServletRequestBuilder
newRequestBuilder(@NotNull Resource resource)
Creates a new request builder.static @NotNull RequestParameter
newRequestParameter(java.lang.String name, java.lang.String value)
Creates a new request parameterstatic @NotNull RequestParameter
newRequestParameter(java.lang.String name, java.lang.String value, java.nio.charset.Charset encoding)
Creates a new request parameterstatic @NotNull RequestProgressTracker
newRequestProgressTracker()
Creates a new request progress trackerstatic @NotNull SlingHttpServletResponseBuilder
newResponseBuilder()
Creates a new response builder.
-
-
-
Method Detail
-
newRequestBuilder
@NotNull public static @NotNull SlingHttpServletRequestBuilder newRequestBuilder(@NotNull @NotNull Resource resource)
Creates a new request builder.- Parameters:
resource
- the resource on which the request is based- Returns:
- a request builder
- Throws:
java.lang.IllegalArgumentException
- If resource isnull
-
newResponseBuilder
@NotNull public static @NotNull SlingHttpServletResponseBuilder newResponseBuilder()
Creates a new response builder.- Returns:
- a response builder
-
newRequestProgressTracker
@NotNull public static @NotNull RequestProgressTracker newRequestProgressTracker()
Creates a new request progress tracker- Returns:
- a request progress tracker
- Since:
- 1.1 (Sling API Bundle 2.25.0)
-
newRequestParameter
@NotNull public static @NotNull RequestParameter newRequestParameter(java.lang.String name, java.lang.String value)
Creates a new request parameter- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
- a request parameter
- Since:
- 1.2 (Sling API Bundle 2.26.2)
-
newRequestParameter
@NotNull public static @NotNull RequestParameter newRequestParameter(java.lang.String name, java.lang.String value, java.nio.charset.Charset encoding)
Creates a new request parameter- Parameters:
name
- the parameter namevalue
- the parameter valueencoding
- the charset of the value- Returns:
- a request parameter
- Since:
- 1.2 (Sling API Bundle 2.26.2)
-
-