use of com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectCollectionType in project midpoint by Evolveum.
the class PageObjectCollections method initLayout.
private void initLayout() {
Form mainForm = new MidpointForm(ID_MAIN_FORM);
add(mainForm);
MainObjectListPanel<ObjectCollectionType> table = new MainObjectListPanel<ObjectCollectionType>(ID_TABLE, ObjectCollectionType.class) {
@Override
protected UserProfileStorage.TableId getTableId() {
return UserProfileStorage.TableId.TABLE_OBJECTS_COLLECTION;
}
@Override
protected List<InlineMenuItem> createInlineMenu() {
List<InlineMenuItem> menu = new ArrayList<>();
menu.add(createDeleteInlineMenu());
return menu;
}
@Override
protected List<IColumn<SelectableBean<ObjectCollectionType>, String>> createDefaultColumns() {
return ColumnUtils.getDefaultObjectColumns();
}
@Override
protected String getNothingSelectedMessage() {
return getString("pageObjectCollections.message.nothingSelected");
}
@Override
protected String getConfirmMessageKeyForSingleObject() {
return "pageObjectCollections.message.confirmationMessageForMultipleObject";
}
@Override
protected String getConfirmMessageKeyForMultiObject() {
return "pageObjectCollections.message.confirmationMessageForSingleObject";
}
};
table.setOutputMarkupId(true);
mainForm.add(table);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectCollectionType in project midpoint by Evolveum.
the class DashboardServiceImpl method combineAuditFilter.
private ObjectFilter combineAuditFilter(CollectionRefSpecificationType collectionRef, SearchFilterType baseFilter, Task task, OperationResult result) throws CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, ExpressionEvaluationException {
SearchFilterType filter = baseFilter;
if (filter == null) {
if (collectionRef.getCollectionRef() != null) {
@NotNull PrismObject<ObjectCollectionType> collection = modelService.getObject(ObjectCollectionType.class, collectionRef.getCollectionRef().getOid(), null, task, result);
filter = collection.asObjectable().getFilter();
} else {
filter = collectionRef.getFilter();
}
}
if (collectionRef.getBaseCollectionRef() != null && collectionRef.getBaseCollectionRef().getCollectionRef() != null && collectionRef.getBaseCollectionRef().getCollectionRef().getOid() != null) {
@NotNull PrismObject<ObjectCollectionType> baseCollection = modelService.getObject(ObjectCollectionType.class, collectionRef.getCollectionRef().getOid(), null, task, result);
if (filter == null && baseCollection.asObjectable().getFilter() == null) {
return null;
} else if (filter == null) {
return prismContext.getQueryConverter().parseFilter(baseCollection.asObjectable().getFilter(), AuditEventRecordType.class);
} else if (baseCollection.asObjectable().getFilter() == null) {
return prismContext.getQueryConverter().parseFilter(filter, AuditEventRecordType.class);
} else {
ObjectFilter baseFilterFromCollection = prismContext.getQueryConverter().parseFilter(baseCollection.asObjectable().getFilter(), AuditEventRecordType.class);
ObjectFilter baseObjectFilter = prismContext.getQueryConverter().parseFilter(filter, AuditEventRecordType.class);
ObjectQueryUtil.filterAnd(baseFilterFromCollection, baseObjectFilter, prismContext);
return prismContext.getQueryConverter().parseFilter(filter, AuditEventRecordType.class);
}
}
if (filter == null) {
return null;
}
return prismContext.getQueryConverter().parseFilter(filter, AuditEventRecordType.class);
}
Aggregations