Class UserEndpoint


  • @FrameworkRestController
    @FrameworkMapping("/users")
    public class UserEndpoint
    extends Object
    Endpoints for CRUD operations on User.
    Author:
    Samarth Dhruva (samarthd)
    • Method Detail

      • readAllUsers

        @FrameworkGetMapping
        @Policy(permissionRoots="AUTH_USER")
        public org.springframework.data.domain.Page<User> readAllUsers​(@PageableDefault(size=50)
                                                                       org.springframework.data.domain.Pageable page,
                                                                       @ContextOperation(READ)
                                                                       com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      • getUser

        @FrameworkGetMapping("/{id}")
        @Policy(permissionRoots="AUTH_USER")
        public User getUser​(@PathVariable("id")
                            String id,
                            @ContextOperation(READ)
                            com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      • createUser

        @FrameworkPostMapping
        @Policy(permissionRoots="AUTH_USER")
        public User createUser​(@RequestBody
                               User user,
                               @ContextOperation(CREATE)
                               com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      • replaceUser

        @FrameworkPutMapping("/{id}")
        @Policy(permissionRoots="AUTH_USER")
        public User replaceUser​(@PathVariable("id")
                                String id,
                                @RequestBody
                                User user,
                                @ContextOperation(UPDATE)
                                com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      • deleteUser

        @FrameworkDeleteMapping("/{id}")
        @Policy(permissionRoots="AUTH_USER")
        public void deleteUser​(@PathVariable("id")
                               String id,
                               @ContextOperation(DELETE)
                               com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      • resetPassword

        @FrameworkGetMapping("/{username}/reset-password")
        @Policy(permissionRoots="AUTH_USER")
        public void resetPassword​(@PathVariable("username")
                                  String username,
                                  @ContextOperation(UPDATE)
                                  com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)