Search in sources :

Example 1 with PageRepositoryQuery

use of com.evolveum.midpoint.web.page.admin.configuration.PageRepositoryQuery in project midpoint by Evolveum.

the class SearchPanel method debugPerformed.

private void debugPerformed() {
    Search search = getModelObject();
    PageRepositoryQuery pageQuery;
    if (search != null) {
        ObjectTypes type = search.getType() != null ? ObjectTypes.getObjectType(search.getType()) : null;
        QName typeName = type != null ? type.getTypeQName() : null;
        String inner = search.getAdvancedQuery();
        if (StringUtils.isNotBlank(inner)) {
            inner = "\n" + inner + "\n";
        } else if (inner == null) {
            inner = "";
        }
        pageQuery = new PageRepositoryQuery(typeName, "<query>" + inner + "</query>");
    } else {
        pageQuery = new PageRepositoryQuery();
    }
    SearchPanel.this.setResponsePage(pageQuery);
}
Also used : PageRepositoryQuery(com.evolveum.midpoint.web.page.admin.configuration.PageRepositoryQuery) QName(javax.xml.namespace.QName) ObjectTypes(com.evolveum.midpoint.schema.constants.ObjectTypes)

Aggregations

ObjectTypes (com.evolveum.midpoint.schema.constants.ObjectTypes)1 PageRepositoryQuery (com.evolveum.midpoint.web.page.admin.configuration.PageRepositoryQuery)1 QName (javax.xml.namespace.QName)1