1 16 17 package org.apache.jetspeed.portal; 18 19 20 import org.apache.jetspeed.om.registry.RegistryEntry; 22 import org.apache.jetspeed.om.registry.PortletEntry; 23 import org.apache.jetspeed.services.Registry; 24 25 import org.apache.turbine.util.DynamicURI; 27 import org.apache.turbine.util.ParameterParser; 28 import org.apache.turbine.util.RunData; 29 30 60 61 public class PortletURIManager { 62 63 65 70 public static DynamicURI getPortletMaxURI( String name, RunData data ) { 71 return getPortletMaxURI( 72 Registry.getEntry(Registry.PORTLET, name ), 73 data ); 74 } 75 76 80 81 public static DynamicURI getPortletEditURI( Portlet portlet, 82 RunData data) { 83 84 DynamicURI uri = new DynamicURI( data, "Info" ); 85 uri.addPathInfo( "portlet", portlet.getName() ); 86 87 return uri; 88 89 } 90 91 92 96 public static DynamicURI getPortletMaxURI( RegistryEntry entry, RunData data ) { 97 98 DynamicURI uri = new DynamicURI( data ); 99 100 uri.addPathInfo( "portlet", entry.getName() ); 101 102 return uri; 103 104 } 105 106 117 public static final PortletEntry getEntry( ParameterParser params ) 118 { 119 String name = params.getString( "portlet" ); 120 return (PortletEntry)Registry.getEntry(Registry.PORTLET, name ); 121 } 122 123 } 124 | Popular Tags |