/** * Returns whether endpoint specific configuration was changed. * * @return true if endpoint specific configuration changed otherwise false */ public boolean isEpsConfigurationChanged() { if (endpointProfile == null) { return false; } return !Arrays.equals(epsConfigurationHash, endpointProfile.getEpsConfigurationHash()); }
@Override public ConfigurationCacheEntry getConfiguration(String appToken, String endpointId, EndpointProfileDto profile) throws GetDeltaException { LOG.debug("[{}][{}] Calculating new configuration", appToken, endpointId); AppVersionKey appConfigVersionKey = new AppVersionKey(appToken, profile.getConfigurationVersion()); EndpointObjectHash userConfHash = EndpointObjectHash.fromBytes(profile .getUserConfigurationHash()); EndpointObjectHash epsConfHash = EndpointObjectHash.fromBytes(profile .getEpsConfigurationHash()); DeltaCacheKey deltaKey = new DeltaCacheKey(appConfigVersionKey, profile.getGroupState(), userConfHash, epsConfHash, null, profile.isUseConfigurationRawSchema(), true); LOG.debug("[{}][{}] Built resync delta key {}", appToken, endpointId, deltaKey); return getDelta(endpointId, profile.getEndpointUserId(), deltaKey, profile.isUseConfigurationRawSchema()); }
if (updateConfiguration) { storedProfile.setUserConfigurationHash(newProfile.getUserConfigurationHash()); storedProfile.setEpsConfigurationHash(newProfile.getEpsConfigurationHash());
this.groupState = MongoDaoUtil.convertDtoToModelList(dto.getGroupState()); this.sequenceNumber = dto.getSequenceNumber(); this.epsConfigurationHash = dto.getEpsConfigurationHash(); this.profile = MongoDaoUtil.encodeReservedCharacteres( (DBObject) JSON.parse(dto.getClientProfileBody()));
this.useConfigurationRawSchema = dto.isUseConfigurationRawSchema(); this.version = dto.getVersion(); this.epsConfigurationHash = getByteBuffer(dto.getEpsConfigurationHash());