Search in sources :

Example 1 with StatusPanel

use of org.apache.syncope.client.console.wizards.any.StatusPanel in project syncope by apache.

the class AnyDirectoryPanel method customResultBody.

@Override
@SuppressWarnings("unchecked")
protected Panel customResultBody(final String panelId, final AnyWrapper<A> item, final Serializable result) {
    if (!(result instanceof ProvisioningResult)) {
        throw new IllegalStateException("Unsupported result type");
    }
    return new StatusPanel(panelId, ((ProvisioningResult<A>) result).getEntity(), new ListModel<>(new ArrayList<>()), ((ProvisioningResult<A>) result).getPropagationStatuses().stream().map(input -> {
        ConnObjectTO before = input.getBeforeObj();
        ConnObjectWrapper afterObjWrapper = new ConnObjectWrapper(((ProvisioningResult<A>) result).getEntity(), input.getResource(), input.getAfterObj());
        return Pair.of(before, afterObjWrapper);
    }).collect(Collectors.toList()), pageRef);
}
Also used : ProvisioningResult(org.apache.syncope.common.lib.to.ProvisioningResult) ArrayList(java.util.ArrayList) ConnObjectTO(org.apache.syncope.common.lib.to.ConnObjectTO) StatusPanel(org.apache.syncope.client.console.wizards.any.StatusPanel) ConnObjectWrapper(org.apache.syncope.client.console.commons.status.ConnObjectWrapper)

Aggregations

ArrayList (java.util.ArrayList)1 ConnObjectWrapper (org.apache.syncope.client.console.commons.status.ConnObjectWrapper)1 StatusPanel (org.apache.syncope.client.console.wizards.any.StatusPanel)1 ConnObjectTO (org.apache.syncope.common.lib.to.ConnObjectTO)1 ProvisioningResult (org.apache.syncope.common.lib.to.ProvisioningResult)1