Package org.cxbox.core.service
Interface ResponseService<T extends org.cxbox.api.data.dto.DataResponseDTO,E extends BaseEntity>
- All Known Implementing Classes:
AbstractResponseService,VersionAwareResponseService
public interface ResponseService<T extends org.cxbox.api.data.dto.DataResponseDTO,E extends BaseEntity>
-
Method Summary
Modifier and TypeMethodDescriptionassociate(List<org.cxbox.api.data.dto.AssociateDTO> data, BusinessComponent bc) Сreates links between entitieslongReturns the number of matching entitiesCreates an entity based on a business componentDeletes an entity based on a business componentReturns actions for entity with conditions of their availability invoked by method getAvailableActionsgetAvailableActions(RowMetaType metaType, org.cxbox.api.data.dto.DataResponseDTO data, BusinessComponent bc) Returns actions for entity with conditions of their availability invoke method getActionsgetBc()Class<? extends FieldMetaBuilder<T>>Returns FieldMetaBuilder for classorg.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:
BaseEntityentity
-
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
Сreates 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
-
getFieldMetaBuilder
Class<? extends FieldMetaBuilder<T>> getFieldMetaBuilder()Returns FieldMetaBuilder for class- Returns:
FieldMetaBuilderclass 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
-
getActionType
CrudmaActionType getActionType() -
getBc
BusinessComponent getBc()
-