1 18 19 package org.apache.roller.ui.rendering.util; 20 21 import org.apache.roller.pojos.CommentData; 22 import org.apache.roller.pojos.WeblogEntryData; 23 import org.apache.roller.pojos.wrapper.CommentDataWrapper; 24 import org.apache.roller.pojos.wrapper.WeblogEntryDataWrapper; 25 26 27 31 public class WeblogEntryCommentForm { 32 33 private boolean error = false; 34 private String message = null; 35 36 private String name = ""; 37 private String email = ""; 38 private String url = ""; 39 private String content = ""; 40 private boolean notify = false; 41 42 private CommentData previewComment = null; 43 44 45 public WeblogEntryCommentForm() {} 46 47 48 public void setPreview(CommentData preview) { 49 this.previewComment = preview; 50 setData(preview); 51 } 52 53 public void setData(CommentData comment) { 54 this.name = comment.getName(); 55 this.email = comment.getEmail(); 56 this.url = comment.getUrl(); 57 this.content = comment.getContent(); 58 this.notify = comment.getNotify().booleanValue(); 59 } 60 61 public void setError(String errorMessage) { 62 this.error = true; 63 this.message = errorMessage; 64 } 65 66 public CommentDataWrapper getPreviewComment() { 67 return CommentDataWrapper.wrap(previewComment); 68 } 69 70 public boolean isPreview() { 71 return (this.previewComment != null); 72 } 73 74 public String getName() { 75 return name; 76 } 77 78 public void setName(String name) { 79 this.name = name; 80 } 81 82 public String getEmail() { 83 return email; 84 } 85 86 public void setEmail(String email) { 87 this.email = email; 88 } 89 90 public String getUrl() { 91 return url; 92 } 93 94 public void setUrl(String url) { 95 this.url = url; 96 } 97 98 public String getContent() { 99 return content; 100 } 101 102 public void setContent(String content) { 103 this.content = content; 104 } 105 106 public boolean isNotify() { 107 return notify; 108 } 109 110 public void setNotify(boolean notify) { 111 this.notify = notify; 112 } 113 114 public boolean isError() { 115 return error; 116 } 117 118 public void setError(boolean error) { 119 this.error = error; 120 } 121 122 public String getMessage() { 123 return message; 124 } 125 126 public void setMessage(String message) { 127 this.message = message; 128 } 129 130 } 131 | Popular Tags |