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

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


        SecurityContextHolder.getContext().setAuthentication(authentication);
    }

    @Before
    public void setupSMTP() throws Exception {
        SyncopeConf smtpHostConf = confDAO.find("smtp.host");
        smtpHostConf.setValue(smtpHost);
        confDAO.save(smtpHostConf);

        SyncopeConf smtpPortConf = confDAO.find("smtp.port");
        smtpPortConf.setValue(Integer.toString(smtpPort));
        confDAO.save(smtpPortConf);
        confDAO.flush();
    }
View Full Code Here


        userTO.addMembership(membershipTO);

        userController.create(new MockHttpServletResponse(), userTO);

        // 3. Set number of retries
        SyncopeConf retryConf = confDAO.find("notification.maxRetries");
        retryConf.setValue("5");
        confDAO.save(retryConf);
        confDAO.flush();

        // 4. Stop mail server to force error sending mail
        stopGreenMail();

        // 5. force Quartz job execution multiple times
        for (int i = 0; i < 10; i++) {
            notificationJob.execute(null);
        }

        // 6. get NotificationTask, count number of executions
        NotificationTask foundTask = null;
        for (NotificationTask task : taskDAO.findAll(NotificationTask.class)) {
            if (sender.equals(task.getSender())) {
                foundTask = task;
            }
        }
        assertNotNull(foundTask);
        assertEquals(6, notificationManager.countExecutionsWithStatus(foundTask.getId(),
                NotificationJob.Status.NOT_SENT.name()));

        // 7. start mail server again
        startGreenMail();

        // 8. reset number of retries
        retryConf.setValue("0");
        confDAO.save(retryConf);
        confDAO.flush();
    }
View Full Code Here

            if (user != null) {
                if (user.isSuspended() != null && user.isSuspended()) {
                    throw new DisabledException("User " + user.getUsername() + " is suspended");
                }

                SyncopeConf authStatuses = confDAO.find("authentication.statuses", null);
                if (authStatuses != null) {
                    String[] statuses = authStatuses.getValue().split("\\|");
                    if (!ArrayUtils.contains(statuses, user.getStatus())) {
                        throw new DisabledException("User " + user.getUsername() + " not allowed to authenticate");
                    }
                }
View Full Code Here

        }
        if (localConnIdLocation == null) {
            throw new IllegalArgumentException("No local ConnId location was found, aborting");
        }

        SyncopeConf cipher = confDAO.find("password.cipher.algorithm");
        if ("MD5".equals(cipher.getValue())) {
            cipher.setValue(CipherAlgorithm.SMD5.name());
        }

        return localConnIdLocation.toString();
    }
View Full Code Here

            if (user != null) {
                if (user.isSuspended() != null && user.isSuspended()) {
                    throw new DisabledException("User " + user.getUsername() + " is suspended");
                }

                SyncopeConf authStatuses = confDAO.find("authentication.statuses", null);
                if (authStatuses != null) {
                    String[] statuses = authStatuses.getValue().split("\\|");
                    if (!ArrayUtils.contains(statuses, user.getStatus())) {
                        throw new DisabledException("User " + user.getUsername() + " not allowed to authenticate");
                    }
                }
View Full Code Here

        SecurityContextHolder.getContext().setAuthentication(authentication);
    }

    @Before
    public void setupSMTP() throws Exception {
        SyncopeConf smtpHostConf = confDAO.find("smtp.host");
        smtpHostConf.setValue(smtpHost);
        confDAO.save(smtpHostConf);

        SyncopeConf smtpPortConf = confDAO.find("smtp.port");
        smtpPortConf.setValue(Integer.toString(smtpPort));
        confDAO.save(smtpPortConf);
        confDAO.flush();
    }
View Full Code Here

        userTO.addMembership(membershipTO);

        userController.create(new MockHttpServletResponse(), userTO);

        // 3. Set number of retries
        SyncopeConf retryConf = confDAO.find("notification.maxRetries");
        retryConf.setValue("5");
        confDAO.save(retryConf);
        confDAO.flush();

        // 4. Stop mail server to force error sending mail
        stopGreenMail();

        // 5. force Quartz job execution multiple times
        for (int i = 0; i < 10; i++) {
            notificationJob.execute(null);
        }

        // 6. get NotificationTask, count number of executions
        NotificationTask foundTask = null;
        for (NotificationTask task : taskDAO.findAll(NotificationTask.class)) {
            if (sender.equals(task.getSender())) {
                foundTask = task;
            }
        }
        assertNotNull(foundTask);
        assertEquals(6, notificationManager.countExecutionsWithStatus(foundTask.getId(),
                NotificationJob.Status.NOT_SENT.name()));

        // 7. start mail server again
        startGreenMail();

        // 8. reset number of retries
        retryConf.setValue("0");
        confDAO.save(retryConf);
        confDAO.flush();
    }
View Full Code Here

        SecurityContextHolder.getContext().setAuthentication(authentication);
    }

    @Before
    public void setupSMTP() throws Exception {
        SyncopeConf smtpHostConf = confDAO.find("smtp.host");
        smtpHostConf.setValue(smtpHost);
        confDAO.save(smtpHostConf);

        SyncopeConf smtpPortConf = confDAO.find("smtp.port");
        smtpPortConf.setValue(Integer.toString(smtpPort));
        confDAO.save(smtpPortConf);
        confDAO.flush();
    }
View Full Code Here

        userTO.addMembership(membershipTO);

        userController.create(new MockHttpServletResponse(), userTO);

        // 3. Set number of retries
        SyncopeConf retryConf = confDAO.find("notification.maxRetries");
        retryConf.setValue("5");
        confDAO.save(retryConf);
        confDAO.flush();

        // 4. Stop mail server to force error sending mail
        stopGreenMail();

        // 5. force Quartz job execution multiple times
        for (int i = 0; i < 10; i++) {
            notificationJob.execute(null);
        }

        // 6. get NotificationTask, count number of executions
        NotificationTask foundTask = null;
        for (NotificationTask task : taskDAO.findAll(NotificationTask.class)) {
            if (sender.equals(task.getSender())) {
                foundTask = task;
            }
        }
        assertNotNull(foundTask);
        assertEquals(6, notificationManager.countExecutionsWithStatus(foundTask.getId(),
                NotificationJob.Status.NOT_SENT.name()));

        // 7. start mail server again
        startGreenMail();

        // 8. reset number of retries
        retryConf.setValue("0");
        confDAO.save(retryConf);
        confDAO.flush();
    }
View Full Code Here

    @Autowired
    private UserRequestDataBinder binder;

    public Boolean isCreateAllowedByConf() {
        final SyncopeConf createRequestAllowed = confDAO.find("createRequest.allowed", "false");

        return Boolean.valueOf(createRequestAllowed.getValue());
    }
View Full Code Here

TOP

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

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.