Class CategoryService

java.lang.Object
com.mt.ecommerce.product.service.CategoryService

@Service public class CategoryService extends Object
Service class for managing product categories. Provides methods for adding, updating, deleting, and retrieving categories.
  • Constructor Details

  • Method Details

    • addCategory

      public CategoryBO addCategory(CategoryBO categoryBO, String userName)
      Adds a new category.
      Parameters:
      categoryBO - the category information to add
      userName - the username of the user adding the category
      Returns:
      the added CategoryBO
    • getCategory

      public List<CategoryBO> getCategory(UUID vendorId, int pageNo, int size)
      Retrieves categories for a specific vendor with pagination.
      Parameters:
      vendorId - the ID of the vendor whose categories are to be retrieved
      pageNo - the page number for pagination
      size - the number of records per page
      Returns:
      a list of CategoryBO objects representing the vendor's categories
    • updateCategory

      public void updateCategory(CategoryBO categoryBO, String userName)
      Updates an existing category.
      Parameters:
      categoryBO - the category information to update
      userName - the username of the user updating the category
    • deleteCategory

      public void deleteCategory(UUID categoryId, UUID vendorId)
      Deletes a category.
      Parameters:
      categoryId - the ID of the category to delete
      vendorId - the ID of the vendor