Subversion Repositories SmartDukaan

Rev

Rev 8909 | Rev 9051 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8909 Rev 8913
Line 116... Line 116...
116
		contentmigrator.touchEntityState(1008711l);
116
		contentmigrator.touchEntityState(1008711l);
117
		contentmigrator.touchEntityState(1008714l);
117
		contentmigrator.touchEntityState(1008714l);
118
		contentmigrator.touchEntityState(1008715l);
118
		contentmigrator.touchEntityState(1008715l);
119
		contentmigrator.touchEntityState(1005505l);
119
		contentmigrator.touchEntityState(1005505l);
120
		contentmigrator.touchEntityState(1006864l);*/
120
		contentmigrator.touchEntityState(1006864l);*/
121
		contentmigrator.clearEmptyPrimitiveBullets();
121
		//contentmigrator.clearEmptyPrimitiveBullets();
122
		contentmigrator.migrateSoftCategories();
122
		//contentmigrator.migrateSoftCategories();
-
 
123
		contentmigrator.updateSummaryMediaLabel();
123
	}
124
	}
124
	
125
	
125
	private void changeKeys() throws Exception {
126
	private void changeKeys() throws Exception {
126
		Map<Long, Entity>  e = CreationUtils.getEntities();
127
		Map<Long, Entity>  e = CreationUtils.getEntities();
127
		for (Map.Entry<Long, Entity> entry : e.entrySet()) {
128
		for (Map.Entry<Long, Entity> entry : e.entrySet()) {
Line 2789... Line 2790...
2789
				CreationUtils.updateEntity(e);
2790
				CreationUtils.updateEntity(e);
2790
			}
2791
			}
2791
		}
2792
		}
2792
	}
2793
	}
2793
	
2794
	
-
 
2795
	private void updateSummaryMediaLabel() throws Exception{
-
 
2796
		Map<Long, Entity> es = CreationUtils.getEntities();
-
 
2797
		for( Map.Entry<Long, Entity> entry : es.entrySet()){
-
 
2798
			Entity e = entry.getValue();
-
 
2799
			Slide summarySlide = e.getSlide(130054l);
-
 
2800
			if(summarySlide!=null){
-
 
2801
			FreeformContent ffc = summarySlide.getFreeformContent();
-
 
2802
				if (ffc !=null){
-
 
2803
					Map<String, Media> mediaMap = ffc.getMedias();
-
 
2804
					if(mediaMap != null){
-
 
2805
						for(Map.Entry<String, Media> mediaEntry : mediaMap.entrySet()) {
-
 
2806
							if(mediaEntry.getValue().getLabel().equals("default") && !mediaEntry.getKey().equals("default")){
-
 
2807
								mediaMap.put("default", mediaMap.remove(mediaEntry.getKey()));
-
 
2808
								CreationUtils.updateEntity(e);
-
 
2809
								System.out.println("Upated summary media for:" + e.getID());
-
 
2810
								break;
-
 
2811
							}
-
 
2812
						}
-
 
2813
					}
-
 
2814
				}
-
 
2815
			}
-
 
2816
		}
-
 
2817
	}
-
 
2818
	
2794
}
2819
}
2795
 
2820