use of com.evolveum.midpoint.xml.ns._public.common.common_3.SelectorQualifiedGetOptionType 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.SelectorQualifiedGetOptionType 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.SelectorQualifiedGetOptionType in project midpoint by Evolveum.
the class GetOperationOptionsUtil method optionsToOptionsBean.
@SuppressWarnings("WeakerAccess")
@NotNull
public static SelectorQualifiedGetOptionsType optionsToOptionsBean(@NotNull Collection<SelectorOptions<GetOperationOptions>> options) {
SelectorQualifiedGetOptionsType optionsType = new SelectorQualifiedGetOptionsType();
List<SelectorQualifiedGetOptionType> retval = new ArrayList<>();
for (SelectorOptions<GetOperationOptions> option : options) {
retval.add(selectorOptionToSelectorQualifiedGetOptionType(option));
}
optionsType.getOption().addAll(retval);
return optionsType;
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.SelectorQualifiedGetOptionType 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.SelectorQualifiedGetOptionType 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);
}
Aggregations