Examples of UMappingItem


Examples of org.apache.syncope.core.persistence.beans.user.UMappingItem

        if (resourceTO.getUmapping() != null) {
            UMapping mapping = new UMapping();
            mapping.setResource(resource);
            resource.setUmapping(mapping);
            populateMapping(resourceTO.getUmapping(), mapping, new UMappingItem());
        }
        if (resourceTO.getRmapping() != null) {
            RMapping mapping = new RMapping();
            mapping.setResource(resource);
            resource.setRmapping(mapping);
View Full Code Here

Examples of org.apache.syncope.core.persistence.beans.user.UMappingItem

        mapping.setResource(resource);
        resource.setUmapping(mapping);

        // specify mappings
        for (int i = 0; i < 3; i++) {
            UMappingItem item = new UMappingItem();
            item.setExtAttrName("test" + i);
            item.setIntAttrName("nonexistent" + i);
            item.setIntMappingType(IntMappingType.UserSchema);
            item.setMandatoryCondition("false");
            item.setPurpose(MappingPurpose.SYNCHRONIZATION);
            mapping.addItem(item);
            item.setMapping(mapping);
        }
        UMappingItem accountId = new UMappingItem();
        accountId.setExtAttrName("username");
        accountId.setIntAttrName("username");
        accountId.setIntMappingType(IntMappingType.UserId);
        accountId.setPurpose(MappingPurpose.PROPAGATION);
        mapping.setAccountIdItem(accountId);
        accountId.setMapping(mapping);

        // map a derived attribute
        UMappingItem derived = new UMappingItem();
        derived.setAccountid(false);
        derived.setExtAttrName("fullname");
        derived.setIntAttrName("cn");
        derived.setIntMappingType(IntMappingType.UserDerivedSchema);
        derived.setPurpose(MappingPurpose.PROPAGATION);
        mapping.addItem(derived);
        derived.setMapping(mapping);

        // save the resource
        ExternalResource actual = resourceDAO.save(resource);
        assertNotNull(actual);
        assertNotNull(actual.getUmapping());
View Full Code Here

Examples of org.apache.syncope.core.persistence.beans.user.UMappingItem

        ExternalResource csv = resourceDAO.find("resource-csv");
        assertNotNull(csv);

        int origMapItems = csv.getUmapping().getItems().size();

        UMappingItem newMapItem = new UMappingItem();
        newMapItem.setIntMappingType(IntMappingType.Username);
        newMapItem.setExtAttrName("TEST");
        newMapItem.setPurpose(MappingPurpose.PROPAGATION);
        csv.getUmapping().addItem(newMapItem);

        resourceDAO.save(csv);
        resourceDAO.flush();
View Full Code Here

Examples of org.apache.syncope.core.persistence.beans.user.UMappingItem

        resource.setPropagationPrimary(true);

        UMapping mapping = new UMapping();
        resource.setUmapping(mapping);

        UMappingItem accountId = new UMappingItem();
        accountId.setExtAttrName("username");
        accountId.setIntAttrName("fullname");
        accountId.setIntMappingType(IntMappingType.UserId);
        accountId.setPurpose(MappingPurpose.BOTH);
        mapping.setAccountIdItem(accountId);

        ConnInstance connector = resourceDAO.find("ws-target-resource-1").getConnector();
        resource.setConnector(connector);
View Full Code Here

Examples of org.apache.syncope.core.persistence.beans.user.UMappingItem

        resource.setConnector(connector);

        UMapping mapping = new UMapping();
        resource.setUmapping(mapping);

        UMappingItem accountId = new UMappingItem();
        accountId.setAccountid(true);
        accountId.setIntMappingType(IntMappingType.UserSchema);
        mapping.addItem(accountId);

        // save the resource
        ExternalResource actual = resourceDAO.save(resource);
        assertNotNull(actual);
View Full Code Here

Examples of org.apache.syncope.core.persistence.beans.user.UMappingItem

        resource.setConnector(connector);

        UMapping mapping = new UMapping();
        resource.setUmapping(mapping);

        UMappingItem accountId = new UMappingItem();
        accountId.setAccountid(true);
        accountId.setIntMappingType(IntMappingType.UserVirtualSchema);
        mapping.setAccountIdItem(accountId);

        // save the resource
        ExternalResource actual = resourceDAO.save(resource);
        assertNotNull(actual);
View Full Code Here

Examples of org.apache.syncope.core.persistence.beans.user.UMappingItem

        resource.setConnector(connector);

        UMapping mapping = new UMapping();
        resource.setUmapping(mapping);

        UMappingItem item = new UMappingItem();
        item.setAccountid(true);
        item.setIntAttrName("fullname");
        item.setIntMappingType(IntMappingType.UserSchema);
        mapping.addItem(item);

        item = new UMappingItem();
        item.setIntAttrName("userId");
        item.setIntMappingType(IntMappingType.UserSchema);
        mapping.addItem(item);

        ExternalResource actual = resourceDAO.save(resource);
        assertNotNull(actual);
    }
View Full Code Here

Examples of org.apache.syncope.core.persistence.beans.user.UMappingItem

        resource.setConnector(connector);

        UMapping mapping = new UMapping();
        resource.setUmapping(mapping);

        UMappingItem item = new UMappingItem();
        item.setIntAttrName("fullname");
        item.setIntMappingType(IntMappingType.UserSchema);
        item.setPurpose(MappingPurpose.BOTH);
        mapping.setAccountIdItem(item);

        item = new UMappingItem();
        item.setIntAttrName("icon");
        item.setExtAttrName("icon");
        item.setIntMappingType(IntMappingType.RoleSchema);
        item.setPurpose(MappingPurpose.BOTH);
        mapping.addItem(item);

        item = new UMappingItem();
        item.setIntAttrName("mderiveddata");
        item.setExtAttrName("mderiveddata");
        item.setIntMappingType(IntMappingType.MembershipDerivedSchema);
        item.setPurpose(MappingPurpose.BOTH);
        mapping.addItem(item);

        // save the resource
        ExternalResource actual = resourceDAO.save(resource);
        assertNotNull(actual);
View Full Code Here

Examples of org.apache.syncope.core.persistence.beans.user.UMappingItem

            resource.setUmapping(null);
        } else {
            UMapping mapping = new UMapping();
            mapping.setResource(resource);
            resource.setUmapping(mapping);
            populateMapping(resourceTO.getUmapping(), mapping, new UMappingItem());
        }
        if (resourceTO.getRmapping() == null || resourceTO.getRmapping().getItems().isEmpty()) {
            resource.setRmapping(null);
        } else {
            RMapping mapping = new RMapping();
View Full Code Here

Examples of org.apache.syncope.core.persistence.beans.user.UMappingItem

            resource.setUmapping(null);
        } else {
            UMapping mapping = new UMapping();
            mapping.setResource(resource);
            resource.setUmapping(mapping);
            populateMapping(resourceTO.getUmapping(), mapping, new UMappingItem());
        }
        if (resourceTO.getRmapping() == null || resourceTO.getRmapping().getItems().isEmpty()) {
            resource.setRmapping(null);
        } else {
            RMapping mapping = new RMapping();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.