1 17 18 19 package org.apache.catalina.users; 20 21 22 import java.util.Iterator ; 23 import org.apache.catalina.Group; 24 import org.apache.catalina.Role; 25 import org.apache.catalina.User; 26 27 28 35 36 public abstract class AbstractUser implements User { 37 38 39 41 42 45 protected String fullName = null; 46 47 48 51 protected String password = null; 52 53 54 57 protected String username = null; 58 59 60 62 63 66 public String getFullName() { 67 68 return (this.fullName); 69 70 } 71 72 73 78 public void setFullName(String fullName) { 79 80 this.fullName = fullName; 81 82 } 83 84 85 88 public abstract Iterator getGroups(); 89 90 91 96 public String getPassword() { 97 98 return (this.password); 99 100 } 101 102 103 110 public void setPassword(String password) { 111 112 this.password = password; 113 114 } 115 116 117 120 public abstract Iterator getRoles(); 121 122 123 127 public String getUsername() { 128 129 return (this.username); 130 131 } 132 133 134 140 public void setUsername(String username) { 141 142 this.username = username; 143 144 } 145 146 147 149 150 155 public abstract void addGroup(Group group); 156 157 158 163 public abstract void addRole(Role role); 164 165 166 171 public abstract boolean isInGroup(Group group); 172 173 174 181 public abstract boolean isInRole(Role role); 182 183 184 189 public abstract void removeGroup(Group group); 190 191 192 195 public abstract void removeGroups(); 196 197 198 203 public abstract void removeRole(Role role); 204 205 206 209 public abstract void removeRoles(); 210 211 212 214 215 218 public String getName() { 219 220 return (getUsername()); 221 222 } 223 224 225 } 226 | Popular Tags |