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

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


        switch (type) {
            case USER:
                result = (T) new UDerAttr();
                break;
            case ROLE:
                result = (T) new RDerAttr();
                break;
            case MEMBERSHIP:
                result = (T) new MDerAttr();
                break;
        }
View Full Code Here


        switch (type) {
            case USER:
                result = (T) new UDerAttr();
                break;
            case ROLE:
                result = (T) new RDerAttr();
                break;
            case MEMBERSHIP:
                result = (T) new MDerAttr();
                break;
        }
View Full Code Here

        switch (type) {
            case USER:
                result = (T) new UDerAttr();
                break;
            case ROLE:
                result = (T) new RDerAttr();
                break;
            case MEMBERSHIP:
                result = (T) new MDerAttr();
                break;
        }
View Full Code Here

        assertNotNull(deriveddata);

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

        RDerAttr derivedAttribute = new RDerAttr();
        derivedAttribute.setOwner(owner);
        derivedAttribute.setDerivedSchema(deriveddata);

        derivedAttribute = derAttrDAO.save(derivedAttribute);

        RDerAttr actual = derAttrDAO.find(derivedAttribute.getId(), RDerAttr.class);
        assertNotNull("expected save to work", actual);
        assertEquals(derivedAttribute, actual);

        RAttrValue sx = (RAttrValue) owner.getAttribute("rderived_sx").getValues().iterator().next();
        RAttrValue dx = (RAttrValue) owner.getAttribute("rderived_dx").getValues().iterator().next();
View Full Code Here

        assertEquals(sderived, actual);

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

        RDerAttr derAttr = new RDerAttr();
        derAttr.setOwner(owner);
        derAttr.setDerivedSchema(sderived);

        derAttr = derAttrDAO.save(derAttr);
        derAttrDAO.flush();

        derAttr = derAttrDAO.find(derAttr.getId(), RDerAttr.class);
        assertNotNull("expected save to work", derAttr);

        String value = derAttr.getValue(owner.getAttributes());
        assertNotNull(value);
        assertFalse(value.isEmpty());
        assertTrue(value.startsWith("managingDirector"));
    }
View Full Code Here

        switch (type) {
            case USER:
                result = (T) new UDerAttr();
                break;
            case ROLE:
                result = (T) new RDerAttr();
                break;
            case MEMBERSHIP:
                result = (T) new MDerAttr();
                break;
        }
View Full Code Here

        assertNotNull(deriveddata);

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

        RDerAttr derivedAttribute = new RDerAttr();
        derivedAttribute.setOwner(owner);
        derivedAttribute.setDerivedSchema(deriveddata);

        derivedAttribute = derAttrDAO.save(derivedAttribute);

        RDerAttr actual = derAttrDAO.find(derivedAttribute.getId(), RDerAttr.class);
        assertNotNull("expected save to work", actual);
        assertEquals(derivedAttribute, actual);

        RAttrValue sx = (RAttrValue) owner.getAttribute("rderived_sx").getValues().iterator().next();
        RAttrValue dx = (RAttrValue) owner.getAttribute("rderived_dx").getValues().iterator().next();
View Full Code Here

    @Test
    public void saveRDerAttribute() {
        SyncopeRole owner = roleDAO.find(1L);
        assertNotNull("did not get expected user", owner);

        RDerAttr derAttr = new RDerAttr();
        derAttr.setOwner(owner);
        derAttr.setTemplate(owner.getAttrTemplate(RDerAttrTemplate.class, "rderiveddata"));

        derAttr = derAttrDAO.save(derAttr);
        assertNotNull(derAttr.getTemplate());

        RDerAttr actual = derAttrDAO.find(derAttr.getId(), RDerAttr.class);
        assertNotNull("expected save to work", actual);
        assertEquals(derAttr, actual);

        RAttrValue sx = (RAttrValue) owner.getAttr("rderived_sx").getValues().iterator().next();
        RAttrValue dx = (RAttrValue) owner.getAttr("rderived_dx").getValues().iterator().next();
View Full Code Here

        RDerAttrTemplate template = new RDerAttrTemplate();
        template.setSchema(sderived);
        owner.getAttrTemplates(RDerAttrTemplate.class).add(template);

        RDerAttr derAttr = new RDerAttr();
        derAttr.setOwner(owner);
        derAttr.setTemplate(owner.getAttrTemplate(RDerAttrTemplate.class, sderived.getName()));

        derAttr = derAttrDAO.save(derAttr);
        assertNotNull(derAttr.getTemplate());
        derAttrDAO.flush();

        derAttr = derAttrDAO.find(derAttr.getId(), RDerAttr.class);
        assertNotNull("expected save to work", derAttr);

        String value = derAttr.getValue(owner.getAttrs());
        assertNotNull(value);
        assertFalse(value.isEmpty());
        assertTrue(value.startsWith("managingDirector"));
    }
View Full Code Here

        switch (type) {
            case USER:
                result = (T) new UDerAttr();
                break;
            case ROLE:
                result = (T) new RDerAttr();
                break;
            case MEMBERSHIP:
                result = (T) new MDerAttr();
                break;
            case CONFIGURATION:
View Full Code Here

TOP

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

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.