Package org.apache.syncope.client.search

Examples of org.apache.syncope.client.search.SyncopeUserCond


                NodeCond nodeCond;

                // just Username or SyncopeUserId can be selected to be used
                if ("id".equalsIgnoreCase(schema) || "username".equalsIgnoreCase(schema)) {

                    final SyncopeUserCond cond = new SyncopeUserCond();
                    cond.setSchema(schema);
                    cond.setType(type);
                    cond.setExpression(expression);

                    nodeCond = NodeCond.getLeafCond(cond);

                } else {
                    final AttributeCond cond = new AttributeCond();
                    cond.setSchema(schema);
                    cond.setType(type);
                    cond.setExpression(expression);

                    nodeCond = NodeCond.getLeafCond(cond);
                }

                searchCondition = searchCondition != null
View Full Code Here


                // AttributeCond or SyncopeUserCond
                final String schema = searchConditionWrapper.getFilterName();

                final AttributeCond attributeCond;
                if (dnames.getObject().contains(schema)) {
                    attributeCond = new SyncopeUserCond();
                    nodeCond = searchConditionWrapper.isNotOperator()
                            ? NodeCond.getNotLeafCond((SyncopeUserCond) attributeCond)
                            : NodeCond.getLeafCond((SyncopeUserCond) attributeCond);
                } else {
                    attributeCond = new AttributeCond();
View Full Code Here

        assertTrue(userIds.contains(3L));
    }

    @Test
    public void searchByUsernameAndId() {
        final SyncopeUserCond usernameLeafCond = new SyncopeUserCond(SyncopeUserCond.Type.EQ);
        usernameLeafCond.setSchema("username");
        usernameLeafCond.setExpression("user1");

        final SyncopeUserCond idRightCond = new SyncopeUserCond(SyncopeUserCond.Type.LT);
        idRightCond.setSchema("id");
        idRightCond.setExpression("2");

        final NodeCond searchCondition = NodeCond.getAndCond(NodeCond.getLeafCond(usernameLeafCond), NodeCond.
                getLeafCond(idRightCond));

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

        assertTrue(userIds.contains(3L));
    }

    @Test
    public void searchByUsernameAndId() {
        final SyncopeUserCond usernameLeafCond = new SyncopeUserCond(SyncopeUserCond.Type.EQ);
        usernameLeafCond.setSchema("username");
        usernameLeafCond.setExpression("user1");

        final SyncopeUserCond idRightCond = new SyncopeUserCond(SyncopeUserCond.Type.LT);
        idRightCond.setSchema("id");
        idRightCond.setExpression("2");

        final NodeCond searchCondition = NodeCond.getAndCond(NodeCond.getLeafCond(usernameLeafCond), NodeCond.
                getLeafCond(idRightCond));

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

        assertTrue(userIds.contains(3L));
    }

    @Test
    public void searchByUsernameAndId() {
        final SyncopeUserCond usernameLeafCond = new SyncopeUserCond(SyncopeUserCond.Type.EQ);
        usernameLeafCond.setSchema("username");
        usernameLeafCond.setExpression("user1");

        final SyncopeUserCond idRightCond = new SyncopeUserCond(SyncopeUserCond.Type.LT);
        idRightCond.setSchema("id");
        idRightCond.setExpression("2");

        final NodeCond searchCondition = NodeCond.getAndCond(NodeCond.getLeafCond(usernameLeafCond), NodeCond.
                getLeafCond(idRightCond));

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

        assertTrue(userIds.contains(3L));
    }

    @Test
    public void searchByUsernameAndId() {
        final SyncopeUserCond usernameLeafCond = new SyncopeUserCond(SyncopeUserCond.Type.EQ);
        usernameLeafCond.setSchema("username");
        usernameLeafCond.setExpression("user1");

        final SyncopeUserCond idRightCond = new SyncopeUserCond(SyncopeUserCond.Type.LT);
        idRightCond.setSchema("id");
        idRightCond.setExpression("2");

        final NodeCond searchCondition = NodeCond.getAndCond(NodeCond.getLeafCond(usernameLeafCond), NodeCond.
                getLeafCond(idRightCond));

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

                NodeCond nodeCond;

                // just Username or SyncopeUserId can be selected to be used
                if ("id".equalsIgnoreCase(schema) || "username".equalsIgnoreCase(schema)) {

                    final SyncopeUserCond cond = new SyncopeUserCond();
                    cond.setSchema(schema);
                    cond.setType(type);
                    cond.setExpression(expression);

                    nodeCond = NodeCond.getLeafCond(cond);

                } else {
                    final AttributeCond cond = new AttributeCond();
                    cond.setSchema(schema);
                    cond.setType(type);
                    cond.setExpression(expression);

                    nodeCond = NodeCond.getLeafCond(cond);
                }

                searchCondition = searchCondition != null
View Full Code Here

        assertTrue(userIds.contains(3L));
    }

    @Test
    public void searchByUsernameAndId() {
        final SyncopeUserCond usernameLeafCond = new SyncopeUserCond(SyncopeUserCond.Type.EQ);
        usernameLeafCond.setSchema("username");
        usernameLeafCond.setExpression("user1");

        final SyncopeUserCond idRightCond = new SyncopeUserCond(SyncopeUserCond.Type.LT);
        idRightCond.setSchema("id");
        idRightCond.setExpression("2");

        final NodeCond searchCondition = NodeCond.getAndCond(NodeCond.getLeafCond(usernameLeafCond), NodeCond.
                getLeafCond(idRightCond));

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

                // AttributeCond or SyncopeUserCond
                final String schema = searchConditionWrapper.getFilterName();

                final AttributeCond attributeCond;
                if (dnames.getObject().contains(schema)) {
                    attributeCond = new SyncopeUserCond();
                    nodeCond = searchConditionWrapper.isNotOperator()
                            ? NodeCond.getNotLeafCond((SyncopeUserCond) attributeCond)
                            : NodeCond.getLeafCond((SyncopeUserCond) attributeCond);
                } else {
                    attributeCond = new AttributeCond();
View Full Code Here

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

    @Test
    public void searchByUsernameAndId() {
        final SyncopeUserCond usernameLeafCond = new SyncopeUserCond(SyncopeUserCond.Type.EQ);
        usernameLeafCond.setSchema("username");
        usernameLeafCond.setExpression("user1");

        final SyncopeUserCond idRightCond = new SyncopeUserCond(SyncopeUserCond.Type.LT);
        idRightCond.setSchema("id");
        idRightCond.setExpression("2");

        final NodeCond searchCondition = NodeCond.getOrCond(NodeCond.getLeafCond(usernameLeafCond),
                NodeCond.getLeafCond(idRightCond));

        final List<SyncopeUser> matchingUsers = searchDAO.search(EntitlementUtil.getRoleIds(entitlementDAO.findAll()),
View Full Code Here

TOP

Related Classes of org.apache.syncope.client.search.SyncopeUserCond

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.