use of com.evolveum.midpoint.xml.ns._public.common.common_3.GetOperationOptionsType in project midpoint by Evolveum.
the class ExportAction method createOptions.
private SelectorQualifiedGetOptionsType createOptions() {
SelectorQualifiedGetOptionsType options = new SelectorQualifiedGetOptionsType();
if (getParams().isRaw()) {
SelectorQualifiedGetOptionType raw = new SelectorQualifiedGetOptionType();
GetOperationOptionsType option = new GetOperationOptionsType();
option.setRaw(true);
raw.setOptions(option);
options.getOption().add(raw);
}
return options;
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.GetOperationOptionsType 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.GetOperationOptionsType 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.GetOperationOptionsType in project midpoint by Evolveum.
the class AbstractTestForExchangeConnector method getObjectNoFetch.
protected <T extends ObjectType> T getObjectNoFetch(Class<T> clazz, String oid) throws SAXException, IOException, FaultMessage {
SelectorQualifiedGetOptionsType options = new SelectorQualifiedGetOptionsType();
SelectorQualifiedGetOptionType option = new SelectorQualifiedGetOptionType();
GetOperationOptionsType getOptions = new GetOperationOptionsType();
getOptions.setNoFetch(true);
option.setOptions(getOptions);
options.getOption().add(option);
return getObject(clazz, oid, options);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.GetOperationOptionsType in project midpoint by Evolveum.
the class ModelClientUtil method createRootGetOptions.
public static SelectorQualifiedGetOptionsType createRootGetOptions(GetOperationOptionsType opt) {
SelectorQualifiedGetOptionsType rootOpts = new SelectorQualifiedGetOptionsType();
SelectorQualifiedGetOptionType selOpt = new SelectorQualifiedGetOptionType();
selOpt.setOptions(opt);
rootOpts.getOption().add(selOpt);
return rootOpts;
}
Aggregations