use of org.apache.syncope.common.lib.search.AbstractFiqlSearchConditionBuilder in project syncope by apache.
the class NotificationWrapper method getAboutFIQLs.
public Map<String, String> getAboutFIQLs() {
if (CollectionUtils.isEmpty(this.aboutClauses)) {
return this.notificationTO.getAbouts();
} else {
Map<String, String> res = new HashMap<>();
for (Pair<String, List<SearchClause>> pair : this.aboutClauses) {
AbstractFiqlSearchConditionBuilder builder;
switch(pair.getLeft()) {
case "USER":
builder = SyncopeClient.getUserSearchConditionBuilder();
break;
case "GROUP":
builder = SyncopeClient.getGroupSearchConditionBuilder();
break;
default:
builder = SyncopeClient.getAnyObjectSearchConditionBuilder(pair.getLeft());
}
res.put(pair.getLeft(), SearchUtils.buildFIQL(pair.getRight(), builder));
}
return res;
}
}
use of org.apache.syncope.common.lib.search.AbstractFiqlSearchConditionBuilder in project syncope by apache.
the class PushTaskWrapper method getFilters.
public Map<String, String> getFilters() {
Map<String, String> filters = new HashMap<>();
for (Map.Entry<String, List<SearchClause>> entry : getFilterClauses().entrySet()) {
if (!entry.getValue().isEmpty()) {
AbstractFiqlSearchConditionBuilder bld;
switch(entry.getKey()) {
case "USER":
bld = SyncopeClient.getUserSearchConditionBuilder();
break;
case "GROUP":
bld = SyncopeClient.getGroupSearchConditionBuilder();
break;
default:
bld = SyncopeClient.getAnyObjectSearchConditionBuilder(entry.getKey());
}
filters.put(entry.getKey(), SearchUtils.buildFIQL(entry.getValue(), bld));
}
}
return filters;
}
use of org.apache.syncope.common.lib.search.AbstractFiqlSearchConditionBuilder in project syncope by apache.
the class DynRealmWrapper method getDynMembershipConds.
public Map<String, String> getDynMembershipConds() {
final Map<String, String> res = new HashMap<>();
if (this.dynClauses != null && !this.dynClauses.isEmpty()) {
this.dynClauses.entrySet().stream().filter(entry -> (CollectionUtils.isNotEmpty(entry.getValue()))).forEachOrdered(entry -> {
AbstractFiqlSearchConditionBuilder builder = AnyTypeKind.USER.name().equals(entry.getKey()) ? SyncopeClient.getUserSearchConditionBuilder() : AnyTypeKind.GROUP.name().equals(entry.getKey()) ? SyncopeClient.getGroupSearchConditionBuilder() : SyncopeClient.getAnyObjectSearchConditionBuilder(entry.getKey());
String fiql = SearchUtils.buildFIQL(entry.getValue(), builder);
if (fiql != null) {
res.put(entry.getKey(), fiql);
}
});
}
return res;
}
Aggregations