/** * Given a application relative path, returns the real path relative to the * application root * */ public String getRealPath( String path ) { String result = ""; String base = context.getApplicationRoot(); if (base.endsWith(java.io.File.separator)) { if (path.startsWith("/")) { result = base.concat(path.substring(1)); return result; } } else { if (!path.startsWith("/")) { result = base.concat("/").concat(path); return result; } } return base.concat(path); }
public JetspeedPortletInvokerService(ServletConfig servletConfig, PortalContext portalContext, PortletFactory portletFactory, ContainerRequestResponseUnwrapper requestResponseUnwrapper) { this.servletConfig = servletConfig; this.portalContext = portalContext; this.portletFactory = portletFactory; this.requestResponseUnwrapper = requestResponseUnwrapper; this.servletMappingName = portalContext.getConfigurationProperty(INVOKER_SERVLET_MAPPING_NAME, DEFAULT_MAPPING_NAME); }
/** * Initializes the services which need <code>RunData</code> to initialize * themselves (post startup). * * @param request The first <code>GET</code> request. * @param response The first <code>GET</code> response. * */ public final void init( HttpServletRequest request, HttpServletResponse response ) { synchronized (JetspeedServlet.class) { if (firstDoGet) { // initialize the Portal context path engine.getContext().setContextPath(request.getContextPath()); // Mark that we're done. firstDoGet = false; } } }
public AbstractPortalURL(NavigationalState navState, PortalContext portalContext) { if ( navStateParameter == null ) { navStateParameter = portalContext.getConfigurationProperty("portalurl.navigationalstate.parameter.name", DEFAULT_NAV_STATE_PARAMETER); } this.navState = navState; if ( relativeOnly == null ) { relativeOnly = new Boolean(portalContext.getConfiguration().getBoolean("portalurl.relative.only", false)); } if (pagePipeline == null) { synchronized (lock) { String pagePipelineName = portalContext.getConfiguration().getString(JetspeedEngineConstants.PIPELINE_DEFAULT, "/portal"); PipelineMapper pipelineMapper = Jetspeed.getEngine().getComponentManager().lookupComponent("pipeline-mapper"); pagePipeline = pipelineMapper.getMappedPathByPipelineId(pagePipelineName); portletPipeline = pipelineMapper.getMappedPathByPipelineId(PortalReservedParameters.PORTLET_PIPELINE); } } }
new Boolean(Jetspeed.getContext().getConfiguration().getBoolean("merge.portal.parameters.with.portlet.parameters", false)); mergePortalParametersBeforePortletParameters = new Boolean(Jetspeed.getContext().getConfiguration().getBoolean("merge.portal.parameters.before.portlet.parameters", false));
this.desktopUrlBeanName = desktopUrlBeanName; Enumeration<PortletMode> portletModesEnum = portalContext.getSupportedPortletModes(); PortletMode portletMode; while ( portletModesEnum.hasMoreElements() ) supportedPortletModes.put(portletMode.toString(), portletMode); Enumeration<WindowState> windowStatesEnum = portalContext.getSupportedWindowStates(); WindowState windowState; while ( windowStatesEnum.hasMoreElements() )
public JetspeedEngine(PortalConfiguration configuration, String applicationRoot, ServletConfig config, ComponentManager componentManager ) { this.componentManager = componentManager; this.context = new JetspeedPortalContext(this, configuration, applicationRoot); this.config = config; context.setApplicationRoot(applicationRoot); context.setConfiguration(configuration); defaultPipelineName = configuration.getString(PIPELINE_DEFAULT, "jetspeed-pipeline"); configuration.setString(JetspeedEngineConstants.APPLICATION_ROOT_KEY, applicationRoot); // Make these availble as beans to Spring componentManager.addComponent("Engine", this); componentManager.addComponent("PortalContext", context); componentManager.addComponent("PortalConfiguration", configuration); }
pa.setLocalContextPath(portalContext.getContextPath());
pa, ContainerInfo.getInfo(), portalContext.getConfiguration(), rdService, servletContextProvider