|
|
@ -147,7 +147,7 @@ public class PolicyManagerImpl implements PolicyManager {
|
|
|
|
|
|
|
|
|
|
|
|
List<ProfileFeature> existingFeaturesList = new ArrayList<>();
|
|
|
|
List<ProfileFeature> existingFeaturesList = new ArrayList<>();
|
|
|
|
List<ProfileFeature> newFeaturesList = new ArrayList<>();
|
|
|
|
List<ProfileFeature> newFeaturesList = new ArrayList<>();
|
|
|
|
List<ProfileFeature> feturesToDelete = new ArrayList<>();
|
|
|
|
List<ProfileFeature> featuresToDelete = new ArrayList<>();
|
|
|
|
List<String> temp = new ArrayList<>();
|
|
|
|
List<String> temp = new ArrayList<>();
|
|
|
|
List<String> updateDFes = new ArrayList<>();
|
|
|
|
List<String> updateDFes = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
@ -169,7 +169,7 @@ public class PolicyManagerImpl implements PolicyManager {
|
|
|
|
// Check for the features to delete
|
|
|
|
// Check for the features to delete
|
|
|
|
for (ProfileFeature feature : existingProfileFeaturesList) {
|
|
|
|
for (ProfileFeature feature : existingProfileFeaturesList) {
|
|
|
|
if (!updateDFes.contains(feature.getFeatureCode())) {
|
|
|
|
if (!updateDFes.contains(feature.getFeatureCode())) {
|
|
|
|
feturesToDelete.add(feature);
|
|
|
|
featuresToDelete.add(feature);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -194,8 +194,8 @@ public class PolicyManagerImpl implements PolicyManager {
|
|
|
|
featureDAO.addProfileFeatures(newFeaturesList, profileId);
|
|
|
|
featureDAO.addProfileFeatures(newFeaturesList, profileId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!feturesToDelete.isEmpty()) {
|
|
|
|
if (!featuresToDelete.isEmpty()) {
|
|
|
|
for (ProfileFeature pf : feturesToDelete)
|
|
|
|
for (ProfileFeature pf : featuresToDelete)
|
|
|
|
featureDAO.deleteProfileFeatures(pf.getId());
|
|
|
|
featureDAO.deleteProfileFeatures(pf.getId());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|