use of com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto in project midpoint by Evolveum.
the class PageDebugList method exportSelected.
private void exportSelected(AjaxRequestTarget target, DebugObjectItem item) {
List<DebugObjectItem> selected = getSelectedData(target, item);
if (selected.isEmpty()) {
return;
}
List<String> oids = new ArrayList<>();
for (DebugObjectItem dItem : selected) {
oids.add(dItem.getOid());
}
ObjectFilter filter = InOidFilter.createInOid(oids);
DebugSearchDto searchDto = searchModel.getObject();
initDownload(target, searchDto.getType().getClassDefinition(), ObjectQuery.createObjectQuery(filter));
}
use of com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto in project midpoint by Evolveum.
the class PageDebugList method listObjectsPerformed.
private void listObjectsPerformed(ObjectQuery query, AjaxRequestTarget target) {
DebugSearchDto dto = searchModel.getObject();
ObjectTypes selected = dto.getType();
RepositoryObjectDataProvider provider = getTableDataProvider();
provider.setQuery(createQuery(query));
if (selected != null) {
provider.setType(selected.getClassDefinition());
addOrReplaceTable(provider);
}
// save object type category to session storage, used by back button
ConfigurationStorage storage = getSessionStorage().getConfiguration();
storage.setDebugSearchDto(dto);
Table table = getListTable();
target.add((Component) table);
}
use of com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto in project midpoint by Evolveum.
the class PageDebugList method deleteSelected.
private void deleteSelected(AjaxRequestTarget target, DebugObjectItem item) {
List<DebugObjectItem> selected = getSelectedData(target, item);
if (selected.isEmpty()) {
return;
}
DebugSearchDto searchDto = searchModel.getObject();
DebugConfDialogDto dto = new DebugConfDialogDto(DebugConfDialogDto.Operation.DELETE_SELECTED, selected, searchDto.getType().getClassDefinition());
confDialogModel.setObject(dto);
showMainPopup(getDeleteConfirmationPanel(), target);
}
use of com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto in project midpoint by Evolveum.
the class PageDebugList method exportAllType.
private void exportAllType(AjaxRequestTarget target) {
DebugSearchDto searchDto = searchModel.getObject();
initDownload(target, searchDto.getType().getClassDefinition(), null);
}
use of com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto in project midpoint by Evolveum.
the class PageDebugList method createQuery.
private ObjectQuery createQuery(ObjectQuery searchQuery) {
DebugSearchDto dto = searchModel.getObject();
List<ObjectFilter> filters = new ArrayList<>();
if (ObjectTypes.SHADOW.equals(dto.getType()) && dto.getResource() != null) {
String oid = dto.getResource().getOid();
ObjectFilter objectFilter = QueryBuilder.queryFor(ShadowType.class, getPrismContext()).item(ShadowType.F_RESOURCE_REF).ref(oid).buildFilter();
filters.add(objectFilter);
}
if (searchQuery != null && searchQuery.getFilter() != null) {
filters.add(searchQuery.getFilter());
}
if (filters.isEmpty()) {
return null;
}
ObjectFilter filter = filters.size() > 1 ? AndFilter.createAnd(filters) : filters.get(0);
ObjectQuery query = new ObjectQuery();
query.setFilter(filter);
return query;
}
Aggregations