Package com.liferay.faces.bridge.config

Examples of com.liferay.faces.bridge.config.BridgeConfig


  // Private Data Members
  private BridgeContext bridgeContext;

  public BridgeURLTest() {
    BridgeConfig bridgeConfig = new BridgeConfigMockImpl();
    PortletRequest portletRequest = new PortletRequestMockImpl(CONTEXT_PATH);
    this.bridgeContext = new BridgeContextMockImpl(bridgeConfig, portletRequest, CURRENT_FACES_VIEW_ID);
  }
View Full Code Here


    if (wrappedRequestPath != null) {

      if (wrappedRequestPath.contains(ResourceHandler.RESOURCE_IDENTIFIER)) {

        BridgeContext bridgeContext = BridgeContext.getCurrentInstance();
        BridgeConfig bridgeConfig = bridgeContext.getBridgeConfig();

        List<ConfiguredServletMapping> configuredFacesServletMappings =
          bridgeConfig.getConfiguredFacesServletMappings();

        if (configuredFacesServletMappings != null) {

          for (ConfiguredServletMapping configuredServletMapping : configuredFacesServletMappings) {
View Full Code Here

    BridgeWriteBehindResponse bridgeWriteBehindResponse = null;

    if ((bridgeWriteBehindRenderResponseClass == null) || (bridgeWriteBehindResourceResponseClass == null)) {

      BridgeContext bridgeContext = BridgeContext.getCurrentInstance();
      BridgeConfig bridgeConfig = bridgeContext.getBridgeConfig();

      if (bridgeWriteBehindRenderResponseClass == null) {
        String className = bridgeConfig.getWriteBehindRenderResponseWrapper();
        bridgeWriteBehindRenderResponseClass = loadClass(className, BridgeWriteBehindResponseRenderImpl.class);
      }

      if (bridgeWriteBehindResourceResponseClass == null) {
        String className = bridgeConfig.getWriteBehindResourceResponseWrapper();
        bridgeWriteBehindResourceResponseClass = loadClass(className,
            BridgeWriteBehindResponseResourceImpl.class);
      }
    }
View Full Code Here

        synchronized (subscribeToEventsAtRuntime) {

          // Need to check again within the synchronization block, just in case.
          if (subscribeToEventsAtRuntime) {
            BridgeContext bridgeContext = BridgeContext.getCurrentInstance();
            BridgeConfig bridgeConfig = bridgeContext.getBridgeConfig();
            List<ConfiguredSystemEventListener> configuredSystemEventListeners =
              bridgeConfig.getConfiguredSystemEventListeners();

            if (configuredSystemEventListeners != null) {

              for (ConfiguredSystemEventListener configuredSystemEventListener :
                configuredSystemEventListeners) {
View Full Code Here

        // Section 5.3.2 requires the phase listener to inject the public render parameters into the
        // Model concern of the MVC design pattern (as in JSF model managed-beans) after RESTORE_VIEW
        // phase completes. This is accomplished below by evaluating the EL expressions found in the
        // <model-el>...</model-el> section of the WEB-INF/faces-config.xml file.
        BridgeConfig bridgeConfig = bridgeContext.getBridgeConfig();
        Map<String, String[]> publicParameterMappings = bridgeConfig.getPublicParameterMappings();

        if (publicParameterMappings != null) {

          boolean invokeHandler = false;
          String portletName = bridgeContext.getPortletConfig().getPortletName();
View Full Code Here

        // Section 5.3.3 requires the phase listener to re-examine the public render parameters. For each one
        // that has been changed in the model, its new value must be set in the response, so that when the
        // RENDER_PHASE of the Portlet 2.0 lifecycle executes, this phase listener will be able to inject the
        // new value into the model of other portlets that are participating in the IPC.
        BridgeConfig bridgeConfig = bridgeContext.getBridgeConfig();
        Map<String, String[]> publicParameterMappings = bridgeConfig.getPublicParameterMappings();

        if (publicParameterMappings != null) {

          String portletName = bridgeContext.getPortletConfig().getPortletName();
          Map<String, String[]> publicParameterMap = bridgeContext.getPortletRequest()
View Full Code Here

      // If the attribute being added is not excluded, then invoke all methods on the attribute value (class
      // instance) that are annotated with the BridgeRequestScopeAttributeAdded annotation.
      String attributeName = servletRequestAttributeEvent.getName();
      BridgeContext bridgeContext = BridgeContext.getCurrentInstance();
      BridgeConfig bridgeConfig = bridgeContext.getBridgeConfig();
      Set<String> excludedRequestScopeAttributes = bridgeConfig.getExcludedRequestAttributes();

      if (!excludedRequestScopeAttributes.contains(attributeName)) {

        Object attributeValue = servletRequestAttributeEvent.getValue();
        logger.trace("Attribute added name=[{0}] value=[{1}]", attributeName, attributeValue);
View Full Code Here

        if ((portletPhase == Bridge.PortletPhase.RENDER_PHASE) ||
            (portletPhase == Bridge.PortletPhase.RESOURCE_PHASE)) {
          PortletURL portletRenderURL = bridgeContext.getPortletContainer().createRenderURL(baseUrl);
          BridgeContext bridgeContext = BridgeContext.getCurrentInstance();
          BridgeConfig bridgeConfig = bridgeContext.getBridgeConfig();
          portletRenderURL.setParameter(bridgeConfig.getViewIdRenderParameterName(), viewId);

          if (parameters != null) {

            for (Map.Entry<String, List<String>> parameter : parameters.entrySet()) {
              String name = parameter.getKey();
View Full Code Here

    this.idPrefix = portletName + ":::" + sessionId + ":::";
    this.idSuffix = Long.toString(this.dateCreated);

    BridgeConfigFactory bridgeConfigFactory = (BridgeConfigFactory) FactoryExtensionFinder.getFactory(
        BridgeConfigFactory.class);
    BridgeConfig bridgeConfig = bridgeConfigFactory.getBridgeConfig(portletConfig);
    this.excludedAttributeNames = new ArrayList<String>();

    // Get the list of excluded BridgeRequestScope attributes from the faces-config.xml descriptors.
    Set<String> facesConfigExcludedAttributeNames = bridgeConfig.getExcludedRequestAttributes();

    // Get the list of excluded BridgeRequestScope attributes from the WEB-INF/portlet.xml descriptor.
    @SuppressWarnings("unchecked")
    List<String> portletContextExcludedAttributeNames = (List<String>) portletContext.getAttribute(
        Bridge.BRIDGE_PACKAGE_PREFIX + portletName + StringPool.PERIOD + Bridge.EXCLUDED_REQUEST_ATTRIBUTES);
View Full Code Here

TOP

Related Classes of com.liferay.faces.bridge.config.BridgeConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.