Search in sources :

Example 6 with FailedOperationTypeType

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

the class ConsistencyTest method checkPostponedAccountBasic.

private ShadowType checkPostponedAccountBasic(PrismObject<ShadowType> failedAccount, FailedOperationTypeType failedOperation, boolean modify, OperationResult parentResult) throws Exception {
    display("Repository shadow (postponed operation expected)", failedAccount);
    assertNotNull("Shadow must not be null", failedAccount);
    ShadowType failedAccountType = failedAccount.asObjectable();
    assertNotNull(failedAccountType);
    // Too much noise
    //		displayJaxb("shadow from the repository: ", failedAccountType, ShadowType.COMPLEX_TYPE);
    assertEquals("Failed operation saved with account differt from  the expected value.", failedOperation, failedAccountType.getFailedOperationType());
    assertNotNull("Result of failed shadow must not be null.", failedAccountType.getResult());
    assertNotNull("Shadow does not contain resource ref.", failedAccountType.getResourceRef());
    assertEquals("Wrong resource ref in shadow", resourceTypeOpenDjrepo.getOid(), failedAccountType.getResourceRef().getOid());
    if (modify) {
        assertNotNull("Null object change in shadow", failedAccountType.getObjectChange());
    }
    return failedAccountType;
}
Also used : ShadowType(com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType)

Example 7 with FailedOperationTypeType

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

the class PageAccounts method createObjectQuery.

private ObjectQuery createObjectQuery() {
    AccountDetailsSearchDto dto = searchModel.getObject();
    String searchText = dto.getText();
    ShadowKindType kind = dto.getKind();
    String intent = dto.getIntent();
    String objectClass = dto.getObjectClass();
    FailedOperationTypeType failedOperatonType = dto.getFailedOperationType();
    S_AtomicFilterEntry q = QueryBuilder.queryFor(ShadowType.class, getPrismContext());
    if (StringUtils.isNotEmpty(searchText)) {
        PolyStringNormalizer normalizer = getPrismContext().getDefaultPolyStringNormalizer();
        String normalized = normalizer.normalize(searchText);
        q = q.item(ShadowType.F_NAME).contains(normalized).matchingNorm().and();
    }
    if (kind != null) {
        q = q.item(ShadowType.F_KIND).eq(kind).and();
    }
    if (StringUtils.isNotEmpty(intent)) {
        q = q.item(ShadowType.F_INTENT).eq(intent).and();
    }
    if (failedOperatonType != null) {
        q = q.item(ShadowType.F_FAILED_OPERATION_TYPE).eq(failedOperatonType).and();
    }
    if (StringUtils.isNotEmpty(objectClass)) {
        QName objClass = new QName(objectClass);
        for (QName qn : dto.getObjectClassList()) {
            if (objectClass.equals(qn.getLocalPart())) {
                objClass = qn;
            }
        }
        q = q.item(ShadowType.F_OBJECT_CLASS).eq(objClass).and();
    }
    return appendResourceQueryFilter(q);
}
Also used : AccountDetailsSearchDto(com.evolveum.midpoint.web.page.admin.configuration.dto.AccountDetailsSearchDto) QName(javax.xml.namespace.QName) S_AtomicFilterEntry(com.evolveum.midpoint.prism.query.builder.S_AtomicFilterEntry) ShadowKindType(com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowKindType) FailedOperationTypeType(com.evolveum.midpoint.xml.ns._public.common.common_3.FailedOperationTypeType) PolyStringNormalizer(com.evolveum.midpoint.prism.polystring.PolyStringNormalizer)

Aggregations

FailedOperationTypeType (com.evolveum.midpoint.xml.ns._public.common.common_3.FailedOperationTypeType)4 AccountDetailsSearchDto (com.evolveum.midpoint.web.page.admin.configuration.dto.AccountDetailsSearchDto)2 ActivationType (com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationType)2 ShadowKindType (com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowKindType)2 ShadowType (com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType)2 QName (javax.xml.namespace.QName)2 PolyStringNormalizer (com.evolveum.midpoint.prism.polystring.PolyStringNormalizer)1 S_AtomicFilterEntry (com.evolveum.midpoint.prism.query.builder.S_AtomicFilterEntry)1 BasicSearchPanel (com.evolveum.midpoint.web.component.BasicSearchPanel)1 StringChoiceRenderer (com.evolveum.midpoint.web.component.input.StringChoiceRenderer)1 SearchFormEnterBehavior (com.evolveum.midpoint.web.util.SearchFormEnterBehavior)1 OperationResultType (com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType)1 ArrayList (java.util.ArrayList)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1 OnChangeAjaxBehavior (org.apache.wicket.ajax.form.OnChangeAjaxBehavior)1 AutoCompleteTextField (org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField)1 DropDownChoice (org.apache.wicket.markup.html.form.DropDownChoice)1 PropertyModel (org.apache.wicket.model.PropertyModel)1