1 17 18 package com.finalist.jag.skelet; 19 20 21 import java.util.*; 22 23 24 31 public class JagSkeletConfig { 32 33 34 private String author; 35 36 37 private String version; 38 39 40 private String company; 41 42 43 private Collection templates = new HashSet(); 44 45 46 53 public void setAuthor(String author) { 54 this.author = author; 55 } 56 57 58 65 public void setVersion(String version) { 66 this.version = version; 67 } 68 69 70 77 public void setCompany(String company) { 78 this.company = company; 79 } 80 81 82 89 public void addTemplateUrl(String template) { 90 this.templates.add(template); 91 } 92 93 94 101 public void addTemplateUrl(Collection templates) { 102 103 if (templates == null) { 104 return; 105 } 106 107 Iterator iterator = templates.iterator(); 108 109 while (iterator.hasNext()) { 110 addTemplateUrl((String ) iterator.next()); 111 } 112 } 113 114 115 122 public String getAuthor() { 123 return (this.author); 124 } 125 126 127 134 public String getVersion() { 135 return (this.version); 136 } 137 138 139 146 public String getCompany() { 147 return (this.company); 148 } 149 150 151 158 public String [] getTemplatesUrls() { 159 return (String []) templates.toArray(new String [templates.size()]); 160 } 161 162 163 170 public String toString() { 171 StringBuffer toString = new StringBuffer (); 172 toString.append("\nauthor : "); 173 toString.append(author); 174 toString.append("\nversion : "); 175 toString.append(version); 176 toString.append("\ncompany : "); 177 toString.append(company); 178 toString.append("\ncity : "); 179 toString.append(templates); 180 toString.append("\ntemplates : "); 181 182 return new String (toString); 183 } 184 } | Popular Tags |