1 package org.apache.jetspeed.modules.actions.portlets; 2 3 import org.apache.turbine.modules.Action; 5 import org.apache.turbine.util.RunData; 6 7 import org.apache.jetspeed.portal.Portlet; 9 import org.apache.jetspeed.portal.PortletException; 10 import org.apache.jetspeed.portal.factory.PortletFactory; 11 import org.apache.jetspeed.services.registrymanager.RegistryManager; 12 import org.apache.jetspeed.om.registry.peer.PortletEntry; 13 14 15 20 public class ClosePortlet extends Action 21 { 22 public void doPerform( RunData rundata ) throws Exception 23 { 24 25 if( rundata.getUser() == null || !rundata.getUser().hasLoggedIn() ) 26 { 27 return; 28 } 29 30 String name = rundata.getParameters().getString ( "portletName", null ); 31 if ( name == null ) 32 { 33 return; 34 } 35 36 PortletEntry entry = (PortletEntry)RegistryManager.getEntry(RegistryManager.PORTLET_REGISTRY, name ); 37 if ( entry == null ) 38 { 39 return; 40 } 41 42 Portlet portlet = PortletFactory.getPortlet( entry ); 43 if ( portlet == null ) 44 { 45 return; 46 } 47 48 } 50 51 } 52 | Popular Tags |