Search in sources :

Example 1 with GetOperationOptionsType

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;
}
Also used : GetOperationOptionsType(com.evolveum.midpoint.xml.ns._public.common.common_3.GetOperationOptionsType) SelectorQualifiedGetOptionType(com.evolveum.midpoint.xml.ns._public.common.common_3.SelectorQualifiedGetOptionType) SelectorQualifiedGetOptionsType(com.evolveum.midpoint.xml.ns._public.common.common_3.SelectorQualifiedGetOptionsType)

Example 2 with GetOperationOptionsType

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();
}
Also used : GetOperationOptionsType(com.evolveum.midpoint.xml.ns._public.common.common_3.GetOperationOptionsType) OperationResultType(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType) OptionObjectSelectorType(com.evolveum.midpoint.xml.ns._public.common.common_3.OptionObjectSelectorType) Holder(javax.xml.ws.Holder) TaskType(com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType) Collection(java.util.Collection) SelectorQualifiedGetOptionType(com.evolveum.midpoint.xml.ns._public.common.common_3.SelectorQualifiedGetOptionType) ObjectListType(com.evolveum.midpoint.xml.ns._public.common.api_types_3.ObjectListType) SelectorQualifiedGetOptionsType(com.evolveum.midpoint.xml.ns._public.common.common_3.SelectorQualifiedGetOptionsType)

Example 3 with GetOperationOptionsType

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();
}
Also used : GetOperationOptionsType(com.evolveum.midpoint.xml.ns._public.common.common_3.GetOperationOptionsType) OperationResultType(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType) OptionObjectSelectorType(com.evolveum.midpoint.xml.ns._public.common.common_3.OptionObjectSelectorType) Holder(javax.xml.ws.Holder) TaskType(com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType) Collection(java.util.Collection) SelectorQualifiedGetOptionType(com.evolveum.midpoint.xml.ns._public.common.common_3.SelectorQualifiedGetOptionType) ObjectListType(com.evolveum.midpoint.xml.ns._public.common.api_types_3.ObjectListType) SelectorQualifiedGetOptionsType(com.evolveum.midpoint.xml.ns._public.common.common_3.SelectorQualifiedGetOptionsType)

Example 4 with GetOperationOptionsType

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);
}
Also used : GetOperationOptionsType(com.evolveum.midpoint.xml.ns._public.common.common_3.GetOperationOptionsType) SelectorQualifiedGetOptionType(com.evolveum.midpoint.xml.ns._public.common.common_3.SelectorQualifiedGetOptionType) SelectorQualifiedGetOptionsType(com.evolveum.midpoint.xml.ns._public.common.common_3.SelectorQualifiedGetOptionsType)

Example 5 with GetOperationOptionsType

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;
}
Also used : SelectorQualifiedGetOptionType(com.evolveum.midpoint.xml.ns._public.common.common_3.SelectorQualifiedGetOptionType) SelectorQualifiedGetOptionsType(com.evolveum.midpoint.xml.ns._public.common.common_3.SelectorQualifiedGetOptionsType)

Aggregations

GetOperationOptionsType (com.evolveum.midpoint.xml.ns._public.common.common_3.GetOperationOptionsType)7 SelectorQualifiedGetOptionType (com.evolveum.midpoint.xml.ns._public.common.common_3.SelectorQualifiedGetOptionType)6 SelectorQualifiedGetOptionsType (com.evolveum.midpoint.xml.ns._public.common.common_3.SelectorQualifiedGetOptionsType)5 OptionObjectSelectorType (com.evolveum.midpoint.xml.ns._public.common.common_3.OptionObjectSelectorType)3 ObjectListType (com.evolveum.midpoint.xml.ns._public.common.api_types_3.ObjectListType)2 OperationResultType (com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType)2 TaskType (com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType)2 Collection (java.util.Collection)2 Holder (javax.xml.ws.Holder)2