Class WebpagesRestController


@RestController @RequestMapping("/admin/rest/web-pages") @PreAuthorize("@WebjetSecurityService.hasPermission(\'menuWebpages\')") public class WebpagesRestController extends WebpagesDatatable
  • Constructor Details

  • Method Details

    • parentGroups

      @RequestMapping(path="/parents/{id}") public ParentGroupsResult parentGroups(@PathVariable("id") int docId)
      Vrati zoznam parent adresarov pre zadane docid, nastavi aj domenu ak je odlisna a kartu (System/Kos) v ktorej sa nachadza koren adresarov
      Parameters:
      docId -
      Returns:
    • validateEditorForCustomFields

      public void validateEditorForCustomFields(jakarta.servlet.http.HttpServletRequest request, DatatableRequest<Long,DocDetails> target, Identity user, org.springframework.validation.Errors errors, Long id, DocDetails entity)
      Description copied from class: DatatableRestControllerV2
      Validates custom fields and prepares valid JSON editor values for persistence.

      The method resolves required field alphabets via CustomFieldsService and checks corresponding properties (fieldX) on the entity. Missing values are reported using Errors.rejectValue(String, String, String) to keep validation consistent with editor error handling. Valid JSON values have literal angle brackets replaced with equivalent Unicode escapes so the JPA XSS filter does not alter their syntax when the entity is loaded again.

      If a field property is not readable on the entity, the method logs the issue and continues without failing the whole validation pass.

      Overrides:
      validateEditorForCustomFields in class DatatableRestControllerV2<DocDetails,Long>
      Parameters:
      request - current HTTP request
      target - datatable request wrapper
      user - current authenticated user
      errors - collector for validation errors
      id - entity identifier from request payload
      entity - entity instance to validate