use of com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto in project midpoint by Evolveum.
the class PageDebugList method listObjectsPerformed.
/**
* called when object type is changed, search panel will be refreshed
*/
private void listObjectsPerformed(AjaxRequestTarget target) {
DebugSearchDto dto = searchModel.getObject();
setupSearchDto(dto);
Search search = dto.getSearch();
ObjectQuery query = search.createObjectQuery(getPrismContext());
listObjectsPerformed(query, target);
}
use of com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto in project midpoint by Evolveum.
the class PageDebugList method initLayout.
private void initLayout() {
Form main = new Form(ID_MAIN_FORM);
add(main);
DebugSearchDto dto = searchModel.getObject();
Class type = dto.getType().getClassDefinition();
RepositoryObjectDataProvider provider = new RepositoryObjectDataProvider(this, type) {
@Override
protected void saveProviderPaging(ObjectQuery query, ObjectPaging paging) {
ConfigurationStorage storage = getSessionStorage().getConfiguration();
storage.setPaging(paging);
}
};
DebugSearchDto search = searchModel.getObject();
ObjectQuery query = search.getSearch().createObjectQuery(getPrismContext());
provider.setQuery(createQuery(query));
addOrReplaceTable(provider);
PageDebugDownloadBehaviour ajaxDownloadBehavior = new PageDebugDownloadBehaviour();
main.add(ajaxDownloadBehavior);
}
use of com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto in project midpoint by Evolveum.
the class PageDebugList method deleteAllShadowsOnResourceConfirmed.
private void deleteAllShadowsOnResourceConfirmed(AjaxRequestTarget target) {
DebugSearchDto dto = searchModel.getObject();
String resourceOid = dto.getResource().getOid();
LOGGER.debug("Deleting shadows on resource {}", resourceOid);
OperationResult result = new OperationResult(OPERATION_DELETE_SHADOWS);
String taskOid = null;
try {
ObjectQuery objectQuery = QueryBuilder.queryFor(ShadowType.class, getPrismContext()).item(ShadowType.F_RESOURCE_REF).ref(dto.getResource().getOid()).build();
QName type = ShadowType.COMPLEX_TYPE;
taskOid = deleteObjectsAsync(type, objectQuery, true, "Delete shadows on " + dto.getResource().getName(), result);
info(getString("pageDebugList.messsage.deleteAllShadowsStarted", dto.getResource().getName()));
} catch (Exception ex) {
result.recomputeStatus();
result.recordFatalError("Couldn't delete shadows.", ex);
LoggingUtils.logUnexpectedException(LOGGER, "Couldn't delete shadows", ex);
}
showResult(result);
if (taskOid != null) {
PageParameters parameters = new PageParameters();
parameters.add(OnePageParameterEncoder.PARAMETER, taskOid);
navigateToNext(PageTaskEdit.class, parameters);
} else {
navigateToNext(PageTasks.class);
}
target.add(getFeedbackPanel());
}
use of com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto in project midpoint by Evolveum.
the class PageDebugList method deleteAllType.
private void deleteAllType(AjaxRequestTarget target) {
DebugSearchDto searchDto = searchModel.getObject();
DebugConfDialogDto dto = new DebugConfDialogDto(DebugConfDialogDto.Operation.DELETE_ALL_TYPE, null, searchDto.getType().getClassDefinition());
confDialogModel.setObject(dto);
showMainPopup(getDeleteConfirmationPanel(), target);
}
Aggregations