Package org.exist.xquery.functions.request

Examples of org.exist.xquery.functions.request.RequestModule.resolveVariable()


        }

        Variable var = null;

        try {
            var = myModule.resolveVariable( RequestModule.REQUEST_VAR );
        }
        catch( final XPathException xpe ) {
            return( null );
        }
View Full Code Here


  {
   
    final RequestModule myModule = (RequestModule)context.getModule(RequestModule.NAMESPACE_URI);
   
    // request object is read from global variable $session
    final Variable var = myModule.resolveVariable(RequestModule.REQUEST_VAR);
    if(var == null || var.getValue() == null)
      {throw new XPathException(this, "No request object found in the current XQuery context.");}
    if (var.getValue().getItemType() != Type.JAVA_OBJECT)
      {throw new XPathException(this, "Variable $request is not bound to an Java object.");}
    final JavaObjectValue value = (JavaObjectValue) var.getValue().itemAt(0);
View Full Code Here

    if( createSession && ( var == null || var.getValue() == null ) ) {
      SessionWrapper session  = null;
      final RequestModule reqModule = (RequestModule)context.getModule( RequestModule.NAMESPACE_URI );
   
      // request object is read from global variable $request
      final Variable reqVar = reqModule.resolveVariable( RequestModule.REQUEST_VAR );
     
      if( reqVar == null || reqVar.getValue() == null ) {
          logger.error("No request object found in the current XQuery context.");

          throw( new XPathException( this, "No request object found in the current XQuery context." ) );
View Full Code Here

    JavaObjectValue ret = null;
   
    final RequestModule myModule = (RequestModule)context.getModule( RequestModule.NAMESPACE_URI );
   
    // request object is read from global variable $request
    final Variable var = myModule.resolveVariable( RequestModule.REQUEST_VAR );
   
    if( var == null || var.getValue() == null ) {
      throw( new XPathException( fn, "No request object found in the current XQuery context." ) );
    }
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.