javax.portlet.PortletConfig Java Examples

The following examples show how to use javax.portlet.PortletConfig. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SimplePortletPostProcessor.java    From spring4-understanding with Apache License 2.0 6 votes vote down vote up
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
	if (bean instanceof Portlet) {
		PortletConfig config = this.portletConfig;
		if (config == null || !this.useSharedPortletConfig) {
			config = new DelegatingPortletConfig(beanName, this.portletContext, this.portletConfig);
		}
		try {
			((Portlet) bean).init(config);
		}
		catch (PortletException ex) {
			throw new BeanInitializationException("Portlet.init threw exception", ex);
		}
	}
	return bean;
}
 
Example #2
Source File: PortletArtifactProducer.java    From portals-pluto with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a new producer for this thread and stores it in the thread local.
 * @param req        The portlet request
 * @param resp       The portlet response
 * @param config     The portlet config
 */
public static void setPrecursors(PortletRequest req, PortletResponse resp, PortletConfig config) {
   PortletArtifactProducer pap = getPAP();
   pap.req = req;
   pap.resp = resp;
   pap.config = config;
   
   if (isTrace) {
      StringBuilder txt = new StringBuilder(80);
      txt.append("Set precursors.");
      txt.append(" ThreadId=").append(Thread.currentThread().getId());
      txt.append(", Portlet name: ").append(config == null ? "null" : config.getPortletName());
      LOG.trace(txt.toString());
   }

}
 
Example #3
Source File: AddlEnvironmentTests_SPEC2_10_ContextOptions.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {
   this.portletConfig = config;

   List<String> supportedContainerRuntimeOptions = Collections.list(config.getPortletContext().getContainerRuntimeOptions());
   isActionScopedRequestAttributesSupported = supportedContainerRuntimeOptions.contains("javax.portlet.actionScopedRequestAttributes");
}
 
Example #4
Source File: PortletContextAwareProcessor.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
/**
 * Create a new PortletContextAwareProcessor for the given context and config.
 */
public PortletContextAwareProcessor(PortletContext portletContext, PortletConfig portletConfig) {
	this.portletContext = portletContext;
	this.portletConfig = portletConfig;
	if (portletContext == null && portletConfig != null) {
		this.portletContext = portletConfig.getPortletContext();
	}
}
 
Example #5
Source File: PortletResourceRequestContextImpl.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public HttpSession getSession() {
   HttpSession sess = null;

   PortletConfig portletConfig = getPortletConfig();
   Map<String, String[]> containerRuntimeOptions = portletConfig.getContainerRuntimeOptions();
   String[] values = containerRuntimeOptions.get("javax.portlet.servletDefaultSessionScope");

   if ((values != null) && (values.length > 0) && "PORTLET_SCOPE".equals(values[0])) {
      String portletWindowId = getPortletWindow().getId().getStringId();
      sess = ServletPortletSessionProxy.createProxy(getServletRequest(), portletWindowId);
   }

   return sess;
}
 
Example #6
Source File: AbstractRefreshablePortletApplicationContext.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
@Override
public void setPortletConfig(PortletConfig portletConfig) {
	this.portletConfig = portletConfig;
	if (portletConfig != null && this.portletContext == null) {
		this.portletContext = portletConfig.getPortletContext();
	}
}
 
Example #7
Source File: SakaiIFrame.java    From sakai with Educational Community License v2.0 5 votes vote down vote up
public void init(PortletConfig config) throws PortletException {
	super.init(config);

	pContext = config.getPortletContext();
	try {
		vengine = vHelper.makeEngine(pContext);
	}
	catch(Exception e)
	{
		throw new PortletException("Cannot initialize Velocity ", e);
	}
	log.info("iFrame Portlet vengine={} rb={}", vengine, rb);

}
 
Example #8
Source File: PortletURLTag286.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
protected void handleDefaultEscapeXML() {

      PortletConfig portletConfig = (PortletConfig) pageContext.getRequest().getAttribute(Constants.PORTLET_CONFIG);
      Map<String, String[]> containerRuntimeOptions = portletConfig.getContainerRuntimeOptions();
      if (containerRuntimeOptions != null) {
         String[] result = containerRuntimeOptions.get(Constants.ESCAPE_XML_RUNTIME_OPTION);
         if (result != null) {
            if (result.length > 0) {
               setEscapeXml(result[0]);
            }
         }
      }

	}
 
Example #9
Source File: SigTestsURL_ResourceURL_SIGRender.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {}
 
Example #10
Source File: SigTestsWrapper_ResourceResponseWrapper_SIGRender.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {}
 
Example #11
Source File: PortletTagLibraryTests_SPEC2_26_IncludeJSPEvent.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {}
 
Example #12
Source File: DispatcherReqRespTests5S_SPEC2_19_ForwardJSPResourceResponse.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {
   this.portletConfig = config;
}
 
Example #13
Source File: AddlPortletTests_SPEC2_5_ActionHandling_event.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {}
 
Example #14
Source File: HeaderPortletTests_SPEC15_Header.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {
}
 
Example #15
Source File: SigTestsWrapper_EventRequestWrapper_SIGRender.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {}
 
Example #16
Source File: URLTests_PortletURL_ApiRenderActurl.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {
}
 
Example #17
Source File: DispatcherTests_SPEC2_19_DispatchServletEvent.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {
}
 
Example #18
Source File: DispatcherTests_SPEC2_19_IncludeServletAction.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {
   this.portletConfig = config;
}
 
Example #19
Source File: SigTestsException_PortletSecurityException_SIGRender.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {}
 
Example #20
Source File: AnnotationPortletAppConfigOverrideTests_SPEC1_28_PublicRenderParameters2.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {}
 
Example #21
Source File: AddlPortletTests_SPEC2_15_Event.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {}
 
Example #22
Source File: AddlRequestTests_SPEC2_11_EventReq.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {
}
 
Example #23
Source File: DispatcherTests3S_SPEC2_19_ForwardJSPEvent_event.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {
   this.portletConfig = config;
}
 
Example #24
Source File: SecondWarTestPortletClass.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig arg0) throws PortletException {
   // TODO Auto-generated method stub

}
 
Example #25
Source File: DispatcherReqRespTests5S_SPEC2_19_IncludeJSPActionRequest.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {
   this.portletConfig = config;
}
 
Example #26
Source File: DispatcherReqRespTests2_SPEC2_19_ForwardServletEventRequest_event.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {
   this.portletConfig = config;
}
 
Example #27
Source File: DispatcherTests4_SPEC2_19_IncludeServletAction.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {
   this.portletConfig = config;
}
 
Example #28
Source File: AnnotationPortletConfigTests_SPEC2_28_PortletInitParameters.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {
   this.portletConfig = config;
}
 
Example #29
Source File: DispatcherReqRespTests4_SPEC2_19_IncludeServletActionRequest.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {
   this.portletConfig = config;
}
 
Example #30
Source File: DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceResponse.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public void init(PortletConfig config) throws PortletException {
   this.portletConfig = config;
}