1 16 package org.apache.cocoon.webapps.authentication.user; 17 18 import java.util.HashMap ; 19 import java.util.Map ; 20 21 29 public final class UserState 30 implements java.io.Serializable { 31 32 33 private Map handlers = new HashMap (7); 34 35 38 public UserState() { 39 } 40 41 public void addHandler(UserHandler value) { 42 this.handlers.put(value.getHandlerName(), value); 43 } 44 45 public void removeHandler(String name) { 46 this.handlers.remove( name ); 47 } 48 49 public UserHandler getHandler(String name) { 50 return (UserHandler) this.handlers.get( name ); 51 } 52 53 public boolean hasHandler() { 54 return (this.handlers.size() > 0); 55 } 56 } 57 | Popular Tags |