1 5 package org.exoplatform.portlets.content.display.component.model; 6 7 8 import org.apache.commons.lang.StringUtils; 9 15 public class ContentConfig { 16 private String name_ ; 17 private String title_ ; 18 private String uri_ ; 19 private String encoding_ ; 20 private String content_ ; 21 22 public ContentConfig() { 23 } 24 25 public ContentConfig(String name, String [] values) { 26 name_ = name ; 27 for(int i = 0; i < values.length; i++) { 28 String [] tmp = StringUtils.split(values[i], "=") ; 29 if (tmp.length == 2) { 30 if("uri".equals(tmp[0])) { 31 uri_ = tmp[1] ; 32 } else if ("encoding".equals(tmp[0])) { 33 encoding_ = tmp[1] ; 34 } else if ("title".equals(tmp[0])) { 35 title_ = tmp[1] ; 36 } 37 } 38 } 39 content_ = null; 40 } 41 42 45 public String getEncoding() { return encoding_; } 46 49 public void setEncoding(String encoding_) { this.encoding_ = encoding_; } 50 53 public String getName() { return name_; } 54 58 public void setName(String name_) { this.name_ = name_; } 59 62 public String getTitle() { return title_; } 63 67 public void setTitle(String title_) { this.title_ = title_; } 68 69 72 public String getUri() { 74 if (uri_==null) 75 uri_ = ""; 76 return uri_; 77 } 78 79 83 public void setUri(String uri_) { this.uri_ = uri_; } 84 85 public String getContent() { return content_; } 86 87 public void setContent(String content) { this.content_ = content; } 88 89 } | Popular Tags |