Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
45 naveen 1
/**
2
 * 
3
 */
4
package in.shop2020.metamodel.util;
5
 
6
import in.shop2020.metamodel.definitions.BulletDefinition;
7
import in.shop2020.metamodel.definitions.FeatureDefinition;
8
 
9
/**
10
 * @author naveen
11
 *
12
 */
13
public class ExpandedFeatureDefinition extends FeatureDefinition {
14
 
15
	/**
16
	 * 
17
	 */
18
	private static final long serialVersionUID = 1L;
19
 
20
	/**
21
	 * 
22
	 */
23
	private ExpandedBulletDefinition expandedBulletDefinition;
24
 
25
	/**
26
	 * 
27
	 * @param featureDefintion
28
	 * @throws Exception 
29
	 */
30
	public ExpandedFeatureDefinition(FeatureDefinition featureDefinition) 
31
		throws Exception {
32
		super(featureDefinition.getID(), featureDefinition.getLabel());
33
 
34
		// Copy rest of the properties
35
		this.setAllowsBlank(featureDefinition.allowsBlank());
36
		this.setDescription(featureDefinition.getDescription());
37
		this.setBulletDefinition(featureDefinition.getBulletDefinition());
38
 
39
		// Expand BulletDefinition
40
		BulletDefinition bulletDef = featureDefinition.getBulletDefinition();
41
 
42
		this.expandedBulletDefinition = new ExpandedBulletDefinition(bulletDef);
43
	}
44
 
45
	/**
46
	 * @return the expandedBulletDefinition
47
	 */
48
	public ExpandedBulletDefinition getExpandedBulletDefinition() {
49
		return expandedBulletDefinition;
50
	}
51
 
52
	/* (non-Javadoc)
53
	 * @see java.lang.Object#toString()
54
	 */
55
	@Override
56
	public String toString() {
57
		return "ExpandedFeatureDefinition [expandedBulletDefinition="
58
				+ expandedBulletDefinition + ", allowsBlank()=" + allowsBlank()
59
				+ ", getBulletDefinition()=" + getBulletDefinition()
60
				+ ", getDescription()=" + getDescription() + ", getLabel()="
61
				+ getLabel() + ", getID()=" + getID() + "]";
62
	}
63
 
64
}