protected boolean validateGroupQualifier(
      List<GroupDocumentQualifier> groupQualifiers, KimType kimType) {
    List<RemotableAttributeError> validationErrors = new ArrayList<RemotableAttributeError>();

    List<RemotableAttributeError> errorsTemp;
    Map<String, String> mapToValidate;
    KimTypeService kimTypeService = KimFrameworkServiceLocator.getKimTypeService(kimType);
    GlobalVariables.getMessageMap().removeFromErrorPath(KRADConstants.DOCUMENT_PROPERTY_NAME);
    mapToValidate = attributeValidationHelper.convertQualifiersToMap(groupQualifiers);
    errorsTemp = kimTypeService.validateAttributes(kimType.getId(), mapToValidate);
    validationErrors.addAll(
        attributeValidationHelper.convertErrors(
            "",
            attributeValidationHelper.convertQualifiersToAttrIdxMap(groupQualifiers),
            errorsTemp));
    GlobalVariables.getMessageMap().addToErrorPath(KRADConstants.DOCUMENT_PROPERTY_NAME);

    if (validationErrors.isEmpty()) {
      return true;
    }
    attributeValidationHelper.moveValidationErrorsToErrorMap(validationErrors);
    return false;
  }
Пример #2
0
  /**
   * Gets the derived role service name for {@code kimTypeId}.
   *
   * @param kimTypeId the KIM type id
   * @return the derived role service name for {@code kimTypeId}.
   */
  protected String getDerivedRoleServiceName(String kimTypeId) {
    KimType kimType = getKimTypeInfoService().getKimType(kimTypeId);

    return kimType != null ? kimType.getServiceName() : null;
  }