Class BasketInvoicePaymentRestController
java.lang.Object
sk.iway.iwcm.system.datatable.DatatableRestControllerV2<BasketInvoicePaymentEntity,Long>
sk.iway.iwcm.components.basket.rest.BasketInvoicePaymentRestController
@RestController
@RequestMapping("/admin/rest/eshop/basket-payments")
@PreAuthorize("@WebjetSecurityService.hasPermission(\'cmp_basket\')")
public class BasketInvoicePaymentRestController
extends DatatableRestControllerV2<BasketInvoicePaymentEntity,Long>
-
Constructor Summary
ConstructorsConstructorDescriptionBasketInvoicePaymentRestController
(BasketInvoicePaymentsRepository bipr, BasketInvoicesRepository bir, BasketInvoiceItemsRepository biir, PaymentMethodsService paymentMethodsService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterDelete
(BasketInvoicePaymentEntity entity, long id) Metoda volana po zmazanim enity z DB, moze vykonat dodatocne akcie napr.void
afterSave
(BasketInvoicePaymentEntity entity, BasketInvoicePaymentEntity saved) Metoda volana po ulozeni entity.boolean
Metoda volana pred zmazanim enity z DB, moze vykonat dodatocne akcie napr.org.springframework.data.domain.Page<BasketInvoicePaymentEntity>
getAllItems
(org.springframework.data.domain.Pageable pageable) Ziska z databazy vsetky zaznamygetOneItem
(long id) Ziska z databazy entitu so zadanym idboolean
processAction
(BasketInvoicePaymentEntity entity, String action) Vykona zadanu akciu (napr.processFromEntity
(BasketInvoicePaymentEntity entity, ProcessItemAction action) Vykona upravy v entite pred vratenim cez REST rozhranie napr.processToEntity
(BasketInvoicePaymentEntity entity, ProcessItemAction action) Vykona upravy v entite pri odpovedi (ulozeni) z REST rozhranie napr.void
validateEditor
(javax.servlet.http.HttpServletRequest request, DatatableRequest<Long, BasketInvoicePaymentEntity> target, Identity currentUser, org.springframework.validation.Errors errors, Long id, BasketInvoicePaymentEntity entity) Pripravena metoda, odporucame implementovat v child triede.Methods inherited from class sk.iway.iwcm.system.datatable.DatatableRestControllerV2
action, add, addNotify, addNotify, addSpecSearch, addSpecSort, afterDuplicate, afterImportChunk, beforeDuplicate, beforeSave, checkAccessAllowed, checkItemPerms, copyEntityIntoOriginal, delete, deleteItem, edit, editItem, findByColumns, findItemBy, getAll, getAllItemsIncludeSpecSearch, getCleanKey, getCleanValue, getImportedColumns, getImportMode, getInvalidImportedRows, getLastImportedRow, getOne, getOptions, getParamsMap, getProp, getRepo, getRequest, getSearchConditions, getSearchProperties, getUpdateByColumn, getUser, handleEditor, hasNotify, initBinder, insertItem, isExporting, isForceReload, isImporting, isSkipWrongData, jpaToBoolean, preImportDataEdit, processFromEntity, processFromEntity, processFromEntity, searchItem, setForceReload, setRequest, setValidator, throwConstraintViolation, throwError, throwError, throwError, throwError, throwError, throwError
-
Constructor Details
-
BasketInvoicePaymentRestController
@Autowired public BasketInvoicePaymentRestController(BasketInvoicePaymentsRepository bipr, BasketInvoicesRepository bir, BasketInvoiceItemsRepository biir, PaymentMethodsService paymentMethodsService)
-
-
Method Details
-
getAllItems
public org.springframework.data.domain.Page<BasketInvoicePaymentEntity> getAllItems(org.springframework.data.domain.Pageable pageable) Description copied from class:DatatableRestControllerV2
Ziska z databazy vsetky zaznamy- Overrides:
getAllItems
in classDatatableRestControllerV2<BasketInvoicePaymentEntity,
Long> - Returns:
-
getOneItem
Description copied from class:DatatableRestControllerV2
Ziska z databazy entitu so zadanym id- Overrides:
getOneItem
in classDatatableRestControllerV2<BasketInvoicePaymentEntity,
Long> - Returns:
-
processFromEntity
public BasketInvoicePaymentEntity processFromEntity(BasketInvoicePaymentEntity entity, ProcessItemAction action) Description copied from class:DatatableRestControllerV2
Vykona upravy v entite pred vratenim cez REST rozhranie napr. vyvola potrebne editorFields nastavenia (from entity to editorFields)- Overrides:
processFromEntity
in classDatatableRestControllerV2<BasketInvoicePaymentEntity,
Long> action
- - typ zmeny - create,edit,getall...
-
processToEntity
public BasketInvoicePaymentEntity processToEntity(BasketInvoicePaymentEntity entity, ProcessItemAction action) Description copied from class:DatatableRestControllerV2
Vykona upravy v entite pri odpovedi (ulozeni) z REST rozhranie napr. vyvola potrebne editorFields nastavenia (from editorFields to entity)- Overrides:
processToEntity
in classDatatableRestControllerV2<BasketInvoicePaymentEntity,
Long> action
- - typ zmeny - create,edit,getall,
-
validateEditor
public void validateEditor(javax.servlet.http.HttpServletRequest request, DatatableRequest<Long, BasketInvoicePaymentEntity> target, Identity currentUser, org.springframework.validation.Errors errors, Long id, BasketInvoicePaymentEntity entity) Description copied from class:DatatableRestControllerV2
Pripravena metoda, odporucame implementovat v child triede. Metoda je volana pre kazdy odoslaby objekt. Chyby pridava do error objeku pomocouErrors
.rejectValue- Overrides:
validateEditor
in classDatatableRestControllerV2<BasketInvoicePaymentEntity,
Long>
-
beforeDelete
Description copied from class:DatatableRestControllerV2
Metoda volana pred zmazanim enity z DB, moze vykonat dodatocne akcie napr. zmazanie suborov z disku, ulozenie do archivu, alebo specialne kontroly prav- Overrides:
beforeDelete
in classDatatableRestControllerV2<BasketInvoicePaymentEntity,
Long> - Returns:
-
afterSave
Description copied from class:DatatableRestControllerV2
Metoda volana po ulozeni entity. POZOR: pre novo vytvaranu entitu bude jej ID ulozene len v saved entite, povodna entity bude mat ID=0- Overrides:
afterSave
in classDatatableRestControllerV2<BasketInvoicePaymentEntity,
Long> - Parameters:
entity
- - povodna odoslana entitasaved
- - uz ulozena verzia entity
-
afterDelete
Description copied from class:DatatableRestControllerV2
Metoda volana po zmazanim enity z DB, moze vykonat dodatocne akcie napr. zmazanie suborov z disku, ulozenie do archivu, alebo obnovu cache objektov- Overrides:
afterDelete
in classDatatableRestControllerV2<BasketInvoicePaymentEntity,
Long>
-
processAction
Description copied from class:DatatableRestControllerV2
Vykona zadanu akciu (napr. rotacia obrazku v galerii)- Overrides:
processAction
in classDatatableRestControllerV2<BasketInvoicePaymentEntity,
Long> - Returns:
- false ak nastane chyba
-