1 17 18 19 package org.apache.catalina.users; 20 21 22 import org.apache.catalina.UserDatabase; 23 24 25 33 34 public class MemoryRole extends AbstractRole { 35 36 37 39 40 48 MemoryRole(MemoryUserDatabase database, 49 String rolename, String description) { 50 51 super(); 52 this.database = database; 53 setRolename(rolename); 54 setDescription(description); 55 56 } 57 58 59 61 62 65 protected MemoryUserDatabase database = null; 66 67 68 70 71 74 public UserDatabase getUserDatabase() { 75 76 return (this.database); 77 78 } 79 80 81 83 84 87 public String toString() { 88 89 StringBuffer sb = new StringBuffer ("<role rolename=\""); 90 sb.append(rolename); 91 sb.append("\""); 92 if (description != null) { 93 sb.append(" description=\""); 94 sb.append(description); 95 sb.append("\""); 96 } 97 sb.append("/>"); 98 return (sb.toString()); 99 100 } 101 102 103 } 104 | Popular Tags |