use of com.evolveum.midpoint.web.page.admin.workflow.dto.DecisionDto in project midpoint by Evolveum.
the class DecisionsPanel method initLayout.
protected void initLayout(UserProfileStorage.TableId tableId, int pageSize) {
List<IColumn<DecisionDto, String>> columns = new ArrayList<>();
columns.add(new PropertyColumn<>(createStringResource("DecisionsPanel.user"), DecisionDto.F_USER));
columns.add(new PropertyColumn<>(createStringResource("DecisionsPanel.originalActor"), DecisionDto.F_ORIGINAL_ACTOR));
columns.add(new PropertyColumn<>(createStringResource("DecisionsPanel.stage"), DecisionDto.F_STAGE));
columns.add(createOutcomeColumn());
columns.add(new PropertyColumn<DecisionDto, String>(createStringResource("DecisionsPanel.comment"), DecisionDto.F_COMMENT) {
@Override
public void populateItem(Item<ICellPopulator<DecisionDto>> item, String componentId, IModel<DecisionDto> rowModel) {
super.populateItem(item, componentId, rowModel);
item.add(new AttributeAppender("style", "max-width: 200px; word-wrap: break-word;"));
}
});
columns.add(new PropertyColumn<>(createStringResource("DecisionsPanel.when"), DecisionDto.F_TIME));
columns.add(new PropertyColumn<>(createStringResource("DecisionsPanel.escalation"), DecisionDto.F_ESCALATION_LEVEL_NUMBER));
ISortableDataProvider provider = new ListDataProvider<>(this, getModel());
BoxedTablePanel decisionsTable = new BoxedTablePanel<>(ID_DECISIONS_TABLE, provider, columns, tableId, pageSize);
add(decisionsTable);
}
use of com.evolveum.midpoint.web.page.admin.workflow.dto.DecisionDto in project midpoint by Evolveum.
the class ItemApprovalHistoryPanel method initLayout.
private void initLayout(UserProfileStorage.TableId tableId, int pageSize) {
add(new DecisionsPanel(ID_DECISIONS_DONE, new AbstractReadOnlyModel<List<DecisionDto>>() {
@Override
public List<DecisionDto> getObject() {
List<DecisionDto> rv = new ArrayList<>();
WfContextType wfContextType = getModelObject();
if (wfContextType == null) {
return rv;
}
if (!wfContextType.getEvent().isEmpty()) {
wfContextType.getEvent().forEach(e -> addIgnoreNull(rv, DecisionDto.create(e, getPageBase())));
} else {
ItemApprovalProcessStateType instanceState = WfContextUtil.getItemApprovalProcessInfo(wfContextType);
if (instanceState != null) {
instanceState.getDecisions().forEach(d -> addIgnoreNull(rv, DecisionDto.create(d)));
}
}
return rv;
}
}, tableId, pageSize));
}
Aggregations