protected EndpointProfileDto generateEndpointProfileDtoWithSchemaVersion(String appId, int schemaVersion, String srvProfileBody) { EndpointProfileDto profileDto = new EndpointProfileDto(); profileDto.setApplicationId(appId); profileDto.setServerProfileVersion(schemaVersion); profileDto.setEndpointKeyHash("TEST_KEY_HASH".getBytes()); profileDto.setEpsConfigurationHash(EPS_CONFIG_HASH); try { profileDto.setClientProfileBody(readSchemaFileAsString(TEST_PROFILE_BODY_PATH)); } catch (IOException e) { LOG.error("Can't set client-side EP body {}", e); } profileDto.setSdkToken(UUID.randomUUID().toString()); profileDto.setServerProfileBody(srvProfileBody); return endpointService.saveEndpointProfile(profileDto); }
+ "key [{}]", serverProfileSchemaDto.getVersion(), schemaDto.getBody(), keyHash); endpointProfileDto.setServerProfileVersion(serverProfileSchemaDto.getVersion()); endpointProfileDto.setServerProfileBody(schemaDto.getDefaultRecord());
if (endpointRegistration.getServerProfileBody() != null && endpointRegistration.getServerProfileVersion() != null) { dto.setServerProfileVersion(endpointRegistration.getServerProfileVersion()); dto.setServerProfileBody(endpointRegistration.getServerProfileBody());
dto.setProfileHash(profileHash); dto.setClientProfileVersion(profileVersion); dto.setServerProfileVersion(serverProfileVersion); dto.setNotificationVersion(notificationVersion); dto.setSubscriptions(subscriptions);
protected EndpointProfileDto generateEndpointProfile(String appId, String sdkToken, String accessToken, List<String> topicIds, CtlDataDto ctlDataDto) { byte[] keyHash = generateBytes(); if (appId == null) { appId = generateStringId(); } if (sdkToken == null) { sdkToken = generateStringId(); } if (accessToken == null) { accessToken = generateStringId(); } EndpointProfileDto profileDto = new EndpointProfileDto(); profileDto.setApplicationId(appId); profileDto.setSdkToken(sdkToken); profileDto.setSubscriptions(topicIds); profileDto.setEndpointKeyHash(keyHash); profileDto.setAccessToken(accessToken); profileDto.setEpsConfigurationHash(EPS_CONFIG_HASH); if (ctlDataDto != null) { profileDto.setServerProfileBody(ctlDataDto.getBody()); profileDto.setServerProfileVersion(ctlDataDto.getServerProfileVersion()); } return endpointProfileDao.save(new CassandraEndpointProfile(profileDto)).toDto(); }
dto.setProfileHash(getBytes(profileHash)); dto.setClientProfileVersion(profileVersion); dto.setServerProfileVersion(serverProfileVersion); dto.setNotificationVersion(notificationVersion); dto.setSubscriptions(subscriptions);