/** * Sets the log level. * * @param clazz the class for the logger. * @param logLevel the log level to set. */ protected void setLogLevel(Class clazz, LogLevel logLevel) { loggingHelper.setLogLevel(clazz, logLevel); }
/** * Sets the log level. * * @param loggerName the logger name (e.g. Myclass.class.getName()). * @param logLevel the log level to set. */ protected void setLogLevel(String loggerName, LogLevel logLevel) { loggingHelper.setLogLevel(loggerName, logLevel); }
/** * Creates the appropriate business object data entries for an upload. * * @param businessObjectDataStatusCode the target business object data status. * * @return the upload single initiation response created during the upload flow. */ public UploadSingleInitiationResponse createUploadedFileData(String businessObjectDataStatusCode) { loggingHelper.setLogLevel(UploadDownloadHelperServiceImpl.class, LogLevel.OFF); // Create source and target business object formats database entities which are required to initiate an upload. createDatabaseEntitiesForUploadDownloadTesting(); // Initiate a file upload. UploadSingleInitiationResponse resultUploadSingleInitiationResponse = uploadDownloadService.initiateUploadSingle(createUploadSingleInitiationRequest()); // Complete the upload. uploadDownloadService.performCompleteUploadSingleMessage( resultUploadSingleInitiationResponse.getSourceBusinessObjectData().getStorageUnits().get(0).getStorageFiles().get(0).getFilePath()); // Update the target business object data status to valid. Normally this would happen as part of the completion request, but since the status update // happens asynchronously, this will not happen within a unit test context which is why we are setting it explicitly. businessObjectDataDao.getBusinessObjectDataByAltKey( businessObjectDataHelper.getBusinessObjectDataKey(resultUploadSingleInitiationResponse.getTargetBusinessObjectData())) .setStatus(businessObjectDataStatusDao.getBusinessObjectDataStatusByCode(businessObjectDataStatusCode)); resultUploadSingleInitiationResponse.getTargetBusinessObjectData().setStatus(businessObjectDataStatusCode); // Return the initiate upload single response. return resultUploadSingleInitiationResponse; }