Package org.apache.syncope.core.persistence.beans

Examples of org.apache.syncope.core.persistence.beans.UserRequest


        final UserRequestTO result;

        if (ArrayUtils.isNotEmpty(obj) && obj[0] instanceof Long
                && ("deleteRequest".equals(method.getName()) || "read".equals(method.getName()))) {

            UserRequest request = userRequestDAO.find((Long) obj[0]);
            result = request == null ? null : binder.getUserRequestTO(request);
        } else {
            result = null;
        }
View Full Code Here


            dataBinder.testCreate(userTO);
        } catch (RollbackException e) {
            LOG.debug("Testing create - ignore exception");
        }

        UserRequest request = new UserRequest();
        request.setUserTO(userTO);
        request = userRequestDAO.save(request);

        auditManager.audit(Category.userRequest, UserRequestSubCategory.create, Result.success,
                "Successfully created user request for " + request.getUserTO().getUsername());

        return dataBinder.getUserRequestTO(request);
    }
View Full Code Here

            dataBinder.testUpdate(userMod);
        } catch (RollbackException e) {
            LOG.debug("Testing update - ignore exception");
        }

        UserRequest request = new UserRequest();
        request.setUserMod(userMod);
        request = userRequestDAO.save(request);

        auditManager.audit(Category.userRequest, UserRequestSubCategory.update, Result.success,
                "Successfully updated user request for " + request.getUserMod().getUsername());

        return dataBinder.getUserRequestTO(request);
    }
View Full Code Here

            dataBinder.testDelete(userId);
        } catch (RollbackException e) {
            LOG.debug("Testing delete - ignore exception");
        }

        UserRequest request = new UserRequest();
        request.setUserId(userId);
        request = userRequestDAO.save(request);

        auditManager.audit(Category.userRequest, UserRequestSubCategory.delete, Result.success,
                "Successfully deleted user request for user" + userId);
View Full Code Here

    @PreAuthorize("hasRole('USER_REQUEST_READ')")
    @RequestMapping(method = RequestMethod.GET, value = "/read/{requestId}")
    @Transactional(readOnly = true)
    public UserRequestTO read(@PathVariable("requestId") final Long requestId) throws NotFoundException {
        UserRequest request = userRequestDAO.find(requestId);
        if (request == null) {
            throw new NotFoundException("User request " + requestId);
        }

        auditManager.audit(Category.userRequest, UserRequestSubCategory.read, Result.success,
                "Successfully read user request for " + request.getUserTO().getUsername());

        return dataBinder.getUserRequestTO(request);
    }
View Full Code Here

    }

    @PreAuthorize("hasRole('USER_REQUEST_DELETE')")
    @RequestMapping(method = RequestMethod.GET, value = "/deleteRequest/{requestId}")
    public UserRequestTO deleteRequest(@PathVariable("requestId") final Long requestId) throws NotFoundException {
        UserRequest request = userRequestDAO.find(requestId);
        if (request == null) {
            throw new NotFoundException("User request " + requestId);
        }

        UserRequestTO requestToDelete = dataBinder.getUserRequestTO(request);

        auditManager.audit(Category.userRequest, UserRequestSubCategory.delete, Result.success,
                "Successfully deleted user request for user" + request.getUserId());

        userRequestDAO.delete(requestId);

        return requestToDelete;
    }
View Full Code Here

            dataBinder.testCreate(userTO);
        } catch (RollbackException e) {
            LOG.debug("Testing create - ignore exception");
        }

        UserRequest request = new UserRequest();
        request.setUserTO(userTO);
        request = userRequestDAO.save(request);

        auditManager.audit(Category.userRequest, UserRequestSubCategory.create, Result.success,
                "Successfully created user request for " + request.getUserTO().getUsername());

        return dataBinder.getUserRequestTO(request);
    }
View Full Code Here

            dataBinder.testUpdate(userMod);
        } catch (RollbackException e) {
            LOG.debug("Testing update - ignore exception");
        }

        UserRequest request = new UserRequest();
        request.setUserMod(userMod);
        request = userRequestDAO.save(request);

        auditManager.audit(Category.userRequest, UserRequestSubCategory.update, Result.success,
                "Successfully updated user request for " + request.getUserMod().getUsername());

        return dataBinder.getUserRequestTO(request);
    }
View Full Code Here

    @PreAuthorize("hasRole('USER_REQUEST_READ')")
    @RequestMapping(method = RequestMethod.GET, value = "/read/{requestId}")
    @Transactional(readOnly = true)
    public UserRequestTO read(@PathVariable("requestId") final Long requestId) throws NotFoundException {

        UserRequest request = userRequestDAO.find(requestId);
        if (request == null) {
            throw new NotFoundException("User request " + requestId);
        }

        auditManager.audit(Category.userRequest, UserRequestSubCategory.read, Result.success,
                "Successfully read user request for " + request.getUserTO().getUsername());

        return dataBinder.getUserRequestTO(request);
    }
View Full Code Here

            dataBinder.testDelete(userId);
        } catch (RollbackException e) {
            LOG.debug("Testing delete - ignore exception");
        }

        UserRequest request = new UserRequest();
        request.setUserId(userId);
        request = userRequestDAO.save(request);

        auditManager.audit(Category.userRequest, UserRequestSubCategory.delete, Result.success,
                "Successfully deleted user request for user" + userId);
View Full Code Here

TOP

Related Classes of org.apache.syncope.core.persistence.beans.UserRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.