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

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


    public <T extends AbstractVirSchema> T newVirSchema() {
        T result = null;

        switch (type) {
            case USER:
                result = (T) new UVirSchema();
                break;
            case ROLE:
                result = (T) new RVirSchema();
                break;
            case MEMBERSHIP:
View Full Code Here


        assertEquals(1, list.size());
    }

    @Test
    public void findByName() {
        UVirSchema attributeSchema = virSchemaDAO.find("virtualdata", UVirSchema.class);
        assertNotNull("did not find expected virtual attribute schema", attributeSchema);
    }
View Full Code Here

        assertNotNull("did not find expected virtual attribute schema", attributeSchema);
    }

    @Test
    public void save() {
        UVirSchema virtualAttributeSchema = new UVirSchema();
        virtualAttributeSchema.setName("virtual");
        virtualAttributeSchema.setReadonly(true);

        virSchemaDAO.save(virtualAttributeSchema);

        UVirSchema actual = virSchemaDAO.find("virtual", UVirSchema.class);
        assertNotNull("expected save to work", actual);
        assertTrue(actual.isReadonly());
    }
View Full Code Here

        assertTrue(actual.isReadonly());
    }

    @Test
    public void delete() {
        UVirSchema attributeSchema = virSchemaDAO.find("virtualdata", UVirSchema.class);

        virSchemaDAO.delete(attributeSchema.getName(), AttributableUtil.getInstance(AttributableType.USER));

        UVirSchema actual = virSchemaDAO.find("virtualdata", UVirSchema.class);
        assertNull("delete did not work", actual);
    }
View Full Code Here

    public <T extends AbstractVirSchema> T newVirSchema() {
        T result = null;

        switch (type) {
            case USER:
                result = (T) new UVirSchema();
                break;
            case ROLE:
                result = (T) new RVirSchema();
                break;
            case MEMBERSHIP:
View Full Code Here

    public <T extends AbstractVirSchema> T newVirSchema() {
        T result = null;

        switch (type) {
            case USER:
                result = (T) new UVirSchema();
                break;
            case ROLE:
                result = (T) new RVirSchema();
                break;
            case MEMBERSHIP:
View Full Code Here

        assertEquals(1, list.size());
    }

    @Test
    public void findByName() {
        UVirSchema attributeSchema = virSchemaDAO.find("virtualdata", UVirSchema.class);
        assertNotNull("did not find expected virtual attribute schema", attributeSchema);
    }
View Full Code Here

        assertNotNull("did not find expected virtual attribute schema", attributeSchema);
    }

    @Test
    public void save() {
        UVirSchema virtualAttributeSchema = new UVirSchema();
        virtualAttributeSchema.setName("virtual");
        virtualAttributeSchema.setReadonly(true);

        virSchemaDAO.save(virtualAttributeSchema);

        UVirSchema actual = virSchemaDAO.find("virtual", UVirSchema.class);
        assertNotNull("expected save to work", actual);
        assertTrue(actual.isReadonly());
    }
View Full Code Here

        assertTrue(actual.isReadonly());
    }

    @Test
    public void delete() {
        UVirSchema attributeSchema = virSchemaDAO.find("virtualdata", UVirSchema.class);

        virSchemaDAO.delete(attributeSchema.getName(), AttributableUtil.getInstance(AttributableType.USER));

        UVirSchema actual = virSchemaDAO.find("virtualdata", UVirSchema.class);
        assertNull("delete did not work", actual);
    }
View Full Code Here

        assertNull("delete did not work", actual);
    }

    @Test
    public void issueSYNCOPE418() {
        UVirSchema schema = new UVirSchema();
        schema.setName("http://schemas.examples.org/security/authorization/organizationUnit");

        try {
            virSchemaDAO.save(schema);
            fail();
        } catch (InvalidEntityException e) {
View Full Code Here

TOP

Related Classes of org.apache.syncope.core.persistence.beans.user.UVirSchema

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.