Search in sources :

Example 6 with DebugObjectItem

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

the class RepositoryObjectDataProvider method createItem.

private DebugObjectItem createItem(PrismObject<? extends ObjectType> object, OperationResult result) {
    DebugObjectItem item = DebugObjectItem.createDebugObjectItem(object);
    if (ShadowType.class.isAssignableFrom(object.getCompileTimeClass())) {
        PrismReference ref = object.findReference(new ItemPath(ShadowType.F_RESOURCE_REF));
        if (ref == null || ref.getValue() == null) {
            return item;
        }
        PrismReferenceValue refValue = ref.getValue();
        String resourceOid = refValue.getOid();
        ResourceDescription desc = resourceCache.get(resourceOid);
        if (desc == null) {
            desc = loadDescription(resourceOid, result);
            resourceCache.put(resourceOid, desc);
        }
        item.setResourceName(desc.getName());
        item.setResourceType(desc.getType());
    }
    return item;
}
Also used : PrismReferenceValue(com.evolveum.midpoint.prism.PrismReferenceValue) PrismReference(com.evolveum.midpoint.prism.PrismReference) DebugObjectItem(com.evolveum.midpoint.web.page.admin.configuration.dto.DebugObjectItem) ItemPath(com.evolveum.midpoint.prism.path.ItemPath)

Aggregations

DebugObjectItem (com.evolveum.midpoint.web.page.admin.configuration.dto.DebugObjectItem)6 DebugConfDialogDto (com.evolveum.midpoint.web.page.admin.configuration.dto.DebugConfDialogDto)3 DebugSearchDto (com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto)3 ArrayList (java.util.ArrayList)2 AbstractReadOnlyModel (org.apache.wicket.model.AbstractReadOnlyModel)2 LoadableModel (com.evolveum.midpoint.gui.api.model.LoadableModel)1 PrismReference (com.evolveum.midpoint.prism.PrismReference)1 PrismReferenceValue (com.evolveum.midpoint.prism.PrismReferenceValue)1 ItemPath (com.evolveum.midpoint.prism.path.ItemPath)1 ObjectFilter (com.evolveum.midpoint.prism.query.ObjectFilter)1 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 RepositoryObjectDataProvider (com.evolveum.midpoint.web.component.data.RepositoryObjectDataProvider)1 CheckBoxHeaderColumn (com.evolveum.midpoint.web.component.data.column.CheckBoxHeaderColumn)1 InlineMenuable (com.evolveum.midpoint.web.component.data.column.InlineMenuable)1 TwoValueLinkPanel (com.evolveum.midpoint.web.component.data.column.TwoValueLinkPanel)1 DebugButtonPanel (com.evolveum.midpoint.web.page.admin.configuration.component.DebugButtonPanel)1 AttributeModifier (org.apache.wicket.AttributeModifier)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1 ICellPopulator (org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator)1 IColumn (org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn)1