You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -106,21 +106,21 @@ The `libak_RestFramework` class provides a structured framework for building RES
106
106
107
107
## `Interfaces`
108
108
109
-
### libak_RestFramework.IRestResponse
109
+
### libak_IRestResponse
110
110
111
-
The `libak_RestFramework.IRestResponse` interface defines a method for sending REST responses.
111
+
The `libak_IRestResponse` interface defines a method for sending REST responses.
112
112
113
113
-`sendResponse(): void`: Sends the REST response.
114
114
115
-
### libak_RestFramework.IErrorResponseFactory
115
+
### libak_IErrorResponseFactory
116
116
117
-
The `libak_RestFramework.IErrorResponseFactory` interface defines a method for creating error responses.
117
+
The `libak_IErrorResponseFactory` interface defines a method for creating error responses.
118
118
119
-
-`newErrorRestResponse(Exception exc): libak_RestFramework.IRestResponse`: Creates a new error response based on the given exception.
119
+
-`newErrorRestResponse(Exception exc): libak_IRestResponse`: Creates a new error response based on the given exception.
120
120
121
-
### libak_RestFramework.IRestLogger
121
+
### libak_IRestLogger
122
122
123
-
The `libak_RestFramework.IRestLogger` interface defines methods for logging REST-related information.
123
+
The `libak_IRestLogger` interface defines methods for logging REST-related information.
124
124
125
125
-`addErrorDetails(Exception exc): void`: Adds error details to the logger.
126
126
-`createLog(): void`: Creates a log.
@@ -172,7 +172,7 @@ Processes the incoming REST request by handling different HTTP methods and manag
172
172
173
173
This method is the entry point for processing incoming REST requests. It dynamically dispatches the request to the appropriate handler based on the HTTP method (GET, POST, PUT, PATCH, DELETE). If an unsupported HTTP method is received, it throws a `libak_RestFramework.MethodNotAllowedException`.
174
174
175
-
- Returns: An instance of `libak_RestFramework.IRestResponse` representing the response to the REST request.
175
+
- Returns: An instance of `libak_IRestResponse` representing the response to the REST request.
176
176
- Throws: `libak_RestFramework.MethodNotAllowedException` - If the incoming HTTP method is not supported for this resource.
177
177
178
178
#### `useUriTemplate(String uriTemplate)`
@@ -191,20 +191,20 @@ Sets the REST request for this `libak_RestProcessor`. The REST request contains
191
191
-`request` (RestRequest): The `RestRequest` object representing the incoming HTTP request.
192
192
- Returns: The current `libak_RestProcessor` instance with the specified REST request set.
Creates a new `libak_RestProcessor` instance for handling the incoming REST request with a custom error response factory and REST logger. This method dynamically selects the appropriate `libak_RestProcessor` based on the requested URI.
306
306
307
307
- Parameters:
308
308
-`request` (RestRequest): The `RestRequest` object representing the incoming HTTP request.
309
-
-`errorResponseFactory` (libak_RestFramework.IErrorResponseFactory): The custom error response factory to use for generating error responses.
310
-
-`restLogger` (libak_RestFramework.IRestLogger): The custom REST logger to use for logging REST-related information.
309
+
-`errorResponseFactory` (libak_IErrorResponseFactory): The custom error response factory to use for generating error responses.
310
+
-`restLogger` (libak_IRestLogger): The custom REST logger to use for logging REST-related information.
311
311
- Returns: A new `libak_RestProcessor` instance configured to handle the specified REST request with custom error handling and logging.
312
312
- Throws: `libak_RestFramework.InvalidUriException` - If the requested URI does not match any defined routes.
313
313
@@ -497,5 +497,4 @@ Sends the error response with the configured status code, summary, and details.
497
497
## `Custom Exceptions`
498
498
499
499
-`libak_RestFramework.InvalidUriException`: Exception class for invalid URIs.
500
-
-`libak_RestFramework.NotFoundException`: Exception class for not found resources.
501
500
-`libak_RestFramework.MethodNotAllowedException`: Exception class for unsupported HTTP methods.
Copy file name to clipboardExpand all lines: Developer_Guide.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,7 +169,7 @@ Here is a few things you have to consider about it:
169
169
- PATCH -> handlePatch()
170
170
- DELETE -> handleDelete()
171
171
172
-
All these methods have to return the `libak_RestFramework.IRestResponse`.
172
+
All these methods have to return the `libak_IRestResponse`.
173
173
- the `libak_RestProcessor` provides set of methods to easily get access to URI params, query params, and headers:
174
174
- `getUriParam(String paramName)` - remember about the colon character `:` we saw in the routes? It allows us to use those "variable" names to take the proper URI param like this: `this.getUriParam('customer_sf_id')`
175
175
- `getQueryParam(String paramName)`
@@ -180,7 +180,7 @@ Now we know good enough at this stage to prepare our Rest Processors
180
180
```java
181
181
// Here you can see there is no pagination implementation. We will add it later to show the versioning functionality.
0 commit comments