1 package org.tigris.scarab.test.mocks; 2 3 48 49 import java.util.Map ; 50 51 import org.apache.commons.configuration.BaseConfiguration; 52 import org.apache.commons.configuration.Configuration; 53 import org.apache.fulcrum.InitializationException; 54 import org.apache.fulcrum.ServiceBroker; 55 import org.apache.fulcrum.ServiceException; 56 import org.apache.fulcrum.security.SecurityService; 57 import org.apache.fulcrum.security.entity.Group; 58 import org.apache.fulcrum.security.entity.Permission; 59 import org.apache.fulcrum.security.entity.Role; 60 import org.apache.fulcrum.security.entity.User; 61 import org.apache.fulcrum.security.util.AccessControlList; 62 import org.apache.fulcrum.security.util.DataBackendException; 63 import org.apache.fulcrum.security.util.EntityExistsException; 64 import org.apache.fulcrum.security.util.GroupSet; 65 import org.apache.fulcrum.security.util.PasswordMismatchException; 66 import org.apache.fulcrum.security.util.PermissionSet; 67 import org.apache.fulcrum.security.util.RoleSet; 68 import org.apache.fulcrum.security.util.UnknownEntityException; 69 import org.apache.log4j.Category; 70 import org.apache.torque.util.Criteria; 71 72 76 public class MockSecurityService implements SecurityService { 77 78 private Configuration configuration; 79 public MockSecurityService() { 80 configuration = new BaseConfiguration(); 81 configuration.addProperty("user.class","org.tigris.scarab.om.ScarabUserImpl"); 82 } 83 84 public Class getUserClass() throws UnknownEntityException { 85 86 return null; 87 } 88 89 public User getUserInstance() throws UnknownEntityException { 90 91 return null; 92 } 93 94 public User getUserInstance(String userName) throws UnknownEntityException { 95 96 return null; 97 } 98 99 public Class getGroupClass() throws UnknownEntityException { 100 101 return null; 102 } 103 104 public Group getGroupInstance() throws UnknownEntityException { 105 106 return null; 107 } 108 109 public Group getGroupInstance(String groupName) throws UnknownEntityException { 110 111 return null; 112 } 113 114 public Class getPermissionClass() throws UnknownEntityException { 115 116 return null; 117 } 118 119 public Permission getPermissionInstance() throws UnknownEntityException { 120 121 return null; 122 } 123 124 public Permission getPermissionInstance(String permName) throws UnknownEntityException { 125 126 return null; 127 } 128 129 public Class getRoleClass() throws UnknownEntityException { 130 131 return null; 132 } 133 134 public Role getRoleInstance() throws UnknownEntityException { 135 136 return null; 137 } 138 139 public Role getRoleInstance(String roleName) throws UnknownEntityException { 140 141 return null; 142 } 143 144 public Class getAclClass() throws UnknownEntityException { 145 146 return null; 147 } 148 149 public AccessControlList getAclInstance(Map roles, Map permissions) throws UnknownEntityException { 150 151 return null; 152 } 153 154 public boolean accountExists(String userName) throws DataBackendException { 155 156 return false; 157 } 158 159 public boolean accountExists(User user) throws DataBackendException { 160 161 return false; 162 } 163 164 public User getAuthenticatedUser(String username, String password) throws DataBackendException, 165 UnknownEntityException, PasswordMismatchException { 166 167 return null; 168 } 169 170 public User getUser(String username) throws DataBackendException, UnknownEntityException { 171 172 return null; 173 } 174 175 public User[] getUsers(Criteria criteria) throws DataBackendException { 176 177 return null; 178 } 179 180 public User getAnonymousUser() throws UnknownEntityException { 181 182 return null; 183 } 184 185 public void saveUser(User user) throws UnknownEntityException, DataBackendException { 186 187 188 } 189 190 public void addUser(User user, String password) throws DataBackendException, EntityExistsException { 191 192 193 } 194 195 public void removeUser(User user) throws DataBackendException, UnknownEntityException { 196 197 198 } 199 200 public String encryptPassword(String password) { 201 202 return null; 203 } 204 205 public void changePassword(User user, String oldPassword, String newPassword) throws PasswordMismatchException, 206 UnknownEntityException, DataBackendException { 207 208 209 } 210 211 public void forcePassword(User user, String password) throws UnknownEntityException, DataBackendException { 212 213 214 } 215 216 public AccessControlList getACL(User user) throws DataBackendException, UnknownEntityException { 217 218 return null; 219 } 220 221 public PermissionSet getPermissions(Role role) throws DataBackendException, UnknownEntityException { 222 223 return null; 224 } 225 226 public void grant(User user, Group group, Role role) throws DataBackendException, UnknownEntityException { 227 228 229 } 230 231 public void revoke(User user, Group group, Role role) throws DataBackendException, UnknownEntityException { 232 233 234 } 235 236 public void revokeAll(User user) throws DataBackendException, UnknownEntityException { 237 238 239 } 240 241 public void grant(Role role, Permission permission) throws DataBackendException, UnknownEntityException { 242 243 244 } 245 246 public void revoke(Role role, Permission permission) throws DataBackendException, UnknownEntityException { 247 248 249 } 250 251 public void revokeAll(Role role) throws DataBackendException, UnknownEntityException { 252 253 254 } 255 256 public Group getGlobalGroup() { 257 258 return null; 259 } 260 261 public Group getNewGroup(String groupName) { 262 263 return null; 264 } 265 266 public Role getNewRole(String roleName) { 267 268 return null; 269 } 270 271 public Permission getNewPermission(String permissionName) { 272 273 return null; 274 } 275 276 public Group getGroup(String name) throws DataBackendException, UnknownEntityException { 277 278 return null; 279 } 280 281 public Role getRole(String name) throws DataBackendException, UnknownEntityException { 282 283 return null; 284 } 285 286 public Permission getPermission(String name) throws DataBackendException, UnknownEntityException { 287 288 return null; 289 } 290 291 public GroupSet getGroups(Criteria criteria) throws DataBackendException { 292 293 return null; 294 } 295 296 public RoleSet getRoles(Criteria criteria) throws DataBackendException { 297 298 return null; 299 } 300 301 public PermissionSet getPermissions(Criteria criteria) throws DataBackendException { 302 303 return null; 304 } 305 306 public GroupSet getAllGroups() throws DataBackendException { 307 308 return null; 309 } 310 311 public RoleSet getAllRoles() throws DataBackendException { 312 313 return null; 314 } 315 316 public PermissionSet getAllPermissions() throws DataBackendException { 317 318 return null; 319 } 320 321 public void saveGroup(Group group) throws DataBackendException, UnknownEntityException { 322 323 324 } 325 326 public void saveRole(Role role) throws DataBackendException, UnknownEntityException { 327 328 329 } 330 331 public void savePermission(Permission permission) throws DataBackendException, UnknownEntityException { 332 333 334 } 335 336 public Group addGroup(Group group) throws DataBackendException, EntityExistsException { 337 338 return null; 339 } 340 341 public Role addRole(Role role) throws DataBackendException, EntityExistsException { 342 343 return null; 344 } 345 346 public Permission addPermission(Permission permission) throws DataBackendException, EntityExistsException { 347 348 return null; 349 } 350 351 public void removeGroup(Group group) throws DataBackendException, UnknownEntityException { 352 353 354 } 355 356 public void removeRole(Role role) throws DataBackendException, UnknownEntityException { 357 358 359 } 360 361 public void removePermission(Permission permission) throws DataBackendException, UnknownEntityException { 362 363 364 } 365 366 public void renameGroup(Group group, String name) throws DataBackendException, UnknownEntityException { 367 368 369 } 370 371 public void renameRole(Role role, String name) throws DataBackendException, UnknownEntityException { 372 373 374 } 375 376 public void renamePermission(Permission permission, String name) throws DataBackendException, 377 UnknownEntityException { 378 379 380 } 381 382 public void init() throws InitializationException { 383 384 385 } 386 387 public void shutdown() { 388 389 390 } 391 392 public boolean isInitialized() { 393 394 return false; 395 } 396 397 public void setServiceBroker(ServiceBroker broker) { 398 399 400 } 401 402 public void setName(String name) { 403 404 405 } 406 407 public Configuration getConfiguration() { 408 return configuration; 409 } 410 411 public String getRealPath(String path) { 412 413 return null; 414 } 415 416 public Category getCategory() { 417 418 return null; 419 } 420 421 public String getStatus() throws ServiceException { 422 423 return null; 424 } 425 426 } 427 | Popular Tags |