use of com.evolveum.midpoint.gui.impl.page.admin.role.PageRole in project midpoint by Evolveum.
the class RoleCatalogItemButton method targetObjectDetailsPerformed.
private void targetObjectDetailsPerformed(AssignmentEditorDto assignment, AjaxRequestTarget target) {
if (assignment.getTargetRef() == null || assignment.getTargetRef().getOid() == null) {
return;
}
if (!plusIconClicked) {
OperationResult result = new OperationResult(OPERATION_LOAD_OBJECT);
Task task = getPageBase().createSimpleTask(OPERATION_LOAD_OBJECT);
if (AssignmentEditorDtoType.ORG_UNIT.equals(assignment.getType())) {
PrismObject<OrgType> object = WebModelServiceUtils.loadObject(OrgType.class, assignment.getTargetRef().getOid(), getPageBase(), task, result);
getPageBase().navigateToNext(new PageOrg(object) {
private static final long serialVersionUID = 1L;
@Override
protected FocusDetailsModels<OrgType> createObjectDetailsModels(PrismObject<OrgType> object) {
return new FocusDetailsModels<OrgType>(createPrismObjectModel(object), this) {
private static final long serialVersionUID = 1L;
@Override
protected boolean isReadonly() {
return true;
}
};
}
});
} else if (AssignmentEditorDtoType.ROLE.equals(assignment.getType())) {
PrismObject<RoleType> object = WebModelServiceUtils.loadObject(RoleType.class, assignment.getTargetRef().getOid(), getPageBase(), task, result);
getPageBase().navigateToNext(new PageRole(object) {
private static final long serialVersionUID = 1L;
@Override
protected FocusDetailsModels<RoleType> createObjectDetailsModels(PrismObject<RoleType> object) {
return new FocusDetailsModels<RoleType>(createPrismObjectModel(object), this) {
private static final long serialVersionUID = 1L;
@Override
protected boolean isReadonly() {
return true;
}
};
}
});
} else if (AssignmentEditorDtoType.SERVICE.equals(assignment.getType())) {
PrismObject<ServiceType> object = WebModelServiceUtils.loadObject(ServiceType.class, assignment.getTargetRef().getOid(), getPageBase(), task, result);
getPageBase().navigateToNext(new PageService(object) {
private static final long serialVersionUID = 1L;
@Override
protected FocusDetailsModels<ServiceType> createObjectDetailsModels(PrismObject<ServiceType> object) {
return new FocusDetailsModels<ServiceType>(createPrismObjectModel(object), this) {
private static final long serialVersionUID = 1L;
@Override
protected boolean isReadonly() {
return true;
}
};
}
});
}
} else {
plusIconClicked = false;
}
}
Aggregations