Search in sources :

Example 1 with AttributeFilter

use of org.identityconnectors.framework.common.objects.filter.AttributeFilter in project midpoint by Evolveum.

the class ConnIdUtil method dump.

private static void dump(Filter filter, StringBuilder sb, int indent) {
    DebugUtil.indentDebugDump(sb, indent);
    if (filter == null) {
        sb.append("null");
        return;
    }
    sb.append(filter.toString());
    if (filter instanceof AttributeFilter) {
        sb.append("(");
        Attribute attribute = ((AttributeFilter) filter).getAttribute();
        sb.append(attribute.getName());
        sb.append(": ");
        List<Object> value = attribute.getValue();
        sb.append(value);
        //			if (value != null && !value.isEmpty()) {
        //				sb.append(" :").append(attribute.getValue().iterator().next().getClass().getSimpleName());
        //			}
        sb.append(")");
    }
    if (filter instanceof CompositeFilter) {
        for (Filter subfilter : ((CompositeFilter) filter).getFilters()) {
            sb.append("\n");
            dump(subfilter, sb, indent + 1);
        }
    }
}
Also used : CompositeFilter(org.identityconnectors.framework.common.objects.filter.CompositeFilter) ResourceAttribute(com.evolveum.midpoint.schema.processor.ResourceAttribute) Attribute(org.identityconnectors.framework.common.objects.Attribute) Filter(org.identityconnectors.framework.common.objects.filter.Filter) CompositeFilter(org.identityconnectors.framework.common.objects.filter.CompositeFilter) AttributeFilter(org.identityconnectors.framework.common.objects.filter.AttributeFilter) AttributeFilter(org.identityconnectors.framework.common.objects.filter.AttributeFilter)

Aggregations

ResourceAttribute (com.evolveum.midpoint.schema.processor.ResourceAttribute)1 Attribute (org.identityconnectors.framework.common.objects.Attribute)1 AttributeFilter (org.identityconnectors.framework.common.objects.filter.AttributeFilter)1 CompositeFilter (org.identityconnectors.framework.common.objects.filter.CompositeFilter)1 Filter (org.identityconnectors.framework.common.objects.filter.Filter)1