Class ProductAPI

java.lang.Object
com.glowmart.shop_management.api.ProductAPI

public final class ProductAPI extends Object
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 Details

    • BASE_PATH

      public static final String 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

      public static final String 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

      public static final String 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

      public static final String 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

      public static final String 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()