Subversion Repositories SmartDukaan

Rev

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

Rev 11992 Rev 12068
Line 63... Line 63...
63
	}
63
	}
64
	public ContentPojo getProductAttributes(long catalog_item_id){
64
	public ContentPojo getProductAttributes(long catalog_item_id){
65
		return StorageManager.getById(StorageManager.views.siteContent, new Long(catalog_item_id),ContentPojo.class);
65
		return StorageManager.getById(StorageManager.views.siteContent, new Long(catalog_item_id),ContentPojo.class);
66
	}
66
	}
67
	public void createPrivateDealsNewsLetter(String[] itemids) throws IOException{
67
	public void createPrivateDealsNewsLetter(String[] itemids) throws IOException{
68
		File file = new File("/home/vikram/Desktop/newsletter.html");
68
		File file = new File("/home/newsletter.html");
69
		BufferedWriter fileWriter = new BufferedWriter(new FileWriter(file));
69
		BufferedWriter fileWriter = new BufferedWriter(new FileWriter(file));
70
		ContentPojo cp;
70
		ContentPojo cp;
71
		Map<Long,ItemPojo> ItemPojoMap = new HashMap<Long,ItemPojo>();
71
		Map<Long,ItemPojo> ItemPojoMap = new HashMap<Long,ItemPojo>();
72
		Map<Long,ContentPojo> ContentPojoMap = new HashMap<Long,ContentPojo>();
72
		Map<Long,ContentPojo> ContentPojoMap = new HashMap<Long,ContentPojo>();
73
		for(String itemid:itemids){
73
		for(String itemid:itemids){
Line 129... Line 129...
129
		CreateFooter(fileWriter);
129
		CreateFooter(fileWriter);
130
		fileWriter.close();
130
		fileWriter.close();
131
		
131
		
132
	}
132
	}
133
	public void CreateHeader(BufferedWriter fileWriter) throws IOException{
133
	public void CreateHeader(BufferedWriter fileWriter) throws IOException{
134
		File input = new File("/home/vikram/Desktop/header.html");
134
		File input = new File("/home/header.html");
135
		Scanner sc = new Scanner(input);
135
		Scanner sc = new Scanner(input);
136
		while (sc.hasNextLine()) {
136
		while (sc.hasNextLine()) {
137
            String s = sc.nextLine();
137
            String s = sc.nextLine();
138
            fileWriter.write(s);
138
            fileWriter.write(s);
139
        }
139
        }
140
	}
140
	}
141
	public void CreateFooter(BufferedWriter fileWriter) throws IOException{
141
	public void CreateFooter(BufferedWriter fileWriter) throws IOException{
142
		File input = new File("/home/vikram/Desktop/footer.html");
142
		File input = new File("/home/footer.html");
143
		Scanner sc = new Scanner(input);
143
		Scanner sc = new Scanner(input);
144
		while (sc.hasNextLine()) {
144
		while (sc.hasNextLine()) {
145
            String s = sc.nextLine();
145
            String s = sc.nextLine();
146
            fileWriter.write(s);
146
            fileWriter.write(s);
147
        }
147
        }