- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
for (ComplectationItemTO complectation : previewFullTO.getItemComplectations()) {
for (Map.Entry entry : complectation.getInstances().entrySet()) {
if (entry.getKey().equals(SoundData.SOUND_COMPLECTATION_NAME)) {
SoundData soundData = getComplectationSoundData(complectation.getId(), previewFullTO);
soundsMap.put(complectation.getId(), soundData);
}
}
}
private SoundData getComplectationSoundData(Long complectatiomId, PreviewFullTO previewFullTO) {
for (ComplectationItemTO complectationSound : previewFullTO.getItemComplectations()) {
if (complectationSound.getId().equals(complectatiomId)) {
for (Map.Entry entrySound : complectationSound.getInstances().entrySet()) {
if (entrySound.getKey().equals(SoundData.SOUND_LENGTH)) {
String soundLength = complectationSound.getInstances().get(SoundData.SOUND_LENGTH);
String soundData = complectationSound.getInstances().get(SoundData.SOUND_COMPLECTATION_NAME);
String productNumber = previewFullTO.getItemTO().getFeatureInstances().get("Product number");
String productRewritedName = previewFullTO.getItemTO().getProductTypeRewrited();
return new SoundData(soundData, productRewritedName, Long.valueOf(productNumber), soundLength);
}
}
}
}
return null;
}