Search in sources :

Example 1 with com.evolveum.prism.xml.ns._public.types_3

use of com.evolveum.prism.xml.ns._public.types_3 in project midpoint by Evolveum.

the class Main method createUserQuery2.

private static QueryType createUserQuery2(String username) throws JAXBException {
    QueryType query = new QueryType();
    SearchFilterType filter = new SearchFilterType();
    PropertyComplexValueFilterClauseType fc = new PropertyComplexValueFilterClauseType();
    ItemPathType path = new ItemPathType();
    path.setValue("declare namespace c=\"http://midpoint.evolveum.com/xml/ns/public/common/common-3\"; c:name");
    fc.setPath(path);
    fc.getValue().add(username);
    ObjectFactory factory = new ObjectFactory();
    JAXBElement<PropertyComplexValueFilterClauseType> equal = factory.createEqual(fc);
    JAXBContext jaxbContext = JAXBContext.newInstance("com.evolveum.midpoint.xml.ns._public.common.api_types_3:" + "com.evolveum.midpoint.xml.ns._public.common.common_3:" + "com.evolveum.prism.xml.ns._public.annotation_3:" + "com.evolveum.prism.xml.ns._public.query_3:" + "com.evolveum.prism.xml.ns._public.types_3:");
    Marshaller marshaller = jaxbContext.createMarshaller();
    DOMResult result = new DOMResult();
    marshaller.marshal(equal, result);
    filter.setFilterClause(((Document) result.getNode()).getDocumentElement());
    query.setFilter(filter);
    return query;
}
Also used : Marshaller(javax.xml.bind.Marshaller) SearchFilterType(com.evolveum.prism.xml.ns._public.query_3.SearchFilterType) DOMResult(javax.xml.transform.dom.DOMResult) ObjectFactory(com.evolveum.prism.xml.ns._public.query_3.ObjectFactory) ItemPathType(com.evolveum.prism.xml.ns._public.types_3.ItemPathType) PropertyComplexValueFilterClauseType(com.evolveum.prism.xml.ns._public.query_3.PropertyComplexValueFilterClauseType) JAXBContext(javax.xml.bind.JAXBContext) QueryType(com.evolveum.prism.xml.ns._public.query_3.QueryType)

Example 2 with com.evolveum.prism.xml.ns._public.types_3

use of com.evolveum.prism.xml.ns._public.types_3 in project midpoint by Evolveum.

the class SchemaDebugUtil method shortDump.

public static void shortDump(StringBuilder sb, ObjectDeltaType deltaType) {
    if (deltaType == null) {
        sb.append("null");
        return;
    }
    sb.append("delta(");
    QName objectType = deltaType.getObjectType();
    if (objectType == null) {
        sb.append("null");
    } else {
        sb.append(objectType.getLocalPart());
    }
    sb.append(" ");
    sb.append(deltaType.getOid()).append(" ");
    sb.append(deltaType.getChangeType()).append(": ");
    com.evolveum.prism.xml.ns._public.types_3.ObjectType objectToAdd = deltaType.getObjectToAdd();
    if (objectToAdd != null) {
        sb.append(prettyPrint(objectToAdd));
    }
    List<ItemDeltaType> itemDelta = deltaType.getItemDelta();
    if (itemDelta != null && !itemDelta.isEmpty()) {
        sb.append(prettyPrint(itemDelta));
    }
    sb.append(")");
}
Also used : QName(javax.xml.namespace.QName) ItemDeltaType(com.evolveum.prism.xml.ns._public.types_3.ItemDeltaType)

Aggregations

ObjectFactory (com.evolveum.prism.xml.ns._public.query_3.ObjectFactory)1 PropertyComplexValueFilterClauseType (com.evolveum.prism.xml.ns._public.query_3.PropertyComplexValueFilterClauseType)1 QueryType (com.evolveum.prism.xml.ns._public.query_3.QueryType)1 SearchFilterType (com.evolveum.prism.xml.ns._public.query_3.SearchFilterType)1 ItemDeltaType (com.evolveum.prism.xml.ns._public.types_3.ItemDeltaType)1 ItemPathType (com.evolveum.prism.xml.ns._public.types_3.ItemPathType)1 JAXBContext (javax.xml.bind.JAXBContext)1 Marshaller (javax.xml.bind.Marshaller)1 QName (javax.xml.namespace.QName)1 DOMResult (javax.xml.transform.dom.DOMResult)1