Package com.glowmart.shop_management.api
Class ProductAPI
java.lang.Object
com.glowmart.shop_management.api.ProductAPI
A utility class that contains constants for API endpoint paths related to product operations.
This class defines static final strings representing the paths for product-related API endpoints, such as creating, updating, deleting, and retrieving products. These constants ensure consistency across the application and prevent hardcoding of endpoint paths.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe base path for all product-related API endpoints.static final StringThe path for retrieving a product by its unique identifier.static final StringThe path for creating a new product.static final StringThe path for deleting a product.static final StringThe path for updating an existing product. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
BASE_PATH
The base path for all product-related API endpoints.All product endpoints are prefixed with this value (e.g., "/api/product/create").
- See Also:
-
PRODUCT_CREATE
The path for creating a new product.This endpoint accepts product details in the request body and persists them.
- See Also:
-
PRODUCT_UPDATE
The path for updating an existing product.This endpoint requires the product ID as a path variable (e.g., "/api/product/update/10").
- See Also:
-
PRODUCT_DELETE
The path for deleting a product.This endpoint requires the product ID as a path variable (e.g., "/api/product/delete/10").
- See Also:
-
PRODUCT_BY_ID
The path for retrieving a product by its unique identifier.This endpoint requires a product ID parameter to fetch the corresponding product.
- See Also:
-
-
Constructor Details
-
ProductAPI
public ProductAPI()
-