protected RequestContextComponent getRequestContextComponent() { if (requestContextComponent == null) { requestContextComponent = Jetspeed.getComponentManager().lookupComponent("org.apache.jetspeed.request.RequestContextComponent"); } return requestContextComponent; }
public void init() throws ServletException { super.init(); asm = Jetspeed.getComponentManager().lookupComponent(ApplicationServerManager.class); registry = Jetspeed.getComponentManager().lookupComponent(PortletRegistry.class); portletFactory = Jetspeed.getComponentManager().lookupComponent("portletFactory"); dm = Jetspeed.getComponentManager().lookupComponent("deploymentManager"); }
public Object getComponent(String name) { return Jetspeed.getComponentManager().lookupComponent(name); }
protected PortletPreferencesProvider getPreferencesProvider() { try { return Jetspeed.getComponentManager().lookupComponent("org.apache.jetspeed.components.portletpreferences.PortletPreferencesProvider"); } catch (Exception e) { return null; } }
public static PortalConfiguration getConfiguration() { ComponentManager manager = getComponentManager(); if (manager != null) return manager.lookupComponent("PortalConfiguration"); return null; }
public JetspeedPrincipalManagerProvider getPrincipalManagerProvider() { if(jpmp==null) { jpmp= Jetspeed.getComponentManager().lookupComponent("org.apache.jetspeed.security.spi.JetspeedPrincipalManagerProvider"); } return jpmp; }
public Pipeline getPipelineById(String pipelineId) { ComponentManager componentManager = Jetspeed.getComponentManager(); if (componentManager == null) { return null; } return componentManager.lookupComponent(pipelineId); }
/** * Get infused or registered page manager instance managing this base element. * * @return page manager instance */ public PageManager getPageManager() { if (pageManager == null) { pageManager = Jetspeed.getComponentManager().lookupComponent("org.apache.jetspeed.page.PageManager"); } return pageManager; }
private InputStream getFile(String appName, String fileName) { ServletContext portalAppContext = ((ServletConfig) Jetspeed.getComponentManager().getComponent("ServletConfig")).getServletContext(); ServletContext portletAppContext = portalAppContext.getContext(appName); InputStream stream = null; if (portletAppContext != null) { stream = portletAppContext.getResourceAsStream(fileName); } else { stream = portalAppContext.getResourceAsStream(fileName); } return stream; }
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { HttpSession session = request.getSession(true); String destination = (String) session .getAttribute(LoginConstants.DESTINATION); if (destination == null || destination.equals(request.getContextPath())) destination = request.getContextPath() + "/"; else session.removeAttribute(LoginConstants.DESTINATION); String username = (String)session.getAttribute(LoginConstants.USERNAME); session.removeAttribute(LoginConstants.USERNAME); session.removeAttribute(LoginConstants.PASSWORD); session.removeAttribute(LoginConstants.RETRYCOUNT); session.removeAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE); ComponentManager cm = Jetspeed.getComponentManager(); UserContentCacheManager userContentCacheManager = cm.lookupComponent("userContentCacheManager"); userContentCacheManager.evictUserContentCache(username, session.getId()); AuditActivity audit = cm.lookupComponent("org.apache.jetspeed.audit.AuditActivity"); if (audit != null) { audit.logUserActivity(username, request.getRemoteAddr(), AuditActivity.AUTHENTICATION_SUCCESS, "Active Authentication"); } response.sendRedirect(response.encodeURL(destination)); }
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { HttpSession session = request.getSession(); String destination = (String) session .getAttribute(LoginConstants.DESTINATION); if (destination == null) destination = request.getContextPath() + "/"; else session.removeAttribute(LoginConstants.DESTINATION); Integer retryCount = (Integer) session .getAttribute(LoginConstants.RETRYCOUNT); if (retryCount == null) retryCount = new Integer(1); else retryCount = new Integer(retryCount.intValue() + 1); session.setAttribute(LoginConstants.RETRYCOUNT, retryCount); String username = (String)session.getAttribute(LoginConstants.USERNAME); AuditActivity audit = Jetspeed.getComponentManager().lookupComponent("org.apache.jetspeed.audit.AuditActivity"); if (audit != null) { audit.logUserActivity(username, request.getRemoteAddr(), AuditActivity.AUTHENTICATION_FAILURE, "Active Authentication"); } response.sendRedirect(response.encodeURL(destination)); }
private PortletInstance getPortletInstance(String portletUniqueName) throws PortletException { PortletRegistry registry = Jetspeed.getComponentManager().lookupComponent("portletRegistry"); PortletFactory portletFactory = Jetspeed.getComponentManager().lookupComponent("portletFactory"); ServletContext portalAppContext = ((ServletConfig) Jetspeed.getComponentManager().lookupComponent("ServletConfig")).getServletContext(); PortletDefinition portletDef = registry.getPortletDefinitionByUniqueName(portletUniqueName, true); PortletApplication portletApp = portletDef.getApplication(); ServletContext portletAppContext = portalAppContext.getContext(portletApp.getContextPath()); return portletFactory.getPortletInstance(portletAppContext, portletDef, false); }
public void init() { try { configuration = Jetspeed.getComponentManager().lookupComponent("PortalConfiguration"); } catch (Exception e) { configuration = null; // not set in some unit tests } if (configuration != null) { enableSessionCache = configuration.getBoolean(PortalConfigurationConstants.ENABLED_PREFERENCES_SESSION_CACHE); } else { enableSessionCache = false; } }
try prf = Jetspeed.getComponentManager().lookupComponent(PortalRequestFactory.class);
contextComponent = Jetspeed.getComponentManager().lookupComponent(RequestContextComponent.class); context = contextComponent.create(request, response, getServletConfig()); engine.service(context);
engine.start(); console.info("JetspeedServlet has successfuly started the Jetspeed Portal Engine...."); contextComponent = Jetspeed.getComponentManager().lookupComponent(RequestContextComponent.class);
ComponentManager cm = Jetspeed.getComponentManager(); UserManager userManager = cm.lookupComponent("org.apache.jetspeed.security.UserManager"); HttpSession session = request.getSession(true);
ComponentManager cm = Jetspeed.getComponentManager(); int count =0; while(cm == null) { cm = Jetspeed.getComponentManager(); if( count > 5 ) { if (null == cm)
if ( userName != null && !userName.equals("")) UserManager um = Jetspeed.getComponentManager().lookupComponent(UserManager.class); if ( um != null )
ComponentManager cm = Jetspeed.getComponentManager(); portalUserManager = cm.lookupComponent("org.apache.jetspeed.security.UserManager"); portalAdministration = cm.lookupComponent("PortalAdministration");