Package org.cxbox.core.service
Interface AnySourceResponseService<T extends org.cxbox.api.data.dto.DataResponseDTO,E>
- Type Parameters:
T- DTO between front and BFFE- DTO from microservice
- All Superinterfaces:
AnySourceResponseServiceMarker
- All Known Implementing Classes:
AbstractAnySourceResponseService,AnySourceVersionAwareResponseService
public interface AnySourceResponseService<T extends org.cxbox.api.data.dto.DataResponseDTO,E>
extends AnySourceResponseServiceMarker
-
Method Summary
Modifier and TypeMethodDescriptionassociate(List<org.cxbox.api.data.dto.AssociateDTO> data, BusinessComponent bc) Creates links between entitieslongReturns the number of matching entitiesCreates an entity based on a business componentDeletes an entity based on a business componententityToDto(BusinessComponent bc, E entity) Returns actions for entity with conditions of their availability invoked by method getAvailableActionsClass<? extends AnySourceFieldMetaBuilder<T>>Returns AnySourceFieldMetaBuilder for classgetAvailableActions(RowMetaType metaType, org.cxbox.api.data.dto.DataResponseDTO data, BusinessComponent bc) Returns actions for entity with conditions of their availability invoke method getActionsgetBc()org.cxbox.api.data.ResultPage<T>Returns a list of matched objects based on a business componentReturns object based on a business componentReturns an entity based on a business componentReturns the number of matching entitiesReturns the number of matching entitiesbooleanDetermines whether the service interacts with an entity from the databaseinvokeAction(BusinessComponent bc, String actionName, org.cxbox.api.data.dto.DataResponseDTO data) Invokes action with given name, add preactions, loads or updates entity if necessarybooleanDetermines is deferred saving of new objects supportedReturns actions invoked with cancelpreview(BusinessComponent bc, org.cxbox.api.data.dto.DataResponseDTO data) Updates an entity based on a business component by DTO Used in forceactive fields<V> VDeprecated.updateEntity(BusinessComponent bc, org.cxbox.api.data.dto.DataResponseDTO data) Updates an entity based on a business component by DTOvoidvalidate(BusinessComponent bc, org.cxbox.api.data.dto.DataResponseDTO data) Validates the entry on save
-
Method Details
-
getOneAsEntity
Returns an entity based on a business component- Parameters:
bc- businessComponent- Returns:
- entity
-
getOne
Returns object based on a business component- Parameters:
bc- businessComponent- Returns:
- object
-
hasPersister
boolean hasPersister()Determines whether the service interacts with an entity from the database- Returns:
- true/false
-
getList
Returns a list of matched objects based on a business component- Parameters:
bc- businessComponent- Returns:
- list of matched objects
-
createEntity
Creates an entity based on a business component- Parameters:
bc- businessComponent- Returns:
CreateResultclass with DataResponseDTO and postactions
-
updateEntity
Updates an entity based on a business component by DTO- Parameters:
bc- businessComponentdata- information about entity, it's changed fields, errors- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
preview
Updates an entity based on a business component by DTO Used in forceactive fields- Parameters:
bc- businessComponentdata- information about entity, it's changed fields, errors- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
deleteEntity
Deletes an entity based on a business component- Parameters:
bc- businessComponent- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
invokeAction
ActionResultDTO<T> invokeAction(BusinessComponent bc, String actionName, org.cxbox.api.data.dto.DataResponseDTO data) Invokes action with given name, add preactions, loads or updates entity if necessary- Parameters:
bc- businessComponentactionName- name of actiondata- information about entity, it's changed fields, errors- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
associate
Creates links between entities- Parameters:
data- information about an entity, whether the entity was associatedbc- businessComponent- Returns:
AssociateResultDTOclass with DataResponseDTO and postactions
-
getAvailableActions
ActionsDTO getAvailableActions(RowMetaType metaType, org.cxbox.api.data.dto.DataResponseDTO data, BusinessComponent bc) Returns actions for entity with conditions of their availability invoke method getActions- Parameters:
metaType- type of metadata- information about entity, it's changed fields, errorsbc- businessComponent- Returns:
AssociateResultDTOclass with DataResponseDTO and postactions
-
getActions
Returns actions for entity with conditions of their availability invoked by method getAvailableActions- Returns:
AssociateResultDTOclass with DataResponseDTO and postactions
-
onCancel
Returns actions invoked with cancel- Parameters:
bc- businessComponent- Returns:
AssociateResultDTOclass with DataResponseDTO and postactions
-
entityToDto
-
getAnySourceFieldMetaBuilder
Class<? extends AnySourceFieldMetaBuilder<T>> getAnySourceFieldMetaBuilder()Returns AnySourceFieldMetaBuilder for class- Returns:
AnySourceFieldMetaBuilderclass for building field meta
-
count
Returns the number of matching entities- Parameters:
bc- businessComponent- Returns:
- count
-
getTypeOfDTO
Returns the number of matching entities- Returns:
- count
-
getTypeOfEntity
Returns the number of matching entities- Returns:
- count
-
validate
Validates the entry on save- Parameters:
bc- businessComponentdata- information about entity, it's changed fields, errors
-
unwrap
Deprecated. -
isDeferredCreationSupported
Determines is deferred saving of new objects supported- Parameters:
bc- businessComponent
-
getBaseDao
AnySourceBaseDAO<E> getBaseDao() -
getActionType
CrudmaActionType getActionType() -
getBc
BusinessComponent getBc()
-