Search in sources :

Example 1 with ContainsAllValuesFilter

use of org.identityconnectors.framework.common.objects.filter.ContainsAllValuesFilter in project CzechIdMng by bcvsolutions.

the class ConnIdIcConvertUtil method convertIcFilter.

public static Filter convertIcFilter(IcFilter filter) {
    if (filter == null) {
        return null;
    }
    if (filter instanceof IcAndFilter) {
        List<IcFilter> subFilters = (List<IcFilter>) ((IcAndFilter) filter).getFilters();
        LinkedList<Filter> subFiltersConnId = new LinkedList<>();
        if (!subFilters.isEmpty()) {
            subFilters.forEach(subFilter -> {
                subFiltersConnId.add(ConnIdIcConvertUtil.convertIcFilter(subFilter));
            });
        }
        return new AndFilter(subFiltersConnId);
    }
    if (filter instanceof IcOrFilter) {
        List<IcFilter> subFilters = (List<IcFilter>) ((IcOrFilter) filter).getFilters();
        LinkedList<Filter> subFiltersConnId = new LinkedList<>();
        if (!subFilters.isEmpty()) {
            subFilters.forEach(subFilter -> {
                subFiltersConnId.add(ConnIdIcConvertUtil.convertIcFilter(subFilter));
            });
        }
        return new OrFilter(subFiltersConnId);
    }
    if (filter instanceof IcNotFilter) {
        return new NotFilter(ConnIdIcConvertUtil.convertIcFilter(((IcNotFilter) filter).getFilter()));
    }
    if (filter instanceof IcAttributeFilter) {
        Attribute attr = ConnIdIcConvertUtil.convertIcAttribute(((IcAttributeFilter) filter).getAttribute());
        if (filter instanceof IcEqualsFilter) {
            return new EqualsFilter(attr);
        }
        if (filter instanceof IcContainsFilter) {
            return new ContainsFilter(attr);
        }
        if (filter instanceof IcEndsWithFilter) {
            return new EndsWithFilter(attr);
        }
        if (filter instanceof IcContainsAllValuesFilter) {
            return new ContainsAllValuesFilter(attr);
        }
        if (filter instanceof IcStartsWithFilter) {
            return new StartsWithFilter(attr);
        }
        if (filter instanceof IcGreaterThanFilter) {
            return new GreaterThanFilter(attr);
        }
        if (filter instanceof IcLessThanFilter) {
            return new LessThanFilter(attr);
        }
    }
    return null;
}
Also used : IcEnabledAttribute(eu.bcvsolutions.idm.ic.api.IcEnabledAttribute) IcPasswordAttribute(eu.bcvsolutions.idm.ic.api.IcPasswordAttribute) Attribute(org.identityconnectors.framework.common.objects.Attribute) IcUidAttribute(eu.bcvsolutions.idm.ic.api.IcUidAttribute) IcLoginAttribute(eu.bcvsolutions.idm.ic.api.IcLoginAttribute) IcAttribute(eu.bcvsolutions.idm.ic.api.IcAttribute) IcContainsFilter(eu.bcvsolutions.idm.ic.filter.impl.IcContainsFilter) ContainsFilter(org.identityconnectors.framework.common.objects.filter.ContainsFilter) IcAndFilter(eu.bcvsolutions.idm.ic.filter.impl.IcAndFilter) IcNotFilter(eu.bcvsolutions.idm.ic.filter.impl.IcNotFilter) IcOrFilter(eu.bcvsolutions.idm.ic.filter.impl.IcOrFilter) IcStartsWithFilter(eu.bcvsolutions.idm.ic.filter.impl.IcStartsWithFilter) IcContainsFilter(eu.bcvsolutions.idm.ic.filter.impl.IcContainsFilter) IcLessThanFilter(eu.bcvsolutions.idm.ic.filter.impl.IcLessThanFilter) List(java.util.List) ArrayList(java.util.ArrayList) LinkedList(java.util.LinkedList) EqualsFilter(org.identityconnectors.framework.common.objects.filter.EqualsFilter) IcEqualsFilter(eu.bcvsolutions.idm.ic.filter.impl.IcEqualsFilter) IcAttributeFilter(eu.bcvsolutions.idm.ic.filter.impl.IcAttributeFilter) IcEqualsFilter(eu.bcvsolutions.idm.ic.filter.impl.IcEqualsFilter) IcContainsAllValuesFilter(eu.bcvsolutions.idm.ic.filter.impl.IcContainsAllValuesFilter) IcOrFilter(eu.bcvsolutions.idm.ic.filter.impl.IcOrFilter) OrFilter(org.identityconnectors.framework.common.objects.filter.OrFilter) IcEndsWithFilter(eu.bcvsolutions.idm.ic.filter.impl.IcEndsWithFilter) EndsWithFilter(org.identityconnectors.framework.common.objects.filter.EndsWithFilter) LinkedList(java.util.LinkedList) IcAndFilter(eu.bcvsolutions.idm.ic.filter.impl.IcAndFilter) AndFilter(org.identityconnectors.framework.common.objects.filter.AndFilter) IcLessThanFilter(eu.bcvsolutions.idm.ic.filter.impl.IcLessThanFilter) LessThanFilter(org.identityconnectors.framework.common.objects.filter.LessThanFilter) IcContainsFilter(eu.bcvsolutions.idm.ic.filter.impl.IcContainsFilter) IcNotFilter(eu.bcvsolutions.idm.ic.filter.impl.IcNotFilter) Filter(org.identityconnectors.framework.common.objects.filter.Filter) IcStartsWithFilter(eu.bcvsolutions.idm.ic.filter.impl.IcStartsWithFilter) ContainsAllValuesFilter(org.identityconnectors.framework.common.objects.filter.ContainsAllValuesFilter) IcFilter(eu.bcvsolutions.idm.ic.filter.api.IcFilter) NotFilter(org.identityconnectors.framework.common.objects.filter.NotFilter) IcEndsWithFilter(eu.bcvsolutions.idm.ic.filter.impl.IcEndsWithFilter) IcAttributeFilter(eu.bcvsolutions.idm.ic.filter.impl.IcAttributeFilter) EqualsFilter(org.identityconnectors.framework.common.objects.filter.EqualsFilter) EndsWithFilter(org.identityconnectors.framework.common.objects.filter.EndsWithFilter) StartsWithFilter(org.identityconnectors.framework.common.objects.filter.StartsWithFilter) IcLessThanFilter(eu.bcvsolutions.idm.ic.filter.impl.IcLessThanFilter) IcEqualsFilter(eu.bcvsolutions.idm.ic.filter.impl.IcEqualsFilter) LessThanFilter(org.identityconnectors.framework.common.objects.filter.LessThanFilter) IcOrFilter(eu.bcvsolutions.idm.ic.filter.impl.IcOrFilter) IcAndFilter(eu.bcvsolutions.idm.ic.filter.impl.IcAndFilter) IcContainsAllValuesFilter(eu.bcvsolutions.idm.ic.filter.impl.IcContainsAllValuesFilter) AndFilter(org.identityconnectors.framework.common.objects.filter.AndFilter) ContainsFilter(org.identityconnectors.framework.common.objects.filter.ContainsFilter) GreaterThanFilter(org.identityconnectors.framework.common.objects.filter.GreaterThanFilter) IcGreaterThanFilter(eu.bcvsolutions.idm.ic.filter.impl.IcGreaterThanFilter) OrFilter(org.identityconnectors.framework.common.objects.filter.OrFilter) IcGreaterThanFilter(eu.bcvsolutions.idm.ic.filter.impl.IcGreaterThanFilter) IcStartsWithFilter(eu.bcvsolutions.idm.ic.filter.impl.IcStartsWithFilter) StartsWithFilter(org.identityconnectors.framework.common.objects.filter.StartsWithFilter) IcNotFilter(eu.bcvsolutions.idm.ic.filter.impl.IcNotFilter) NotFilter(org.identityconnectors.framework.common.objects.filter.NotFilter) GreaterThanFilter(org.identityconnectors.framework.common.objects.filter.GreaterThanFilter) IcGreaterThanFilter(eu.bcvsolutions.idm.ic.filter.impl.IcGreaterThanFilter) ContainsAllValuesFilter(org.identityconnectors.framework.common.objects.filter.ContainsAllValuesFilter) IcContainsAllValuesFilter(eu.bcvsolutions.idm.ic.filter.impl.IcContainsAllValuesFilter) IcEndsWithFilter(eu.bcvsolutions.idm.ic.filter.impl.IcEndsWithFilter) IcFilter(eu.bcvsolutions.idm.ic.filter.api.IcFilter)

