1 16 17 package org.apache.jetspeed.om.profile.psml; 18 19 import org.apache.jetspeed.services.idgenerator.JetspeedIdGenerator; 20 21 import org.apache.jetspeed.om.profile.*; 22 23 30 public class PsmlIdentityElement extends PsmlConfigElement implements IdentityElement, java.io.Serializable 31 { 32 33 private String id = null; 34 35 private MetaInfo metaInfo = null; 36 37 private Skin skin = null; 38 39 private Layout layout = null; 40 41 private Control control = null; 42 43 private Controller controller = null ; 44 45 public PsmlIdentityElement() 46 {} 47 48 49 public String getId() 50 { 51 if (this.id == null) 52 { 53 this.id = JetspeedIdGenerator.getNextPeid(); 54 } 55 return this.id; 56 } 57 58 59 public void setId( String id ) 60 { 61 this.id = id; 62 } 63 64 65 public Skin getSkin() 66 { 67 return this.skin; 68 } 69 70 71 public void setSkin(Skin skin) 72 { 73 this.skin = skin; 74 } 75 76 77 public Layout getLayout() 78 { 79 return this.layout; 80 } 81 82 83 public void setLayout(Layout layout) 84 { 85 this.layout = layout; 86 } 87 88 89 public Control getControl() 90 { 91 return this.control; 92 } 93 94 95 public void setControl(Control control) 96 { 97 this.control = control; 98 } 99 100 public Controller getController() 101 { 102 return this.controller; 103 } 104 105 public void setController(Controller controller) 106 { 107 this.controller = controller; 108 } 109 110 111 113 117 public MetaInfo getMetaInfo() 118 { 119 return this.metaInfo; 120 } 121 122 127 public void setMetaInfo( MetaInfo metaInfo ) 128 { 129 this.metaInfo = metaInfo; 130 } 131 132 134 135 public String getTitle() 136 { 137 if (this.metaInfo != null) 138 { 139 return this.metaInfo.getTitle(); 140 } 141 142 return null; 143 } 144 145 146 public void setTitle(String title) 147 { 148 if (this.metaInfo == null) 149 { 150 this.metaInfo = new PsmlMetaInfo(); 151 } 152 153 this.metaInfo.setTitle(title); 154 } 155 156 157 public String getDescription() 158 { 159 if (this.metaInfo != null) 160 { 161 return this.metaInfo.getDescription(); 162 } 163 164 return null; 165 } 166 167 168 public void setDescription(String description) 169 { 170 if (this.metaInfo == null) 171 { 172 this.metaInfo = new PsmlMetaInfo(); 173 } 174 175 this.metaInfo.setDescription(description); 176 } 177 178 179 public String getImage() 180 { 181 if (this.metaInfo != null) 182 { 183 return this.metaInfo.getImage(); 184 } 185 186 return null; 187 } 188 189 190 public void setImage(String image) 191 { 192 if (this.metaInfo == null) 193 { 194 this.metaInfo = new PsmlMetaInfo(); 195 } 196 197 this.metaInfo.setImage(image); 198 } 199 200 203 public Object clone() 204 throws java.lang.CloneNotSupportedException 205 { 206 Object cloned = super.clone(); 207 208 ((PsmlIdentityElement)cloned).metaInfo = ((this.metaInfo == null) ? null : (MetaInfo) this.metaInfo.clone()); 210 ((PsmlIdentityElement)cloned).skin = ((this.skin == null) ? null : (Skin) this.skin.clone()); 211 ((PsmlIdentityElement)cloned).layout = ((this.layout == null) ? null : (Layout) this.layout.clone()); 212 ((PsmlIdentityElement)cloned).control = ((this.control == null) ? null : (Control) this.control.clone()); 213 ((PsmlIdentityElement)cloned).controller = ((this.controller == null) ? null : (Controller) this.controller.clone()); 214 215 return cloned; 216 217 } } | Popular Tags |