Class TabsSettingsRestController
java.lang.Object
sk.iway.iwcm.system.datatable.DatatableRestControllerV2<TabsSettingsEntity,Long>
sk.iway.iwcm.system.datatable.settings.tabs.rest.TabsSettingsRestController
@RestController
@RequestMapping("/admin/rest/settings/tabs-settings")
@PreAuthorize("@WebjetSecurityService.hasPermission(\'dataTablesConfig\')")
public class TabsSettingsRestController
extends DatatableRestControllerV2<TabsSettingsEntity,Long>
Manages domain-scoped tab settings and supplies class and tab autocomplete options.
Access requires the
dataTablesConfig permission.-
Constructor Summary
ConstructorsConstructorDescriptionTabsSettingsRestController(TabsSettingsRepository repository, FieldsSettingsService fieldsSettingsService, TabsSettingsService tabsSettingsService) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcopyEntityIntoOriginal(TabsSettingsEntity entity, TabsSettingsEntity original) Preserves nullable Boolean settings omitted from an import while allowing explicit null values.booleandeleteItem(TabsSettingsEntity entity, long id) Invalidates the persisted settings' cache only after successful deletion.editItem(TabsSettingsEntity entity, long id) Updates settings and invalidates both cache keys when the target class changes.getAutocompleteClass(String term) getAutocompleteTab(String term, String className) insertItem(TabsSettingsEntity entity) Inserts settings and invalidates the saved class and domain's cache.processToEntity(TabsSettingsEntity entity, ProcessItemAction action) Vykona upravy v entite pri odpovedi (ulozeni) z REST rozhranie napr.voidvalidateEditor(jakarta.servlet.http.HttpServletRequest request, DatatableRequest<Long, TabsSettingsEntity> target, Identity user, org.springframework.validation.Errors errors, Long id, TabsSettingsEntity entity) Validates relative tab ordering and rejects duplicate class/tab settings in the current domain.Methods inherited from class sk.iway.iwcm.system.datatable.DatatableRestControllerV2
action, add, addNotify, addNotify, addSpecSearch, addSpecSort, afterDelete, afterDuplicate, afterImportChunk, afterSave, allowGeneratedIdOnCreate, beforeDelete, beforeDuplicate, beforeDuplicate, beforeSave, checkAccessAllowed, checkItemPerms, checkRowReorderScope, delete, edit, findByColumns, findItemBy, getAll, getAllItems, getAllItemsIncludeSpecSearch, getCleanKey, getCleanValue, getCustomFieldsSearchDto, getDomainId, getImportedColumns, getImportMode, getInvalidImportedRows, getLastImportedRow, getNonEditableProperties, getOne, getOneItem, getOptions, getParamsMap, getProp, getRepo, getRequest, getSearchConditions, getSearchProperties, getSum, getUpdateByColumn, getUser, handleEditor, hasNotify, initBinder, isDuplicate, isExporting, isForceReload, isImporting, isSkipWrongData, jpaToBoolean, preImportDataEdit, processAction, processFromEntity, processFromEntity, processFromEntity, processFromEntity, rowReorder, searchItem, setForceReload, setRedirect, setRequest, setValidator, sumItems, throwConstraintViolation, throwError, throwError, throwError, throwError, throwError, throwError, validateEditorForCustomFields
-
Constructor Details
-
TabsSettingsRestController
@Autowired public TabsSettingsRestController(TabsSettingsRepository repository, FieldsSettingsService fieldsSettingsService, TabsSettingsService tabsSettingsService)
-
-
Method Details
-
processToEntity
Description copied from class:DatatableRestControllerV2Vykona upravy v entite pri odpovedi (ulozeni) z REST rozhranie napr. vyvola potrebne editorFields nastavenia (from editorFields to entity)- Overrides:
processToEntityin classDatatableRestControllerV2<TabsSettingsEntity,Long> action- - typ zmeny - create,edit,getall,
-
insertItem
Inserts settings and invalidates the saved class and domain's cache.- Overrides:
insertItemin classDatatableRestControllerV2<TabsSettingsEntity,Long> - Returns:
-
editItem
Updates settings and invalidates both cache keys when the target class changes.- Overrides:
editItemin classDatatableRestControllerV2<TabsSettingsEntity,Long> - Returns:
-
deleteItem
Invalidates the persisted settings' cache only after successful deletion.- Overrides:
deleteItemin classDatatableRestControllerV2<TabsSettingsEntity,Long> - Returns:
-
copyEntityIntoOriginal
Preserves nullable Boolean settings omitted from an import while allowing explicit null values.- Overrides:
copyEntityIntoOriginalin classDatatableRestControllerV2<TabsSettingsEntity,Long> - Parameters:
entity- submitted entity containing the new field valuesoriginal- stored entity to update in place
-
validateEditor
public void validateEditor(jakarta.servlet.http.HttpServletRequest request, DatatableRequest<Long, TabsSettingsEntity> target, Identity user, org.springframework.validation.Errors errors, Long id, TabsSettingsEntity entity) Validates relative tab ordering and rejects duplicate class/tab settings in the current domain. Imports validate ordering but rely on the database constraint for duplicates because their IDs are row indexes.- Overrides:
validateEditorin classDatatableRestControllerV2<TabsSettingsEntity,Long>
-
getAutocompleteClass
-
getAutocompleteTab
@GetMapping("/autocomplete-tab") public List<LabelValue> getAutocompleteTab(@RequestParam String term, @RequestParam("DTE_Field_className") String className)
-