Package org.cyclos.impl.system
Class TransferImportHandlerImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseNetworkedHandlerImpl
-
- org.cyclos.impl.system.BaseImportHandlerImpl<IFDTO,IFD,IF,E>
-
- org.cyclos.impl.system.BaseWithFieldsImportHandlerImpl<TransactionCustomField,CustomFieldValueDTO,BankingImportedFileDTO,BankingImportedFileData,IF,E>
-
- org.cyclos.impl.system.BankingImportHandlerImpl<TransferImportedFile,ImportTransfer>
-
- org.cyclos.impl.system.TransferImportHandlerImpl
-
- All Implemented Interfaces:
ImportHandler<BankingImportedFileDTO,BankingImportedFileData,TransferImportedFile,ImportTransfer>
@Component public class TransferImportHandlerImpl extends BankingImportHandlerImpl<TransferImportedFile,ImportTransfer>
Handler for transfer imports
-
-
Field Summary
Fields Modifier and Type Field Description protected AccountServiceLocalaccountServiceprotected CustomFieldValueHandlercustomFieldValueHandlerprotected TransferServiceLocaltransferServiceprotected TransferStatusFlowServiceLocaltransferStatusFlowServiceprotected TransferTypeServiceLocaltransferTypeService-
Fields inherited from class org.cyclos.impl.system.BankingImportHandlerImpl
REQUIRED_HEADERS, transactionCustomFieldService, transactionService
-
Fields inherited from class org.cyclos.impl.system.BaseWithFieldsImportHandlerImpl
CUSTOM_FIELD_IMPORT_PREFIX, CUSTOM_FIELD_PRIVATE_IMPORT_SUFFIX
-
Fields inherited from class org.cyclos.impl.system.BaseImportHandlerImpl
currencyService, rawEntityManagerHandler
-
Fields inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
authHandler, conversionHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Predicate<String>getAllowedImportFieldsPredicate(TransferImportedFile importedFile)Returns a predicate that evaluates true for a field allowed to be importedBankingImportedFileDatagetData(TransferImportedFile importedFile)Returns the data associated to an importClass<ImportTransfer>getEntityClass()Returns the class of the imported entityClass<TransferImportedFile>getImportedFileClass()Returns the imported file classImportTypegetImportType()Returns the type of imports handled by this classList<ImportField>getSearchImportedLineFields()Returns the list of fields that will be used to show the information of import lines.TransferImportedFilenewImportedFile(BankingImportedFileDTO dto)Instantiates anImportedFilea new entity based on a dtoImportTransferprocessImportedLine(ImportedLine importedLine, Object processContext)Imports an entity with the information in the imported line and returns the imported entity.protected voidsetAmount(String amount, ImportTransaction importTransaction, TransferType transferType)voidvalidateImportedLine(ImportedLine importedLine, Object context)Validates the imported line-
Methods inherited from class org.cyclos.impl.system.BankingImportHandlerImpl
getKeywordFields, getMissingRequiredFields, instantiateContext, parseAccountOwner, parseTransferType, resolveValidator
-
Methods inherited from class org.cyclos.impl.system.BaseWithFieldsImportHandlerImpl
fieldName, getCustomFields, getCustomFieldValueDto, getCustomFieldValues, getImportFieldName, getImportFieldNames, getPrivateImportFieldName, getPrivateImportFieldNames, parseCustomFieldValue, setCustomFieldValues, setCustomFieldValues
-
Methods inherited from class org.cyclos.impl.system.BaseImportHandlerImpl
find, finishImport, getImportField, locateUser, locateUser, parseAmount, parseBoolean, parseDate, parseDateTime
-
Methods inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
canManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getBaseEntityManagerHandler, getConfiguration, getLoggedBasicUser, getLoggedUser, getProducts, getTranslatedName, getTranslatedValue, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, setAlreadyValidated, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, dataTranslationProxy, delete, detach, doDataTranslationProxy, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Field Detail
-
transferService
@Autowired protected TransferServiceLocal transferService
-
transferTypeService
@Autowired protected TransferTypeServiceLocal transferTypeService
-
accountService
@Autowired protected AccountServiceLocal accountService
-
customFieldValueHandler
@Autowired protected CustomFieldValueHandler customFieldValueHandler
-
transferStatusFlowService
@Autowired protected TransferStatusFlowServiceLocal transferStatusFlowService
-
-
Method Detail
-
getAllowedImportFieldsPredicate
public Predicate<String> getAllowedImportFieldsPredicate(TransferImportedFile importedFile)
Description copied from interface:ImportHandlerReturns a predicate that evaluates true for a field allowed to be imported- Specified by:
getAllowedImportFieldsPredicatein interfaceImportHandler<BankingImportedFileDTO,BankingImportedFileData,TransferImportedFile,ImportTransfer>- Overrides:
getAllowedImportFieldsPredicatein classBankingImportHandlerImpl<TransferImportedFile,ImportTransfer>
-
getData
public BankingImportedFileData getData(TransferImportedFile importedFile)
Description copied from interface:ImportHandlerReturns the data associated to an import
-
getEntityClass
public Class<ImportTransfer> getEntityClass()
Description copied from interface:ImportHandlerReturns the class of the imported entity
-
getImportedFileClass
public Class<TransferImportedFile> getImportedFileClass()
Description copied from interface:ImportHandlerReturns the imported file class
-
getImportType
public ImportType getImportType()
Description copied from interface:ImportHandlerReturns the type of imports handled by this class
-
getSearchImportedLineFields
public List<ImportField> getSearchImportedLineFields()
Description copied from interface:ImportHandlerReturns the list of fields that will be used to show the information of import lines.
-
newImportedFile
public TransferImportedFile newImportedFile(BankingImportedFileDTO dto)
Description copied from interface:ImportHandlerInstantiates anImportedFilea new entity based on a dto
-
processImportedLine
public ImportTransfer processImportedLine(ImportedLine importedLine, Object processContext)
Description copied from interface:ImportHandlerImports an entity with the information in the imported line and returns the imported entity.
-
validateImportedLine
public void validateImportedLine(ImportedLine importedLine, Object context) throws ValidationException
Description copied from interface:ImportHandlerValidates the imported line- Throws:
ValidationException
-
setAmount
protected void setAmount(String amount, ImportTransaction importTransaction, TransferType transferType)
-
-