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;
}
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);
}
Aggregations