1 16 package org.apache.cocoon.webapps.portal.acting; 17 18 import java.util.Map ; 19 import org.apache.avalon.framework.parameters.Parameters; 20 import org.apache.avalon.framework.thread.ThreadSafe; 21 import org.apache.cocoon.acting.ServiceableAction; 22 import org.apache.cocoon.environment.Redirector; 23 import org.apache.cocoon.environment.SourceResolver; 24 import org.apache.cocoon.webapps.portal.components.PortalManager; 25 26 33 public final class AuthAction 34 extends ServiceableAction 35 implements ThreadSafe { 36 37 public Map act(Redirector redirector, 38 SourceResolver resolver, 39 Map objectModel, 40 String source, 41 Parameters par) 42 throws Exception { 43 if (getLogger().isDebugEnabled()) { 44 getLogger().debug("BEGIN act resolver="+resolver+ 45 ", objectModel="+objectModel+ 46 ", source="+source+ 47 ", par="+par); 48 } 49 final String copletID = par.getParameter("coplet", null); 50 51 PortalManager portal = (PortalManager)this.manager.lookup( PortalManager.ROLE ); 52 try { 53 portal.configurationTest(); 54 if (null != copletID) { 55 portal.checkAuthentication(redirector, copletID); 56 } 57 } finally { 58 this.manager.release( portal ); 59 } 60 61 if (this.getLogger().isDebugEnabled()) { 62 this.getLogger().debug("END act map={}"); 63 } 64 return EMPTY_MAP; 65 } 66 67 } 68 | Popular Tags |