use of com.evolveum.midpoint.web.page.self.PageAssignmentDetails in project midpoint by Evolveum.
the class MultiButtonTable method assignmentDetailsPerformed.
private void assignmentDetailsPerformed(final AssignmentEditorDto assignment, AjaxRequestTarget target) {
if (!plusIconClicked) {
assignment.setMinimized(false);
assignment.setSimpleView(true);
pageBase.navigateToNext(new PageAssignmentDetails(Model.of(assignment)));
} else {
plusIconClicked = false;
}
}
use of com.evolveum.midpoint.web.page.self.PageAssignmentDetails in project midpoint by Evolveum.
the class AssignmentEditorPanel method loadSecurityConstraints.
private ItemSecurityConstraints loadSecurityConstraints() {
PageBase pageBase = getPageBase();
if (pageBase == null || getModelObject().getTargetRef() == null) {
return null;
}
PrismObject<? extends FocusType> operationObject = null;
if (pageBase instanceof PageAdminFocus) {
operationObject = ((PageAdminFocus) pageBase).getObjectWrapper().getObject();
} else if (// shopping cart assignment details panels
(pageBase instanceof PageAssignmentDetails || pageBase instanceof PageAssignmentsList) && !pageBase.getSessionStorage().getRoleCatalog().isMultiUserRequest()) {
String targetUserOid = pageBase.getSessionStorage().getRoleCatalog().isSelfRequest() ? pageBase.getPrincipalFocus().getOid() : pageBase.getSessionStorage().getRoleCatalog().getTargetUserOidsList().get(0);
Task task = pageBase.createSimpleTask(OPERATION_LOAD_ASSIGNMENT_TARGET_USER_OBJECT);
OperationResult result = new OperationResult(OPERATION_LOAD_ASSIGNMENT_TARGET_USER_OBJECT);
operationObject = WebModelServiceUtils.loadObject(UserType.class, targetUserOid, pageBase, task, result);
}
if (operationObject == null) {
return null;
}
String targetObjectOid = getModelObject().getTargetRef().getOid();
Task task = pageBase.createSimpleTask(OPERATION_LOAD_TARGET_OBJECT);
OperationResult result = new OperationResult(OPERATION_LOAD_TARGET_OBJECT);
PrismObject<AbstractRoleType> targetRefObject = WebModelServiceUtils.loadObject(AbstractRoleType.class, targetObjectOid, pageBase, task, result);
ItemSecurityConstraints constraints = null;
try {
constraints = pageBase.getModelInteractionService().getAllowedRequestAssignmentItems(operationObject, targetRefObject, task, result);
} catch (SchemaException | SecurityViolationException | ObjectNotFoundException | ExpressionEvaluationException | CommunicationException | ConfigurationException ex) {
LoggingUtils.logUnexpectedException(LOGGER, "Couldn't load security constraints for assignment items.", ex);
}
return constraints;
}
use of com.evolveum.midpoint.web.page.self.PageAssignmentDetails in project midpoint by Evolveum.
the class RoleCatalogItemButton method assignmentDetailsPerformed.
private void assignmentDetailsPerformed(AssignmentEditorDto assignment, AjaxRequestTarget target) {
if (!plusIconClicked) {
assignment.setMinimized(false);
assignment.setSimpleView(true);
assignment.getTargetRef().setRelation(getNewAssignmentRelation());
getPageBase().navigateToNext(new PageAssignmentDetails(Model.of(assignment)));
} else {
plusIconClicked = false;
}
}
Aggregations