Package org.apache.syncope.common.search

Examples of org.apache.syncope.common.search.ResourceCond


                }

                break;

            case RESOURCE:
                final ResourceCond resourceCond = new ResourceCond();
                resourceCond.setResourceName(searchConditionWrapper.getFilterName());

                if (searchConditionWrapper.isNotOperator()) {
                    nodeCond = NodeCond.getNotLeafCond(resourceCond);
                } else {
                    nodeCond = NodeCond.getLeafCond(resourceCond);
View Full Code Here


        assertEquals(1L, matchingRoles.iterator().next().getId());
    }

    @Test
    public void searchUserByResourceName() throws InvalidSearchConditionException {
        ResourceCond ws2 = new ResourceCond();
        ws2.setResourceName("ws-target-resource2");

        ResourceCond ws1 = new ResourceCond();
        ws1.setResourceName("ws-target-resource-list-mappings-2");

        NodeCond searchCondition = NodeCond.getAndCond(NodeCond.getNotLeafCond(ws2), NodeCond.getLeafCond(ws1));

        assertTrue(searchCondition.isValid());
View Full Code Here

        assertEquals(1L, matchingRoles.iterator().next().getId());
    }

    @Test
    public void searchUserByResourceName() throws InvalidSearchConditionException {
        ResourceCond ws2 = new ResourceCond();
        ws2.setResourceName("ws-target-resource2");

        ResourceCond ws1 = new ResourceCond();
        ws1.setResourceName(RESOURCE_NAME_MAPPINGS2);

        NodeCond searchCondition = NodeCond.getAndCond(NodeCond.getNotLeafCond(ws2), NodeCond.getLeafCond(ws1));

        assertTrue(searchCondition.isValid());
View Full Code Here

                        : NodeCond.getLeafCond(membershipCond);

                break;

            case RESOURCE:
                final ResourceCond resourceCond = new ResourceCond();
                resourceCond.setResourceName(searchConditionWrapper.getFilterName());

                nodeCond = searchConditionWrapper.isNotOperator()
                        ? NodeCond.getNotLeafCond(resourceCond)
                        : NodeCond.getLeafCond(resourceCond);
View Full Code Here

                        : NodeCond.getLeafCond(membershipCond);

                break;

            case RESOURCE:
                final ResourceCond resourceCond = new ResourceCond();
                resourceCond.setResourceName(searchConditionWrapper.getFilterName());

                nodeCond = searchConditionWrapper.isNotOperator()
                        ? NodeCond.getNotLeafCond(resourceCond)
                        : NodeCond.getLeafCond(resourceCond);
View Full Code Here

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

    @Test
    public void searchByResource() {
        ResourceCond ws2 = new ResourceCond();
        ws2.setResourceName("ws-target-resource-2");

        ResourceCond ws1 = new ResourceCond();
        ws1.setResourceName("ws-target-resource-list-mappings-2");

        NodeCond searchCondition = NodeCond.getAndCond(NodeCond.getNotLeafCond(ws2), NodeCond.getLeafCond(ws1));

        assertTrue(searchCondition.isValid());
View Full Code Here

        assertTrue(found);
    }

    @Test
    public void issue202() {
        final ResourceCond ws2 = new ResourceCond();
        ws2.setResourceName("ws-target-resource-2");

        final ResourceCond ws1 = new ResourceCond();
        ws1.setResourceName("ws-target-resource-list-mappings-1");

        final NodeCond searchCondition =
                NodeCond.getAndCond(NodeCond.getNotLeafCond(ws2), NodeCond.getNotLeafCond(ws1));
        assertTrue(searchCondition.isValid());
View Full Code Here

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

    @Test
    public void searchByResource() {
        ResourceCond ws2 = new ResourceCond();
        ws2.setResourceName("ws-target-resource-2");

        ResourceCond ws1 = new ResourceCond();
        ws1.setResourceName("ws-target-resource-list-mappings-2");

        NodeCond searchCondition = NodeCond.getAndCond(NodeCond.getNotLeafCond(ws2), NodeCond.getLeafCond(ws1));

        assertTrue(searchCondition.isValid());
View Full Code Here

        assertTrue(found);
    }

    @Test
    public void issue202() {
        final ResourceCond ws2 = new ResourceCond();
        ws2.setResourceName("ws-target-resource-2");

        final ResourceCond ws1 = new ResourceCond();
        ws1.setResourceName("ws-target-resource-list-mappings-1");

        final NodeCond searchCondition =
                NodeCond.getAndCond(NodeCond.getNotLeafCond(ws2), NodeCond.getNotLeafCond(ws1));
        assertTrue(searchCondition.isValid());
View Full Code Here

TOP

Related Classes of org.apache.syncope.common.search.ResourceCond

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.