use of com.evolveum.midpoint.model.api.AssignmentCandidatesSpecification in project midpoint by Evolveum.
the class AssignmentPopup method loadAssignmentHolderSpecification.
private AssignmentCandidatesSpecification loadAssignmentHolderSpecification() {
OperationResult result = new OperationResult(OPERATION_LOAD_ASSIGNMENT_HOLDER_SPECIFICATION);
PrismObject obj = getFocusObject();
AssignmentCandidatesSpecification spec = null;
try {
spec = getPageBase().getModelInteractionService().determineAssignmentHolderSpecification(obj, result);
} catch (SchemaException | ConfigurationException ex) {
result.recordPartialError(ex.getLocalizedMessage());
LOGGER.error("Couldn't load assignment holder specification for the object {} , {}", obj.getName(), ex.getLocalizedMessage());
}
return spec;
}
use of com.evolveum.midpoint.model.api.AssignmentCandidatesSpecification in project midpoint by Evolveum.
the class AssignmentPanel method loadAssignmentTargetRelationsList.
@NotNull
private <AH extends AssignmentHolderType> List<AssignmentObjectRelation> loadAssignmentTargetRelationsList() {
OperationResult result = new OperationResult(OPERATION_LOAD_ASSIGNMENT_TARGET_RELATIONS);
List<AssignmentObjectRelation> assignmentTargetRelations = new ArrayList<>();
PrismObject<AH> obj = getMultivalueContainerListPanel().getFocusObject();
try {
AssignmentCandidatesSpecification spec = getPageBase().getModelInteractionService().determineAssignmentTargetSpecification(obj, result);
assignmentTargetRelations = spec != null ? spec.getAssignmentObjectRelations() : new ArrayList<>();
} catch (SchemaException | ConfigurationException ex) {
result.recordPartialError(ex.getLocalizedMessage());
LOGGER.error("Couldn't load assignment target specification for the object {} , {}", obj.getName(), ex.getLocalizedMessage());
}
return assignmentTargetRelations;
}
use of com.evolveum.midpoint.model.api.AssignmentCandidatesSpecification in project midpoint by Evolveum.
the class AbstractRoleMemberPanel method loadCandidateSpecification.
private AssignmentCandidatesSpecification loadCandidateSpecification() {
OperationResult result = new OperationResult(OPERATION_LOAD_MEMBER_RELATIONS);
PrismObject<? extends AbstractRoleType> obj = getModelObject().asPrismObject();
AssignmentCandidatesSpecification spec = null;
try {
spec = getPageBase().getModelInteractionService().determineAssignmentHolderSpecification(obj, result);
} catch (Throwable ex) {
result.recordPartialError(ex.getLocalizedMessage());
LOGGER.error("Couldn't load member relations list for the object {} , {}", obj.getName(), ex.getLocalizedMessage());
}
return spec;
}
use of com.evolveum.midpoint.model.api.AssignmentCandidatesSpecification in project midpoint by Evolveum.
the class AbstractRoleMemberPanel method loadCandidateSpecification.
private AssignmentCandidatesSpecification loadCandidateSpecification() {
OperationResult result = new OperationResult(OPERATION_LOAD_MEMBER_RELATIONS);
PrismObject<? extends AbstractRoleType> obj = getModelObject().asPrismObject();
AssignmentCandidatesSpecification spec = null;
try {
spec = getPageBase().getModelInteractionService().determineAssignmentHolderSpecification(obj, result);
} catch (Throwable ex) {
result.recordPartialError(ex.getLocalizedMessage());
LOGGER.error("Couldn't load member relations list for the object {} , {}", obj.getName(), ex.getLocalizedMessage());
}
return spec;
}
use of com.evolveum.midpoint.model.api.AssignmentCandidatesSpecification in project midpoint by Evolveum.
the class AbstractAssignmentPanel method loadAssignmentTargetRelationsList.
@NotNull
private <AH extends AssignmentHolderType> List<AssignmentObjectRelation> loadAssignmentTargetRelationsList() {
OperationResult result = new OperationResult(OPERATION_LOAD_ASSIGNMENT_TARGET_RELATIONS);
List<AssignmentObjectRelation> assignmentTargetRelations = new ArrayList<>();
PrismObject<AH> obj = getFocusObject();
try {
AssignmentCandidatesSpecification spec = getPageBase().getModelInteractionService().determineAssignmentTargetSpecification(obj, result);
assignmentTargetRelations = spec != null ? spec.getAssignmentObjectRelations() : new ArrayList<>();
} catch (SchemaException | ConfigurationException ex) {
result.recordPartialError(ex.getLocalizedMessage());
LOGGER.error("Couldn't load assignment target specification for the object {} , {}", obj.getName(), ex.getLocalizedMessage());
}
return assignmentTargetRelations;
}
Aggregations