Aggregations

IcAttribute (eu.bcvsolutions.idm.ic.api.IcAttribute)1 IcEnabledAttribute (eu.bcvsolutions.idm.ic.api.IcEnabledAttribute)1 IcLoginAttribute (eu.bcvsolutions.idm.ic.api.IcLoginAttribute)1 IcPasswordAttribute (eu.bcvsolutions.idm.ic.api.IcPasswordAttribute)1 IcUidAttribute (eu.bcvsolutions.idm.ic.api.IcUidAttribute)1 IcFilter (eu.bcvsolutions.idm.ic.filter.api.IcFilter)1 IcAndFilter (eu.bcvsolutions.idm.ic.filter.impl.IcAndFilter)1 IcAttributeFilter (eu.bcvsolutions.idm.ic.filter.impl.IcAttributeFilter)1 IcContainsAllValuesFilter (eu.bcvsolutions.idm.ic.filter.impl.IcContainsAllValuesFilter)1 IcContainsFilter (eu.bcvsolutions.idm.ic.filter.impl.IcContainsFilter)1 IcEndsWithFilter (eu.bcvsolutions.idm.ic.filter.impl.IcEndsWithFilter)1 IcEqualsFilter (eu.bcvsolutions.idm.ic.filter.impl.IcEqualsFilter)1 IcGreaterThanFilter (eu.bcvsolutions.idm.ic.filter.impl.IcGreaterThanFilter)1 IcLessThanFilter (eu.bcvsolutions.idm.ic.filter.impl.IcLessThanFilter)1 IcNotFilter (eu.bcvsolutions.idm.ic.filter.impl.IcNotFilter)1 IcOrFilter (eu.bcvsolutions.idm.ic.filter.impl.IcOrFilter)1 IcStartsWithFilter (eu.bcvsolutions.idm.ic.filter.impl.IcStartsWithFilter)1 ArrayList (java.util.ArrayList)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1