1 31 package org.blojsom.plugin.moblog; 32 33 import org.blojsom.util.BlojsomUtils; 34 35 import java.util.HashMap ; 36 import java.util.Map ; 37 38 48 public class Mailbox { 49 50 private static final String DEFAULT_FOLDER = "INBOX"; 51 52 private Integer _id; 53 private String _blogId; 54 private String _hostName; 55 private String _userId; 56 private String _password; 57 private String _folder = DEFAULT_FOLDER; 58 private String _outputDirectory; 59 private String _entriesDirectory; 60 private String _categoryId; 61 private String _urlPrefix; 62 private String _secretWord; 63 private boolean _enabled; 64 private Map _imageMimeTypes; 65 private Map _attachmentMimeTypes; 66 private Map _textMimeTypes; 67 private Map _authorizedAddresses; 68 private String _ignoreExpression; 69 private String _blogBaseURL; 70 71 74 public Mailbox() { 75 _enabled = false; 76 _imageMimeTypes = new HashMap (); 77 _attachmentMimeTypes = new HashMap (); 78 _textMimeTypes = new HashMap (); 79 _authorizedAddresses = new HashMap (); 80 } 81 82 89 public Mailbox(String hostname, String userid, String password) { 90 _hostName = hostname; 91 _userId = userid; 92 _password = password; 93 } 94 95 100 public String getHostName() { 101 return _hostName; 102 } 103 104 109 public void setHostName(String hostName) { 110 _hostName = hostName; 111 } 112 113 118 public String getUserId() { 119 return _userId; 120 } 121 122 127 public void setUserId(String userId) { 128 _userId = userId; 129 } 130 131 136 public String getPassword() { 137 return _password; 138 } 139 140 145 public void setPassword(String password) { 146 _password = password; 147 } 148 149 154 public String getFolder() { 155 return _folder; 156 } 157 158 163 public void setFolder(String folder) { 164 _folder = folder; 165 } 166 167 172 public String getOutputDirectory() { 173 return _outputDirectory; 174 } 175 176 181 public void setOutputDirectory(String outputDirectory) { 182 _outputDirectory = outputDirectory; 183 } 184 185 190 public String getUrlPrefix() { 191 return _urlPrefix; 192 } 193 194 199 public void setUrlPrefix(String urlPrefix) { 200 _urlPrefix = urlPrefix; 201 } 202 203 208 public String getEntriesDirectory() { 209 return _entriesDirectory; 210 } 211 212 217 public void setEntriesDirectory(String entriesDirectory) { 218 _entriesDirectory = entriesDirectory; 219 } 220 221 226 public String getCategoryId() { 227 return _categoryId; 228 } 229 230 235 public void setCategoryId(String categoryId) { 236 _categoryId = categoryId; 237 } 238 239 244 public boolean isEnabled() { 245 return _enabled; 246 } 247 248 253 public void setEnabled(boolean enabled) { 254 _enabled = enabled; 255 } 256 257 262 public Map getImageMimeTypes() { 263 return _imageMimeTypes; 264 } 265 266 271 public String getImageMimeTypesAsStringList() { 272 return BlojsomUtils.getKeysAsStringList(_imageMimeTypes); 273 } 274 275 280 public void setImageMimeTypes(Map imageMimeTypes) { 281 _imageMimeTypes = imageMimeTypes; 282 } 283 284 289 public Map getAttachmentMimeTypes() { 290 return _attachmentMimeTypes; 291 } 292 293 298 public String getAttachmentMimeTypesAsStringList() { 299 return BlojsomUtils.getKeysAsStringList(_attachmentMimeTypes); 300 } 301 302 307 public void setAttachmentMimeTypes(Map attachmentMimeTypes) { 308 _attachmentMimeTypes = attachmentMimeTypes; 309 } 310 311 316 public Map getTextMimeTypes() { 317 return _textMimeTypes; 318 } 319 320 325 public String getTextMimeTypesAsStringList() { 326 return BlojsomUtils.getKeysAsStringList(_textMimeTypes); 327 } 328 329 334 public void setTextMimeTypes(Map textMimeTypes) { 335 _textMimeTypes = textMimeTypes; 336 } 337 338 343 public String getSecretWord() { 344 return _secretWord; 345 } 346 347 352 public void setSecretWord(String secretWord) { 353 _secretWord = secretWord; 354 } 355 356 361 public Map getAuthorizedAddresses() { 362 return _authorizedAddresses; 363 } 364 365 370 public void setAuthorizedAddresses(Map authorizedAddresses) { 371 _authorizedAddresses = authorizedAddresses; 372 } 373 374 379 public String getIgnoreExpression() { 380 return _ignoreExpression; 381 } 382 383 388 public void setIgnoreExpression(String ignoreExpression) { 389 _ignoreExpression = ignoreExpression; 390 } 391 392 397 public String getBlogId() { 398 return _blogId; 399 } 400 401 406 public void setBlogId(String blogId) { 407 _blogId = blogId; 408 } 409 410 415 public Integer getId() { 416 return _id; 417 } 418 419 424 public void setId(Integer id) { 425 _id = id; 426 } 427 428 433 public String getBlogBaseURL() { 434 return _blogBaseURL; 435 } 436 437 442 public void setBlogBaseURL(String blogBaseURL) { 443 _blogBaseURL = blogBaseURL; 444 } 445 } 446 | Popular Tags |