Search in sources :

Example 6 with AccessCertificationDefinitionType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationDefinitionType in project midpoint by Evolveum.

the class PageCertDefinitions method deleteDefinitionPerformed.

private void deleteDefinitionPerformed(AjaxRequestTarget target, AccessCertificationDefinitionType definition) {
    OperationResult result = new OperationResult(OPERATION_DELETE_DEFINITION);
    try {
        Task task = createSimpleTask(OPERATION_DELETE_DEFINITION);
        ObjectDelta<AccessCertificationDefinitionType> delta = ObjectDelta.createDeleteDelta(AccessCertificationDefinitionType.class, definition.getOid(), getPrismContext());
        getModelService().executeChanges(WebComponentUtil.createDeltaCollection(delta), null, task, result);
    } catch (Exception ex) {
        result.recordPartialError("Couldn't delete campaign definition.", ex);
        LoggingUtils.logUnexpectedException(LOGGER, "Couldn't delete campaign definition", ex);
    }
    result.computeStatusIfUnknown();
    if (result.isSuccess()) {
        result.recordStatus(OperationResultStatus.SUCCESS, "The definition has been successfully deleted.");
    }
    getDefinitionsTable().clearCache();
    showResult(result);
    target.add(getFeedbackPanel(), getDefinitionsTable());
}
Also used : Task(com.evolveum.midpoint.task.api.Task) AccessCertificationDefinitionType(com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationDefinitionType) OperationResult(com.evolveum.midpoint.schema.result.OperationResult)

Aggregations

AccessCertificationDefinitionType (com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationDefinitionType)5 Task (com.evolveum.midpoint.task.api.Task)3 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)2 SelectableBean (com.evolveum.midpoint.web.component.util.SelectableBean)2 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)2 IColumn (org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn)2 AuditEventRecord (com.evolveum.midpoint.audit.api.AuditEventRecord)1 AuditEventStage (com.evolveum.midpoint.audit.api.AuditEventStage)1 AuditEventType (com.evolveum.midpoint.audit.api.AuditEventType)1 AuditService (com.evolveum.midpoint.audit.api.AuditService)1 MainObjectListPanel (com.evolveum.midpoint.gui.api.component.MainObjectListPanel)1 ModelService (com.evolveum.midpoint.model.api.ModelService)1 com.evolveum.midpoint.prism (com.evolveum.midpoint.prism)1 ItemPath (com.evolveum.midpoint.prism.path.ItemPath)1 ObjectFilter (com.evolveum.midpoint.prism.query.ObjectFilter)1 ObjectQuery (com.evolveum.midpoint.prism.query.ObjectQuery)1 QueryBuilder (com.evolveum.midpoint.prism.query.builder.QueryBuilder)1 GetOperationOptions (com.evolveum.midpoint.schema.GetOperationOptions)1 ResultHandler (com.evolveum.midpoint.schema.ResultHandler)1 RetrieveOption (com.evolveum.midpoint.schema.RetrieveOption)1