use of com.evolveum.midpoint.schema.GetOperationOptionsBuilder in project midpoint by Evolveum.
the class PageDebugDownloadBehaviour method dumpObjectsToStream.
private void dumpObjectsToStream(final Writer writer, OperationResult result) throws Exception {
final PageBase page = getPage();
ResultHandler handler = (object, parentResult) -> {
try {
String xml = page.getPrismContext().xmlSerializer().options(createSerializeForExport()).serialize(object);
writer.write('\t');
writer.write(xml);
writer.write('\n');
} catch (IOException | SchemaException ex) {
throw new SystemException(ex.getMessage(), ex);
}
return true;
};
ModelService service = page.getModelService();
GetOperationOptionsBuilder optionsBuilder = page.getSchemaService().getOperationOptionsBuilder().raw().resolveNames();
if (showAllItems) {
optionsBuilder = optionsBuilder.retrieve();
}
service.searchObjectsIterative(type, query, handler, optionsBuilder.build(), page.createSimpleTask(OPERATION_SEARCH_OBJECT), result);
}
use of com.evolveum.midpoint.schema.GetOperationOptionsBuilder in project midpoint by Evolveum.
the class TaskSubtasksAndThreadsPanel method createOperationOptions.
private Collection<SelectorOptions<GetOperationOptions>> createOperationOptions() {
List<QName> propertiesToGet = new ArrayList<>();
propertiesToGet.add(TaskType.F_SUBTASK_REF);
propertiesToGet.add(TaskType.F_NODE_AS_OBSERVED);
GetOperationOptionsBuilder getOperationOptionsBuilder = getPageBase().getOperationOptionsBuilder();
getOperationOptionsBuilder = getOperationOptionsBuilder.resolveNames();
return getOperationOptionsBuilder.items(propertiesToGet.toArray(new Object[0])).retrieve().build();
}
use of com.evolveum.midpoint.schema.GetOperationOptionsBuilder in project midpoint by Evolveum.
the class PageTasks method createOperationOptions.
private Collection<SelectorOptions<GetOperationOptions>> createOperationOptions() {
List<QName> propertiesToGet = new ArrayList<>();
propertiesToGet.add(TaskType.F_NODE_AS_OBSERVED);
propertiesToGet.add(TaskType.F_NEXT_RUN_START_TIMESTAMP);
propertiesToGet.add(TaskType.F_NEXT_RETRY_TIMESTAMP);
GetOperationOptionsBuilder getOperationOptionsBuilder = getSchemaService().getOperationOptionsBuilder();
getOperationOptionsBuilder = getOperationOptionsBuilder.resolveNames();
return getOperationOptionsBuilder.items(propertiesToGet.toArray(new Object[0])).retrieve().build();
}
use of com.evolveum.midpoint.schema.GetOperationOptionsBuilder in project midpoint by Evolveum.
the class TaskSubtasksAndThreadsTabPanel method createOperationOptions.
private Collection<SelectorOptions<GetOperationOptions>> createOperationOptions() {
List<QName> propertiesToGet = new ArrayList<>();
propertiesToGet.add(TaskType.F_SUBTASK_REF);
propertiesToGet.add(TaskType.F_NODE_AS_OBSERVED);
GetOperationOptionsBuilder getOperationOptionsBuilder = getSchemaService().getOperationOptionsBuilder();
getOperationOptionsBuilder = getOperationOptionsBuilder.resolveNames();
return getOperationOptionsBuilder.items(propertiesToGet.toArray(new Object[0])).retrieve().build();
}
use of com.evolveum.midpoint.schema.GetOperationOptionsBuilder in project midpoint by Evolveum.
the class SqaleRepoLookupTableTest method test124LookupLanguagesOrderById.
@Test
public void test124LookupLanguagesOrderById() throws Exception {
given();
OperationResult result = createOperationResult();
when();
GetOperationOptionsBuilder optionsBuilder = SchemaService.get().getOperationOptionsBuilder().item(LookupTableType.F_ROW).retrieveQuery().item(LookupTableRowType.F_KEY).contains("_").offset(2).maxSize(1).asc(PrismConstants.T_ID).end();
PrismObject<LookupTableType> lookup = repositoryService.getObject(LookupTableType.class, LOOKUP_LANGUAGES_OID, optionsBuilder.build(), result);
then();
assertThatOperationResult(result).isSuccess();
assertThat(lookup).isNotNull();
}
Aggregations