1 package org.infoglue.cms.entities.management; 2 3 public class Message 4 { 5 private int id; 6 private String userName; 7 private Integer type; 8 private String text; 9 10 public Message(int id, String userName, Integer type, String newtext) 11 { 12 this.id = id; 13 this.userName = userName; 14 this.type = type; 15 16 text = newtext; 17 if (text.length() > 256) 18 { 19 text = text.substring(0, 256); 20 } 21 text = text.replace('<', '['); 22 text = text.replace('&', '_'); 23 } 24 25 public long getId() 26 { 27 return id; 28 } 29 30 public String getText() 31 { 32 return text; 33 } 34 35 public String getUserName() 36 { 37 return userName; 38 } 39 40 public Integer getType() 41 { 42 return type; 43 } 44 } | Popular Tags |