Subversion Repositories SmartDukaan

Rev

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

Rev 35346 Rev 35503
Line 35... Line 35...
35
	private String name;
35
	private String name;
36
	private String categoryName;
36
	private String categoryName;
37
	private String categoryUrl;
37
	private String categoryUrl;
38
	private String breadCrumb;
38
	private String breadCrumb;
39
	private float price;
39
	private float price;
-
 
40
    private String description;
40
 
41
 
41
	public float getPrice() {
42
	public float getPrice() {
42
		return price;
43
		return price;
43
	}
44
	}
44
 
45
 
Line 193... Line 194...
193
 
194
 
194
	public void setVideoUrls(List<VideoUrlsContentPojo> videoUrls) {
195
	public void setVideoUrls(List<VideoUrlsContentPojo> videoUrls) {
195
		this.videoUrls = videoUrls;
196
		this.videoUrls = videoUrls;
196
	}
197
	}
197
 
198
 
-
 
199
    public String getDescription() {
-
 
200
        return description;
-
 
201
    }
-
 
202
 
-
 
203
    public void generateDescription() {
-
 
204
        StringBuilder desc = new StringBuilder();
-
 
205
 
-
 
206
        if (this.introduction != null && !this.introduction.trim().isEmpty()) {
-
 
207
            desc.append(this.introduction.trim()).append("<br><br>");
-
 
208
        }
-
 
209
 
-
 
210
        if (keySpecs != null && !keySpecs.isEmpty()) {
-
 
211
            desc.append("Key Specifications: <br>");
-
 
212
            for (String spec : keySpecs) {
-
 
213
                if (spec != null && !spec.trim().isEmpty()) {
-
 
214
                    desc.append("• ").append(spec.trim()).append(" <br>");
-
 
215
                }
-
 
216
            }
-
 
217
            desc.append(" <br>");
-
 
218
        }
-
 
219
 
-
 
220
        if (detailedSpecs != null && !detailedSpecs.isEmpty()) {
-
 
221
            desc.append("Detailed Specifications: <br>");
-
 
222
            for (SpecificationGroup group : detailedSpecs) {
-
 
223
                if (group == null || group.getTitle() == null) continue;
-
 
224
                desc.append(" <br>").append(group.getTitle().toUpperCase()).append(": <br>");
-
 
225
 
-
 
226
                List<Specification> specs = group.getSpecs();
-
 
227
                if (specs != null && !specs.isEmpty()) {
-
 
228
                    for (Specification spec : specs) {
-
 
229
                        if (spec == null) continue;
-
 
230
                        String name = spec.getName() != null ? spec.getName().trim() : "";
-
 
231
                        String value = spec.getString() != null ? spec.getString().trim() : "";
-
 
232
                        if (!name.isEmpty() && !value.isEmpty()) {
-
 
233
                            desc.append(" - ").append(name).append(": ").append(value).append(" <br>");
-
 
234
                        }
-
 
235
                    }
-
 
236
                }
-
 
237
            }
-
 
238
            desc.append(" <br>");
-
 
239
        }
-
 
240
 
-
 
241
        if (packageContents != null && !packageContents.isEmpty()) {
-
 
242
            desc.append("Package Contents: <br>");
-
 
243
            for (String item : packageContents) {
-
 
244
                if (item != null && !item.trim().isEmpty()) {
-
 
245
                    desc.append("• ").append(item.trim()).append(" <br>");
-
 
246
                }
-
 
247
            }
-
 
248
            desc.append(" <br>");
-
 
249
        }
-
 
250
 
-
 
251
        if (this.offerText != null && !this.offerText.trim().isEmpty()) {
-
 
252
            desc.append("Offers: ").append(this.offerText.trim()).append("<br><br>");
-
 
253
        }
-
 
254
 
-
 
255
        if (this.warranty != null && !this.warranty.trim().isEmpty()) {
-
 
256
            desc.append("Warranty: ").append(this.warranty.trim()).append(" <br>");
-
 
257
        }
-
 
258
 
-
 
259
        this.description = desc.toString().trim();
-
 
260
    }
-
 
261
 
198
	@Override
262
    @Override
199
	public String toString() {
263
	public String toString() {
200
		return "ContentPojo [id=" + id + ", introduction=" + introduction + ", url=" + url + ", keySpecs=" + keySpecs
264
		return "ContentPojo [id=" + id + ", introduction=" + introduction + ", url=" + url + ", keySpecs=" + keySpecs
201
				+ ", detailedSpecs=" + detailedSpecs + ", warranty=" + warranty + ", name=" + name + ", categoryName="
265
				+ ", detailedSpecs=" + detailedSpecs + ", warranty=" + warranty + ", name=" + name + ", categoryName="
202
				+ categoryName + ", categoryUrl=" + categoryUrl + ", breadCrumb=" + breadCrumb + ", price=" + price
266
				+ categoryName + ", categoryUrl=" + categoryUrl + ", breadCrumb=" + breadCrumb + ", price=" + price
203
				+ ", reocmmendedAccessories=" + reocmmendedAccessories + ", defaultImageUrl=" + defaultImageUrl
267
				+ ", reocmmendedAccessories=" + reocmmendedAccessories + ", defaultImageUrl=" + defaultImageUrl