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

Examples of org.apache.syncope.core.persistence.beans.membership.MDerAttr


                break;
            case ROLE:
                result = (T) new RDerAttr();
                break;
            case MEMBERSHIP:
                result = (T) new MDerAttr();
                break;
        }

        return result;
    }
View Full Code Here


                break;
            case ROLE:
                result = (T) new RDerAttr();
                break;
            case MEMBERSHIP:
                result = (T) new MDerAttr();
                break;
        }

        return result;
    }
View Full Code Here

                break;
            case ROLE:
                result = (T) new RDerAttr();
                break;
            case MEMBERSHIP:
                result = (T) new MDerAttr();
                break;
        }

        return result;
    }
View Full Code Here

        assertNotNull(deriveddata);

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

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

        derivedAttribute = derAttrDAO.save(derivedAttribute);

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

        MAttrValue sx = (MAttrValue) owner.getAttribute("mderived_sx").getValues().iterator().next();
        MAttrValue dx = (MAttrValue) owner.getAttribute("mderived_dx").getValues().iterator().next();
View Full Code Here

        assertEquals(sderived, actual);

        Membership owner = membershipDAO.find(4L);
        assertNotNull("did not get expected user", owner);

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

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

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

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

                break;
            case ROLE:
                result = (T) new RDerAttr();
                break;
            case MEMBERSHIP:
                result = (T) new MDerAttr();
                break;
        }

        return result;
    }
View Full Code Here

        assertNotNull(deriveddata);

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

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

        derivedAttribute = derAttrDAO.save(derivedAttribute);

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

        MAttrValue sx = (MAttrValue) owner.getAttribute("mderived_sx").getValues().iterator().next();
        MAttrValue dx = (MAttrValue) owner.getAttribute("mderived_dx").getValues().iterator().next();
View Full Code Here

    @Test
    public void saveMDerAttribute() {
        Membership owner = membershipDAO.find(1L);
        assertNotNull("did not get expected user", owner);

        MDerAttr derAttr = new MDerAttr();
        derAttr.setOwner(owner);
        derAttr.setTemplate(owner.getSyncopeRole().getAttrTemplate(MDerAttrTemplate.class, "mderiveddata"));

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

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

        MAttrValue sx = (MAttrValue) owner.getAttr("mderived_sx").getValues().iterator().next();
        MAttrValue dx = (MAttrValue) owner.getAttr("mderived_dx").getValues().iterator().next();
View Full Code Here

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

        MDerAttr derAttr = new MDerAttr();
        derAttr.setOwner(owner);
        derAttr.setTemplate(owner.getSyncopeRole().getAttrTemplate(MDerAttrTemplate.class, sderived.getName()));

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

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

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

                break;
            case ROLE:
                result = (T) new RDerAttr();
                break;
            case MEMBERSHIP:
                result = (T) new MDerAttr();
                break;
            case CONFIGURATION:
            default:
        }
View Full Code Here

TOP

Related Classes of org.apache.syncope.core.persistence.beans.membership.MDerAttr

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.