Package org.apache.syncope.common.report

Examples of org.apache.syncope.common.report.UserReportletConf


    @Test
    public void update() {
        ReportTO report = new ReportTO();
        report.setName("testReportForUpdate" + getUUIDString());
        report.addReportletConf(new UserReportletConf("first"));
        report.addReportletConf(new UserReportletConf("second"));

        report = createReport(report);
        assertNotNull(report);
        assertEquals(2, report.getReportletConfs().size());

        report.addReportletConf(new UserReportletConf("last"));

        reportService.update(report.getId(), report);
        ReportTO updated = reportService.read(report.getId());
        assertNotNull(updated);
        assertEquals(3, updated.getReportletConfs().size());
View Full Code Here


    @Test
    public void delete() {
        ReportTO report = new ReportTO();
        report.setName("testReportForDelete" + getUUIDString());
        report.addReportletConf(new UserReportletConf("first"));
        report.addReportletConf(new UserReportletConf("second"));

        report = createReport(report);
        assertNotNull(report);

        reportService.delete(report.getId());
View Full Code Here

    @Test
    public void create() {
        ReportTO report = new ReportTO();
        report.setName("testReportForCreate" + getUUIDString());
        report.getReportletConfs().add(new UserReportletConf("first"));
        report.getReportletConfs().add(new UserReportletConf("second"));

        report = createReport(report);
        assertNotNull(report);

        ReportTO actual = reportService.read(report.getId());
View Full Code Here

    @Test
    public void update() {
        ReportTO report = new ReportTO();
        report.setName("testReportForUpdate" + getUUIDString());
        report.getReportletConfs().add(new UserReportletConf("first"));
        report.getReportletConfs().add(new UserReportletConf("second"));

        report = createReport(report);
        assertNotNull(report);
        assertEquals(2, report.getReportletConfs().size());

        report.getReportletConfs().add(new UserReportletConf("last"));

        reportService.update(report.getId(), report);
        ReportTO updated = reportService.read(report.getId());
        assertNotNull(updated);
        assertEquals(3, updated.getReportletConfs().size());
View Full Code Here

    @Test
    public void delete() {
        ReportTO report = new ReportTO();
        report.setName("testReportForDelete" + getUUIDString());
        report.getReportletConfs().add(new UserReportletConf("first"));
        report.getReportletConfs().add(new UserReportletConf("second"));

        report = createReport(report);
        assertNotNull(report);

        reportService.delete(report.getId());
View Full Code Here

    @Test
    public void reportletConfImplementations() throws IOException {
        ReportTO report = new ReportTO();
        report.setName("testReportForCreate");
        report.getReportletConfs().add(new UserReportletConf("first"));
        report.getReportletConfs().add(new UserReportletConf("second"));

        ObjectMapper mapper = new ObjectMapper();

        StringWriter writer = new StringWriter();
        mapper.writeValue(writer, report);
View Full Code Here

                    "SELECT id, serializedInstance FROM ReportletConfInstance");
            for (Map<String, Object> row : reportletConfs) {
                final String serializedInstance = (String) row.get("serializedInstance");
                if (StringUtils.isNotBlank(serializedInstance)) {
                    LOG.info("Upgrading ReportletConf {} serializedInstance", row.get("id"));
                    final UserReportletConf set = XMLDeserializer.<UserReportletConf>deserialize(serializedInstance);
                    final String newSerializedInst = POJOHelper.serialize(set);
                    jdbcTemplate.update("UPDATE ReportletConfInstance set serializedInstance = ? WHERE id = ?",
                            new Object[] { newSerializedInst, row.get("id") });
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.syncope.common.report.UserReportletConf

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.