use of com.evolveum.midpoint.xml.ns._public.common.common_3.OptionObjectSelectorType in project midpoint by Evolveum.
the class AbstractTestForExchangeConnector method listTasks.
protected Collection<TaskType> listTasks() throws SAXException, IOException, FaultMessage {
SelectorQualifiedGetOptionsType operationOptions = new SelectorQualifiedGetOptionsType();
// Let's say we want to retrieve tasks' next scheduled time (because this may be a costly operation if
// JDBC based quartz scheduler is used, the fetching of this attribute has to be explicitly requested)
SelectorQualifiedGetOptionType getNextScheduledTimeOption = new SelectorQualifiedGetOptionType();
// prepare a selector (described by path) + options (saying to retrieve that attribute)
OptionObjectSelectorType selector = new OptionObjectSelectorType();
selector.setPath(ModelClientUtil.createItemPathType("nextRunStartTimestamp"));
getNextScheduledTimeOption.setSelector(selector);
GetOperationOptionsType selectorOptions = new GetOperationOptionsType();
selectorOptions.setRetrieve(RetrieveOptionType.INCLUDE);
getNextScheduledTimeOption.setOptions(selectorOptions);
// add newly created option to the list of operation options
operationOptions.getOption().add(getNextScheduledTimeOption);
Holder<ObjectListType> objectListHolder = new Holder<ObjectListType>();
Holder<OperationResultType> resultHolder = new Holder<OperationResultType>();
modelPort.searchObjects(ModelClientUtil.getTypeQName(TaskType.class), null, operationOptions, objectListHolder, resultHolder);
ObjectListType objectList = objectListHolder.value;
return (Collection) objectList.getObject();
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.OptionObjectSelectorType in project midpoint by Evolveum.
the class GetOperationOptionsUtil method selectorToSelectorType.
private static OptionObjectSelectorType selectorToSelectorType(ObjectSelector selector) {
if (selector == null) {
return null;
}
OptionObjectSelectorType selectorType = new OptionObjectSelectorType();
selectorType.setPath(new ItemPathType(selector.getPath()));
return selectorType;
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.OptionObjectSelectorType in project midpoint by Evolveum.
the class Main method listTasks.
private static Collection<TaskType> listTasks(ModelPortType modelPort) throws SAXException, IOException, FaultMessage {
SelectorQualifiedGetOptionsType operationOptions = new SelectorQualifiedGetOptionsType();
// Let's say we want to retrieve tasks' next scheduled time (because this may be a costly operation if
// JDBC based quartz scheduler is used, the fetching of this attribute has to be explicitly requested)
SelectorQualifiedGetOptionType getNextScheduledTimeOption = new SelectorQualifiedGetOptionType();
// prepare a selector (described by path) + options (saying to retrieve that attribute)
OptionObjectSelectorType selector = new OptionObjectSelectorType();
selector.setPath(ModelClientUtil.createItemPathType("nextRunStartTimestamp"));
getNextScheduledTimeOption.setSelector(selector);
GetOperationOptionsType selectorOptions = new GetOperationOptionsType();
selectorOptions.setRetrieve(RetrieveOptionType.INCLUDE);
getNextScheduledTimeOption.setOptions(selectorOptions);
// add newly created option to the list of operation options
operationOptions.getOption().add(getNextScheduledTimeOption);
Holder<ObjectListType> objectListHolder = new Holder<ObjectListType>();
Holder<OperationResultType> resultHolder = new Holder<OperationResultType>();
modelPort.searchObjects(ModelClientUtil.getTypeQName(TaskType.class), null, operationOptions, objectListHolder, resultHolder);
ObjectListType objectList = objectListHolder.value;
return (Collection) objectList.getObject();
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.OptionObjectSelectorType in project midpoint by Evolveum.
the class GetOperationOptionsUtil method selectorOptionToSelectorQualifiedGetOptionType.
private static SelectorQualifiedGetOptionType selectorOptionToSelectorQualifiedGetOptionType(SelectorOptions<GetOperationOptions> selectorOption) {
OptionObjectSelectorType selectorType = selectorToSelectorType(selectorOption.getSelector());
GetOperationOptionsType getOptionsType = getOptionsToGetOptionsType(selectorOption.getOptions());
SelectorQualifiedGetOptionType selectorOptionType = new SelectorQualifiedGetOptionType();
selectorOptionType.setOptions(getOptionsType);
selectorOptionType.setSelector(selectorType);
return selectorOptionType;
}
Aggregations