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

Examples of org.apache.syncope.core.persistence.beans.role.RVirAttr


        switch (type) {
            case USER:
                result = (T) new UVirAttr();
                break;
            case ROLE:
                result = (T) new RVirAttr();
                break;
            case MEMBERSHIP:
                result = (T) new MVirAttr();
                break;
        }
View Full Code Here


        switch (type) {
            case USER:
                result = (T) new UVirAttr();
                break;
            case ROLE:
                result = (T) new RVirAttr();
                break;
            case MEMBERSHIP:
                result = (T) new MVirAttr();
                break;
        }
View Full Code Here

        switch (type) {
            case USER:
                result = (T) new UVirAttr();
                break;
            case ROLE:
                result = (T) new RVirAttr();
                break;
            case MEMBERSHIP:
                result = (T) new MVirAttr();
                break;
        }
View Full Code Here

        virtualSchema.setName("rvirtualdata");

        SyncopeRole owner = roleDAO.find(3L);
        assertNotNull("did not get expected membership", owner);

        RVirAttr virtualAttribute = new RVirAttr();
        virtualAttribute.setOwner(owner);
        virtualAttribute.setVirtualSchema(virtualSchema);

        virtualAttribute = virAttrDAO.save(virtualAttribute);

        RVirAttr actual = virAttrDAO.find(virtualAttribute.getId(), RVirAttr.class);
        assertNotNull("expected save to work", actual);
        assertEquals(virtualAttribute, actual);
    }
View Full Code Here

        switch (type) {
            case USER:
                result = (T) new UVirAttr();
                break;
            case ROLE:
                result = (T) new RVirAttr();
                break;
            case MEMBERSHIP:
                result = (T) new MVirAttr();
                break;
        }
View Full Code Here

        virtualSchema.setName("rvirtualdata");

        SyncopeRole owner = roleDAO.find(3L);
        assertNotNull("did not get expected membership", owner);

        RVirAttr virtualAttribute = new RVirAttr();
        virtualAttribute.setOwner(owner);
        virtualAttribute.setVirtualSchema(virtualSchema);

        virtualAttribute = virAttrDAO.save(virtualAttribute);

        RVirAttr actual = virAttrDAO.find(virtualAttribute.getId(), RVirAttr.class);
        assertNotNull("expected save to work", actual);
        assertEquals(virtualAttribute, actual);
    }
View Full Code Here

    @Test
    public void saveRVirAttribute() {
        SyncopeRole owner = roleDAO.find(3L);
        assertNotNull("did not get expected membership", owner);

        RVirAttr virAttr = new RVirAttr();
        virAttr.setOwner(owner);
        virAttr.setTemplate(owner.getAttrTemplate(RVirAttrTemplate.class, "rvirtualdata"));

        virAttr = virAttrDAO.save(virAttr);
        assertNotNull(virAttr.getTemplate());

        RVirAttr actual = virAttrDAO.find(virAttr.getId(), RVirAttr.class);
        assertNotNull("expected save to work", actual);
        assertEquals(virAttr, actual);
    }
View Full Code Here

        switch (type) {
            case USER:
                result = (T) new UVirAttr();
                break;
            case ROLE:
                result = (T) new RVirAttr();
                break;
            case MEMBERSHIP:
                result = (T) new MVirAttr();
                break;
            case CONFIGURATION:
View Full Code Here

                }

                // add template to virtual attributes
                for (Long attrId : jdbcTemplate.queryForList("SELECT id FROM RVirAttr WHERE OWNER_ID = ?", Long.class,
                        role.getId())) {
                    final RVirAttr rVirAttr = virAttrDAO.find(attrId, RVirAttr.class);

                    LOG.info("Adding template to role attribute {}", rVirAttr);

                    final String virSchemaName = jdbcTemplate.queryForObject(
                            "SELECT VIRTUALSCHEMA_NAME FROM RVirAttr WHERE id = ?;", String.class, attrId);

                    rVirAttr.setTemplate(getTemplate(role, virSchemaName, RVirAttrTemplate.class));
                    newRVirattrs.add(rVirAttr);
                }
                role.setAttrs(newRattrs);
                role.setDerAttrs(newRDerattrs);
                role.setVirAttrs(newRVirattrs);
View Full Code Here

TOP

Related Classes of org.apache.syncope.core.persistence.beans.role.RVirAttr

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.