Package org.apache.portals.bridges.php

Examples of org.apache.portals.bridges.php.PHPParameters


       * If the phpParameter is not empty create a PHPParameters object and attach it to the session
       */
      if ( phpParameter != null && phpParameter.length() > 0)
      {
        // Perl Parameter Object
        PHPParameters phpScript = new PHPParameters();
       
        // Separate the values before and after the Query Mark ?
        int ixQuery = phpParameter.indexOf('?');
        if ( ixQuery != -1)
        {
          phpScript.setScriptName(phpParameter.substring(0,ixQuery));
         
          String queryArguments = phpParameter.substring(ixQuery+1);
          System.out.println("ProcessRequest -- Script " + phpParameter.substring(0,ixQuery) + " Query string " + queryArguments);
         
          int ixQuerySeparator = queryArguments.indexOf('&');
          while ( ixQuerySeparator != -1)
          {
            phpScript.addQueryArgument(queryArguments.substring(0, ixQuerySeparator));
            queryArguments = queryArguments.substring(ixQuerySeparator+1);
            ixQuerySeparator = queryArguments.indexOf('&');
          }
         
          phpScript.addQueryArgument(queryArguments);
         
          // Add the PerlParameters to the session
          actionRequest.getPortletSession().setAttribute(PHPParameters.PHP_PARAMETER, phpScript, PortletSession.APPLICATION_SCOPE);
        }
        else
        {
          // No query string just the script name
          phpScript.setScriptName(phpParameter);
         
          // Get all the parameters from the request and add them as query arguments
          Enumeration names = actionRequest.getParameterNames();
          String name, value;
          while (names.hasMoreElements())
          {
            name = (String)names.nextElement();
            // ACTION_PARAMETER_PHP already processed just ignore it
            if (name.compareToIgnoreCase(PHPParameters.ACTION_PARAMETER_PHP) != 0)
            {
              value = actionRequest.getParameter(name);
             
                 phpScript.addQueryArgument(name + "=" + value);
            }
          }
          // Add the PerlParameters to the session
          actionRequest.getPortletSession().setAttribute(PHPParameters.PHP_PARAMETER, phpScript, PortletSession.APPLICATION_SCOPE);
         }
View Full Code Here


       *  Extract the PHPParameter object from the session. If this is not provided use the values for startPage and application from the INIT Parameters
       */
      String  reqQuery;
      String  phpScript;
     
      PHPParameters phpParam = null;
      try
    {
        phpParam = (PHPParameters)request.getPortletSession().getAttribute(PHPParameters.PHP_PARAMETER, PortletSession.APPLICATION_SCOPE);
    }
      catch (Exception e )
    {
        phpParam = null;
    }
     
      if (phpParam != null)
      {
        // We got real parameters
        bUseCachedParameters = false;
        reqQuery = phpParam.getQueryString();
        phpScript = phpParam.getScriptName();
      }
      else
      {
        /*
         * No parameters were send to this page. Either it is the initial invocation (use init param) or
View Full Code Here

       * If the phpParameter is not empty create a PHPParameters object and attach it to the session
       */
      if ( phpParameter != null && phpParameter.length() > 0)
      {
        // Perl Parameter Object
        PHPParameters phpScript = new PHPParameters();
       
        // Separate the values before and after the Query Mark ?
        int ixQuery = phpParameter.indexOf('?');
        if ( ixQuery != -1)
        {
          phpScript.setScriptName(phpParameter.substring(0,ixQuery));
         
          String queryArguments = phpParameter.substring(ixQuery+1);
          System.out.println("ProcessRequest -- Script " + phpParameter.substring(0,ixQuery) + " Query string " + queryArguments);
         
          int ixQuerySeparator = queryArguments.indexOf('&');
          while ( ixQuerySeparator != -1)
          {
            phpScript.addQueryArgument(queryArguments.substring(0, ixQuerySeparator));
            queryArguments = queryArguments.substring(ixQuerySeparator+1);
            ixQuerySeparator = queryArguments.indexOf('&');
          }
         
          phpScript.addQueryArgument(queryArguments);
         
          // Add the PerlParameters to the session
          actionRequest.getPortletSession().setAttribute(PHPParameters.PHP_PARAMETER, phpScript, PortletSession.APPLICATION_SCOPE);
        }
        else
        {
          // No query string just the script name
          phpScript.setScriptName(phpParameter);
         
          // Get all the parameters from the request and add them as query arguments
          Enumeration names = actionRequest.getParameterNames();
          String name, value;
          while (names.hasMoreElements())
          {
            name = (String)names.nextElement();
            // ACTION_PARAMETER_PHP already processed just ignore it
            if (name.compareToIgnoreCase(PHPParameters.ACTION_PARAMETER_PHP) != 0)
            {
              value = actionRequest.getParameter(name);
             
                 phpScript.addQueryArgument(name + "=" + value);
            }
          }
          // Add the PerlParameters to the session
          actionRequest.getPortletSession().setAttribute(PHPParameters.PHP_PARAMETER, phpScript, PortletSession.APPLICATION_SCOPE);
         }
View Full Code Here

       *  Extract the PHPParameter object from the session. If this is not provided use the values for startPage and application from the INIT Parameters
       */
      String  reqQuery;
      String  phpScript;
     
      PHPParameters phpParam = null;
      try
    {
        phpParam = (PHPParameters)request.getPortletSession().getAttribute(PHPParameters.PHP_PARAMETER, PortletSession.APPLICATION_SCOPE);
    }
      catch (Exception e )
    {
        phpParam = null;
    }
     
      if (phpParam != null)
      {
        // We got real parameters
        bUseCachedParameters = false;
        reqQuery = phpParam.getQueryString();
        phpScript = phpParam.getScriptName();
      }
      else
      {
        /*
         * No parameters were send to this page. Either it is the initial invocation (use init param) or
View Full Code Here

       * If the phpParameter is not empty create a PHPParameters object and attach it to the session
       */
      if ( phpParameter != null && phpParameter.length() > 0)
      {
        // Perl Parameter Object
        PHPParameters phpScript = new PHPParameters();
       
        // Separate the values before and after the Query Mark ?
        int ixQuery = phpParameter.indexOf('?');
        if ( ixQuery != -1)
        {
          phpScript.setScriptName(phpParameter.substring(0,ixQuery));
         
          String queryArguments = phpParameter.substring(ixQuery+1);
          System.out.println("ProcessRequest -- Script " + phpParameter.substring(0,ixQuery) + " Query string " + queryArguments);
         
          int ixQuerySeparator = queryArguments.indexOf('&');
          while ( ixQuerySeparator != -1)
          {
            phpScript.addQueryArgument(queryArguments.substring(0, ixQuerySeparator));
            queryArguments = queryArguments.substring(ixQuerySeparator+1);
            ixQuerySeparator = queryArguments.indexOf('&');
          }
         
          phpScript.addQueryArgument(queryArguments);
         
          // Add the PerlParameters to the session
          actionRequest.getPortletSession().setAttribute(PHPParameters.PHP_PARAMETER, phpScript, PortletSession.APPLICATION_SCOPE);
        }
        else
        {
          // No query string just the script name
          phpScript.setScriptName(phpParameter);
         
          // Get all the parameters from the request and add them as query arguments
          Enumeration names = actionRequest.getParameterNames();
          String name, value;
          while (names.hasMoreElements())
          {
            name = (String)names.nextElement();
            // ACTION_PARAMETER_PHP already processed just ignore it
            if (name.compareToIgnoreCase(PHPParameters.ACTION_PARAMETER_PHP) != 0)
            {
              value = actionRequest.getParameter(name);
             
                 phpScript.addQueryArgument(name + "=" + value);
            }
          }
          // Add the PerlParameters to the session
          actionRequest.getPortletSession().setAttribute(PHPParameters.PHP_PARAMETER, phpScript, PortletSession.APPLICATION_SCOPE);
         }
View Full Code Here

       *  Extract the PHPParameter object from the session. If this is not provided use the values for startPage and application from the INIT Parameters
       */
      String  reqQuery;
      String  phpScript;
     
      PHPParameters phpParam = null;
      try
    {
        phpParam = (PHPParameters)request.getPortletSession().getAttribute(PHPParameters.PHP_PARAMETER, PortletSession.APPLICATION_SCOPE);
    }
      catch (Exception e )
    {
        phpParam = null;
    }
     
      if (phpParam != null)
      {
        // We got real parameters
        bUseCachedParameters = false;
        reqQuery = phpParam.getQueryString();
        phpScript = phpParam.getScriptName();
      }
      else
      {
        /*
         * No parameters were send to this page. Either it is the initial invocation (use init param) or
View Full Code Here

       * If the phpParameter is not empty create a PHPParameters object and attach it to the session
       */
      if ( phpParameter != null && phpParameter.length() > 0)
      {
        // Perl Parameter Object
        PHPParameters phpScript = new PHPParameters();
       
        // Separate the values before and after the Query Mark ?
        int ixQuery = phpParameter.indexOf('?');
        if ( ixQuery != -1)
        {
          phpScript.setScriptName(phpParameter.substring(0,ixQuery));
         
          String queryArguments = phpParameter.substring(ixQuery+1);
          System.out.println("ProcessRequest -- Script " + phpParameter.substring(0,ixQuery) + " Query string " + queryArguments);
         
          int ixQuerySeparator = queryArguments.indexOf('&');
          while ( ixQuerySeparator != -1)
          {
            phpScript.addQueryArgument(queryArguments.substring(0, ixQuerySeparator));
            queryArguments = queryArguments.substring(ixQuerySeparator+1);
            ixQuerySeparator = queryArguments.indexOf('&');
          }
         
          phpScript.addQueryArgument(queryArguments);
         
          // Add the PerlParameters to the session
          actionRequest.getPortletSession().setAttribute(PHPParameters.PHP_PARAMETER, phpScript, PortletSession.APPLICATION_SCOPE);
        }
        else
        {
          // No query string just the script name
          phpScript.setScriptName(phpParameter);
         
          // Get all the parameters from the request and add them as query arguments
          Enumeration names = actionRequest.getParameterNames();
          String name, value;
          while (names.hasMoreElements())
          {
            name = (String)names.nextElement();
            // ACTION_PARAMETER_PHP already processed just ignore it
            if (name.compareToIgnoreCase(PHPParameters.ACTION_PARAMETER_PHP) != 0)
            {
              value = actionRequest.getParameter(name);
             
                 phpScript.addQueryArgument(name + "=" + value);
            }
          }
          // Add the PerlParameters to the session
          actionRequest.getPortletSession().setAttribute(PHPParameters.PHP_PARAMETER, phpScript, PortletSession.APPLICATION_SCOPE);
         }
View Full Code Here

       *  Extract the PHPParameter object from the session. If this is not provided use the values for startPage and application from the INIT Parameters
       */
      String  reqQuery;
      String  phpScript;
     
      PHPParameters phpParam = null;
      try
    {
        phpParam = (PHPParameters)request.getPortletSession().getAttribute(PHPParameters.PHP_PARAMETER, PortletSession.APPLICATION_SCOPE);
    }
      catch (Exception e )
    {
        phpParam = null;
    }
     
      if (phpParam != null)
      {
        // We got real parameters
        bUseCachedParameters = false;
        reqQuery = phpParam.getQueryString();
        phpScript = phpParam.getScriptName();
      }
      else
      {
        /*
         * No parameters were send to this page. Either it is the initial invocation (use init param) or
View Full Code Here

       * If the phpParameter is not empty create a PHPParameters object and attach it to the session
       */
      if ( phpParameter != null && phpParameter.length() > 0)
      {
        // Perl Parameter Object
        PHPParameters phpScript = new PHPParameters();
       
        // Separate the values before and after the Query Mark ?
        int ixQuery = phpParameter.indexOf('?');
        if ( ixQuery != -1)
        {
          phpScript.setScriptName(phpParameter.substring(0,ixQuery));
         
          String queryArguments = phpParameter.substring(ixQuery+1);
          System.out.println("ProcessRequest -- Script " + phpParameter.substring(0,ixQuery) + " Query string " + queryArguments);
         
          int ixQuerySeparator = queryArguments.indexOf('&');
          while ( ixQuerySeparator != -1)
          {
            phpScript.addQueryArgument(queryArguments.substring(0, ixQuerySeparator));
            queryArguments = queryArguments.substring(ixQuerySeparator+1);
            ixQuerySeparator = queryArguments.indexOf('&');
          }
         
          phpScript.addQueryArgument(queryArguments);
         
          // Add the PerlParameters to the session
          actionRequest.getPortletSession().setAttribute(PHPParameters.PHP_PARAMETER, phpScript, PortletSession.APPLICATION_SCOPE);
        }
        else
        {
          // No query string just the script name
          phpScript.setScriptName(phpParameter);
         
          // Get all the parameters from the request and add them as query arguments
          Enumeration names = actionRequest.getParameterNames();
          String name, value;
          while (names.hasMoreElements())
          {
            name = (String)names.nextElement();
            // ACTION_PARAMETER_PHP already processed just ignore it
            if (name.compareToIgnoreCase(PHPParameters.ACTION_PARAMETER_PHP) != 0)
            {
              value = actionRequest.getParameter(name);
             
                 phpScript.addQueryArgument(name + "=" + value);
            }
          }
          // Add the PerlParameters to the session
          actionRequest.getPortletSession().setAttribute(PHPParameters.PHP_PARAMETER, phpScript, PortletSession.APPLICATION_SCOPE);
         }
View Full Code Here

       *  Extract the PHPParameter object from the session. If this is not provided use the values for startPage and application from the INIT Parameters
       */
      String  reqQuery;
      String  phpScript;
     
      PHPParameters phpParam = null;
      try
    {
        phpParam = (PHPParameters)request.getPortletSession().getAttribute(PHPParameters.PHP_PARAMETER, PortletSession.APPLICATION_SCOPE);
    }
      catch (Exception e )
    {
        phpParam = null;
    }
     
      if (phpParam != null)
      {
        // We got real parameters
        bUseCachedParameters = false;
        reqQuery = phpParam.getQueryString();
        phpScript = phpParam.getScriptName();
      }
      else
      {
        /*
         * No parameters were send to this page. Either it is the initial invocation (use init param) or
View Full Code Here

TOP

Related Classes of org.apache.portals.bridges.php.PHPParameters

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.