Search in sources :

Example 11 with DebugSearchDto

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);
}
Also used : Search(com.evolveum.midpoint.web.component.search.Search) DebugSearchDto(com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto) ObjectQuery(com.evolveum.midpoint.prism.query.ObjectQuery)

Example 12 with DebugSearchDto

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);
}
Also used : ObjectPaging(com.evolveum.midpoint.prism.query.ObjectPaging) RepositoryObjectDataProvider(com.evolveum.midpoint.web.component.data.RepositoryObjectDataProvider) ConfigurationStorage(com.evolveum.midpoint.web.session.ConfigurationStorage) Form(org.apache.wicket.markup.html.form.Form) PageDebugDownloadBehaviour(com.evolveum.midpoint.web.page.admin.configuration.component.PageDebugDownloadBehaviour) DebugSearchDto(com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto) ObjectQuery(com.evolveum.midpoint.prism.query.ObjectQuery)

Example 13 with DebugSearchDto

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());
}
Also used : QName(javax.xml.namespace.QName) DebugSearchDto(com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters) ObjectQuery(com.evolveum.midpoint.prism.query.ObjectQuery) SchemaException(com.evolveum.midpoint.util.exception.SchemaException) ObjectAlreadyExistsException(com.evolveum.midpoint.util.exception.ObjectAlreadyExistsException) ObjectNotFoundException(com.evolveum.midpoint.util.exception.ObjectNotFoundException)

Example 14 with DebugSearchDto

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);
}
Also used : DebugConfDialogDto(com.evolveum.midpoint.web.page.admin.configuration.dto.DebugConfDialogDto) DebugSearchDto(com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto)

Aggregations

DebugSearchDto (com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto)14 ObjectQuery (com.evolveum.midpoint.prism.query.ObjectQuery)6 DebugConfDialogDto (com.evolveum.midpoint.web.page.admin.configuration.dto.DebugConfDialogDto)4 DebugObjectItem (com.evolveum.midpoint.web.page.admin.configuration.dto.DebugObjectItem)3 ArrayList (java.util.ArrayList)3 ObjectFilter (com.evolveum.midpoint.prism.query.ObjectFilter)2 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)2 ObjectAlreadyExistsException (com.evolveum.midpoint.util.exception.ObjectAlreadyExistsException)2 ObjectNotFoundException (com.evolveum.midpoint.util.exception.ObjectNotFoundException)2 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)2 RepositoryObjectDataProvider (com.evolveum.midpoint.web.component.data.RepositoryObjectDataProvider)2 ConfigurationStorage (com.evolveum.midpoint.web.session.ConfigurationStorage)2 QName (javax.xml.namespace.QName)2 Form (org.apache.wicket.markup.html.form.Form)2 AbstractReadOnlyModel (org.apache.wicket.model.AbstractReadOnlyModel)2 PageParameters (org.apache.wicket.request.mapper.parameter.PageParameters)2 LoadableModel (com.evolveum.midpoint.gui.api.model.LoadableModel)1 ObjectPaging (com.evolveum.midpoint.prism.query.ObjectPaging)1 ObjectTypes (com.evolveum.midpoint.schema.constants.ObjectTypes)1 Table (com.evolveum.midpoint.web.component.data.Table)1