use of com.evolveum.midpoint.web.page.admin.users.component.AssignmentsPreviewDto in project midpoint by Evolveum.
the class AssignmentEditorDto method setPrivilegeLimitationList.
public void setPrivilegeLimitationList(List<AssignmentsPreviewDto> privilegeLimitationList) {
if (newAssignment.getLimitTargetContent() == null) {
newAssignment.setLimitTargetContent(new AssignmentSelectorType());
}
List<ObjectReferenceType> referencesList = newAssignment.getLimitTargetContent().getTargetRef();
if (referencesList == null) {
referencesList = new ArrayList<>();
}
referencesList.clear();
for (AssignmentsPreviewDto previewDto : privilegeLimitationList) {
ObjectReferenceType ref = new ObjectReferenceType();
ref.setOid(previewDto.getTargetOid());
ref.setTargetName(new PolyStringType(previewDto.getTargetName()));
ref.setType(previewDto.getTargetType());
ref.setRelation(previewDto.getRelation());
referencesList.add(ref);
}
this.privilegeLimitationList = privilegeLimitationList;
}
use of com.evolveum.midpoint.web.page.admin.users.component.AssignmentsPreviewDto in project midpoint by Evolveum.
the class PageUser method getUserPrivilegesList.
private List<AssignmentsPreviewDto> getUserPrivilegesList() {
List<AssignmentsPreviewDto> list = new ArrayList<>();
OperationResult result = new OperationResult(OPERATION_LOAD_ASSIGNMENT_PEVIEW_DTO_LIST);
Task task = createSimpleTask(OPERATION_LOAD_ASSIGNMENT_PEVIEW_DTO_LIST);
for (AssignmentType assignment : getObjectWrapper().getObject().asObjectable().getAssignment()) {
AssignmentsPreviewDto dto = createDelegableAssignmentsPreviewDto(assignment, task, result);
if (dto != null) {
list.add(dto);
}
}
return list;
}
Aggregations