1 20 21 package com.methodhead.test; 22 23 import com.methodhead.sitecontext.SiteContext; 24 import com.methodhead.auth.SiteAuthUser; 25 import com.methodhead.auth.AuthException; 26 27 public class TestSiteUser 28 extends 29 TestUser 30 implements 31 SiteAuthUser { 32 33 35 37 39 41 public void setSiteContext( 42 SiteContext siteContext ) { 43 44 this.siteContext = siteContext; 45 } 46 47 public boolean loadForLogin( 48 String login ) 49 throws 50 AuthException { 51 52 if ( siteContext == null ) { 53 throw new RuntimeException ( "Site context has not been set." ); 54 } 55 56 return super.loadForLogin( login ); 57 } 58 59 61 63 private SiteContext siteContext = null; 64 } 65 | Popular Tags |