Class PdpUXController

java.lang.Object
com.skava.merchandise.web.PdpUXController

@RestController public class PdpUXController extends Object
This class is used to control pdpUX API operations.
Author:
Infosys Equinox
  • Constructor Details

  • Method Details

    • createPdpUX

      @ResponseStatus(CREATED) @PostMapping("/projects/{projectId}/pdpux") @PreAuthorize("hasPrivilegeForServiceAndCollection(\'merchandise/create/category\', \'merchandise\', #collectionId)") @Audit public org.springframework.http.ResponseEntity<Category> createPdpUX(@RequestHeader(value="x-collection-id",required=true) long collectionId, @RequestHeader(value="x-version",required=false,defaultValue="8.19.7") String versionId, @RequestHeader(value="x-auth-token",required=true) String authToken, @PathVariable(required=true) String projectId, @RequestBody(required=true) PdpUXRequest request, @RequestParam(value="locale",required=false,defaultValue="en_US") @IgnoreAudit String locale)
      This method is used to create Category based on given CategoryRequest.
      Parameters:
      collectionId - This field holds a valid collection identifier of this micro service and requested operation will be performed on this collection.
      versionId - This fields holds the valid identifier of a version, newly creating category will be created under this version.
      authToken - This field holds a valid authorization token generated using the Authorization micro service for an user.Auth token (JWT format) represents claims containing roles and privileges of the user accessing this API. JSON Web Token.
      projectId - This field holds a valid project identifier of this micro service and requested operation will be performed on this project.
      request - CategoryRequest
      locale - API Response and error messages will be responded in the mentioned locale.
      Returns:
      Category
    • findAllPdpUX

      @ResponseStatus(OK) @GetMapping("/projects/{projectId}/pdpux") @PreAuthorize("hasRoleForBusinessByCollectionId(\'ROLE_GUEST\', #collectionId) or hasRoleForBusinessByCollectionId(\'ROLE_REG_USER\', #collectionId) or hasPrivilegeForServiceAndCollection(\'merchandise/view/category\', \'merchandise\', #collectionId)") @Audit public org.springframework.http.ResponseEntity<CategoriesResponse> findAllPdpUX(@RequestHeader(value="x-collection-id",required=true) long collectionId, @RequestHeader(value="x-auth-token",required=true) String authToken, @RequestHeader(value="x-version",required=false,defaultValue="8.19.7") String versionId, @PathVariable(required=true) String projectId, @RequestParam(required=false) com.skava.core.qdsl.sort.EcomSorts sort, @RequestParam(required=false) String filters, @RequestParam(required=false,defaultValue="1") int page, @RequestParam(required=false,defaultValue="10") int size, @RequestParam(value="locale",required=false) @IgnoreAudit String locale)
      This method is used to find all Categories based on given collectionId/Filters.
      Parameters:
      collectionId - This field holds a valid collection identifier of this micro service and requested operation will be performed on this collection.
      projectId - This field holds a valid project identifier of this micro service and requested operation will be performed on this project.
      authToken - This field holds a valid authorization token generated using the Authorization micro service for an user.Auth token (JWT format) represents claims containing roles and privileges of the user accessing this API. JSON Web Token.
      versionId - This fields holds the valid identifier of a version. categories are found under a version
      sort - It contains the parameters for sorting like which field and in which order to be sorted. Example Format : {"sort":[{"field":"status","direction":"ASC"}, {"field":"status","direction":"DESC"}]}
      filters - This field holds the simple query criteria (can be multiple) based on the available fields to filter and return results.
      page - This parameter will be available for all the services that supports pagination. This parameter is used to mention the starting index of the items which going to responded by the API.
      size - This parameter will be available for all the services that supports pagination. This parameter is used to mention the number of maximum items that needs to be responded for the request.
      locale - API Response and error messages will be responded in the mentioned locale.
      Returns:
      CategoriesResponse.
    • getPdpUXById

      @ResponseStatus(OK) @GetMapping("/projects/{projectId}/pdpux/{pdpuxid}") @PreAuthorize("hasPrivilegeForServiceAndCollection(\'merchandise/view/category\', \'merchandise\', #collectionId)") @Audit public org.springframework.http.ResponseEntity<Category> getPdpUXById(@RequestHeader(value="x-collection-id",required=true) long collectionId, @RequestHeader(value="x-auth-token",required=true) String authToken, @RequestHeader(value="x-version",required=false,defaultValue="8.19.7") String versionId, @PathVariable(required=true) String projectId, @PathVariable(value="pdpuxid",required=true) String categoryId, @RequestParam(value="locale",required=false) @IgnoreAudit String locale)
      This method is used to loads a Category based on given Id.
      Parameters:
      collectionId - This field holds a valid collection identifier of this micro service and requested operation will be performed on this collection.
      projectId - This field holds a valid project identifier of this micro service and requested operation will be performed on this project.
      authToken - This field holds a valid authorization token generated using the Authorization micro service for an user.Auth token (JWT format) represents claims containing roles and privileges of the user accessing this API. JSON Web Token.
      versionId - This fields holds the valid identifier of a version. categories are found under a version.
      categoryId - It Holds the identifier of a category which to be found.
      locale - API Response and error messages will be responded in the mentioned locale.
      Returns:
      Category.
    • getPdpUXHierarchyById

      @ResponseStatus(OK) @GetMapping("/projects/{projectId}/pdpux/{pdpuxid}/hierarchies") @PreAuthorize("hasRoleForBusinessByCollectionId(\'ROLE_GUEST\', #collectionId) or hasRoleForBusinessByCollectionId(\'ROLE_REG_USER\', #collectionId) or hasPrivilegeForServiceAndCollection(\'merchandise/view/category\', \'merchandise\', #collectionId)") @Audit public org.springframework.http.ResponseEntity<CategoryHierarchy> getPdpUXHierarchyById(@RequestHeader(value="x-collection-id",required=true) long collectionId, @RequestHeader(value="x-auth-token",required=true) String authToken, @RequestHeader(value="x-version",required=false,defaultValue="8.19.7") String versionId, @PathVariable(required=true) String projectId, @PathVariable(value="pdpuxid",required=true) String categoryId, @RequestParam(required=false,defaultValue="-1") int level, @RequestParam(required=false,defaultValue="false") boolean includeParent, @RequestParam(value="locale",required=false) @IgnoreAudit String locale)
      This method is used to update a Category based on given Id.
      Parameters:
      collectionId - This field holds a valid collection identifier of this micro service and requested operation will be performed on this collection.
      projectId - This field holds a valid project identifier of this micro service and requested operation will be performed on this project.
      authToken - This field holds a valid authorization token generated using the Authorization micro service for an user.Auth token (JWT format) represents claims containing roles and privileges of the user accessing this API. JSON Web Token.
      versionId - This fields holds the valid identifier of a version. categories are found under a version.
      categoryId - It Holds the identifier of a category which to be found.
      level - It indicates the number of level categories to be retrieved.
      includeParent - It holds a boolean value which indicates whether or not include parent.
      locale - API Response and error messages will be responded in the mentioned locale.
      Returns:
      Category.
    • deletePdpUX

      @ResponseStatus(OK) @DeleteMapping("/projects/{projectId}/pdpux/{pdpuxid}") @PreAuthorize("hasPrivilegeForServiceAndCollection(\'merchandise/delete/category\', \'merchandise\', #collectionId)") @Audit public org.springframework.http.ResponseEntity<com.skava.core.ResponseModel> deletePdpUX(@RequestHeader(value="x-collection-id",required=true) long collectionId, @RequestHeader(value="x-version",required=false,defaultValue="8.19.7") String versionId, @RequestHeader(value="x-auth-token",required=true) String authToken, @PathVariable(required=true) String projectId, @PathVariable(value="pdpuxid",required=true) String categoryId, @RequestParam(value="locale",required=false,defaultValue="en_US") @IgnoreAudit String locale)
      This method is used to delete Category based on given Id.
      Parameters:
      collectionId - This field holds a valid collection identifier of this micro service and requested operation will be performed on this collection.
      projectId - This field holds a valid project identifier of this micro service and requested operation will be performed on this project.
      authToken - This field holds a valid authorization token generated using the Authorization micro service for an user.Auth token (JWT format) represents claims containing roles and privileges of the user accessing this API. JSON Web Token.
      versionId - This fields holds the valid identifier of a version. categories are found under a version.
      categoryId - It Holds the identifier of a category which to be deleted.
      locale - API Response and error messages will be responded in the mentioned locale.
      Returns:
      Category.
    • updatePdpUx

      @ResponseStatus(OK) @PutMapping("/projects/{projectId}/pdpux/{pdpuxid}") @PreAuthorize("hasPrivilegeForServiceAndCollection(\'merchandise/update/category\', \'merchandise\', #collectionId) ") @Audit public org.springframework.http.ResponseEntity<Category> updatePdpUx(@RequestHeader(value="x-collection-id",required=true) long collectionId, @RequestHeader(value="x-version",required=false,defaultValue="8.19.7") String versionId, @RequestHeader(value="x-auth-token",required=true) String authToken, @PathVariable(required=true) String projectId, @PathVariable(value="pdpuxid",required=true) String categoryId, @RequestBody(required=true) PdpUXRequest request, @RequestParam(value="locale",required=false,defaultValue="en_US") @IgnoreAudit String locale)
      This method is used to update all field in Category based on given Id.
      Parameters:
      collectionId - This field holds a valid collection identifier of this micro service and requested operation will be performed on this collection.
      projectId - This field holds a valid project identifier of this micro service and requested operation will be performed on this project.
      authToken - This field holds a valid authorization token generated using the Authorization micro service for an user.Auth token (JWT format) represents claims containing roles and privileges of the user accessing this API. JSON Web Token.
      versionId - This fields holds the valid identifier of a version. categories are found under a version.
      categoryId - It Holds the identifier of a category which to be deleted.
      request - CategoryRequest.
      locale - API Response and error messages will be responded in the mentioned locale.
      Returns:
      Category.
    • patchUpdatePdpUX

      @ResponseStatus(OK) @PatchMapping("/projects/{projectId}/pdpux/{pdpuxid}") @PreAuthorize("hasPrivilegeForServiceAndCollection(\'merchandise/update/category\', \'merchandise\', #collectionId)") @Audit public org.springframework.http.ResponseEntity<Category> patchUpdatePdpUX(@RequestHeader(value="x-collection-id",required=true) long collectionId, @RequestHeader(value="x-version",required=false,defaultValue="8.19.7") String versionId, @RequestHeader(value="x-auth-token",required=true) String authToken, @PathVariable(required=true) String projectId, @PathVariable(value="pdpuxid",required=true) String categoryId, @RequestBody(required=true) PdpUXRequest request, @RequestParam(value="locale",required=false,defaultValue="en_US") @IgnoreAudit String locale)
      This method is used to update all or required fields in Category based on givenId and request..
      Parameters:
      collectionId - This field holds a valid collection identifier of this micro service and requested operation will be performed on this collection.
      projectId - This field holds a valid project identifier of this micro service and requested operation will be performed on this project.
      authToken - This field holds a valid authorization token generated using the Authorization micro service for an user.Auth token (JWT format) represents claims containing roles and privileges of the user accessing this API. JSON Web Token.
      versionId - This fields holds the valid identifier of a version. categories are found under a version.
      categoryId - It Holds the identifier of a category which to be deleted.
      request - CategoryRequest.
      locale - API Response and error messages will be responded in the mentioned locale.
      Returns:
      Category.
    • initBinder

      @InitBinder public void initBinder(org.springframework.web.bind.WebDataBinder webDataBinder)
      InitBinder binds the web request parameter to attribute.
      Parameters:
      webDataBinder - parameter required for binding category.