1 25 package org.nemesis.forum; 26 27 import java.io.Serializable ; 28 import java.util.Date ; 29 import java.util.Enumeration ; 30 import java.util.Iterator ; 31 import java.util.Map ; 32 33 import org.nemesis.forum.exception.UnauthorizedException; 34 35 46 public abstract class MessageFilter implements Message, Serializable { 47 48 51 protected Message message = null; 52 53 58 public MessageFilter() { 59 } 61 62 67 public MessageFilter(Message message) { 68 this.message = message; 69 } 70 71 77 public abstract MessageFilter clone(Message message); 78 79 84 public abstract String getName(); 85 86 93 public abstract String getDescription(); 94 95 104 public String getDocumentationURL() { 105 return null; 106 } 107 108 109 115 public abstract String getFilterProperty(String name); 116 117 123 public abstract String getFilterPropertyDescription(String name); 124 125 130 public abstract Enumeration getFilterPropertyNames(); 131 public abstract Map getFilterProperties(); 133 public abstract Map getFilterPropertiesDescription(); 134 144 public abstract void setFilterProperty(String name, String value) 145 throws IllegalArgumentException ; 146 147 152 public void saveFilterProperties() { 153 }; 157 158 160 public int getID() { 161 return message.getID(); 162 } 163 public boolean isApproved() { 165 return message.isApproved(); 166 } 167 168 public void setApproved(boolean approved) throws UnauthorizedException { 169 message.setApproved(approved); 170 } 171 172 public Date getCreationDate() { 173 return message.getCreationDate(); 174 } 175 176 public void setCreationDate(Date creationDate) 177 throws UnauthorizedException { 178 message.setCreationDate(creationDate); 179 } 180 181 public Date getModifiedDate() { 182 return message.getModifiedDate(); 183 } 184 185 public void setModifiedDate(Date modifiedDate) 186 throws UnauthorizedException { 187 message.setModifiedDate(modifiedDate); 188 } 189 190 public String getSubject() { 191 return message.getSubject(); 192 } 193 194 public String getUnfilteredSubject() { 195 return message.getUnfilteredSubject(); 196 } 197 198 public void setSubject(String subject) throws UnauthorizedException { 199 message.setSubject(subject); 200 } 201 202 public String getBody() { 203 return message.getBody(); 204 } 205 206 public String getUnfilteredBody() { 207 return message.getUnfilteredBody(); 208 } 209 210 public void setBody(String body) throws UnauthorizedException { 211 this.message.setBody(body); 212 } 213 214 public User getUser() { 215 return message.getUser(); 216 } 217 218 public String getProperty(String name) { 219 return message.getProperty(name); 220 } 221 222 public String getUnfilteredProperty(String name) { 223 return message.getUnfilteredBody(); 224 } 225 226 public void setProperty(String name, String value) { 227 message.setProperty(name, value); 228 } 229 230 public Iterator propertyNames() { 231 return message.propertyNames(); 232 } 233 234 public boolean isAnonymous() { 235 return message.isAnonymous(); 236 } 237 238 public ForumThread getForumThread() { 239 return message.getForumThread(); 240 } 241 242 public boolean hasPermission(int type) { 243 return message.hasPermission(type); 244 } 245 246 248 public String toString() { 249 return message.toString(); 250 } 251 252 255 256 } 257
| Popular Tags
|