Package com.softwarementors.extjs.djn.gson

Examples of com.softwarementors.extjs.djn.gson.JsonDeserializationManager


      Object[] parameters = getIndividualRequestParameters( request);
      String action = request.getAction();
      String method = request.getMethod();
      StandardSuccessResponseData response = new StandardSuccessResponseData( request.getTid(), action, method);

      JsonDeserializationManager mgr = JsonDeserializationManager.getManager();
      try {

        Object result = dispatchStandardMethod(action, method, parameters);
        mgr.friendOnlyAccess_setRoot(result);
        response.setResult(result);
        String json = getGson().toJson(response);
        if( isBatched ) {
          if( logger.isDebugEnabled() ) {
            timer.stop();
            timer.logDebugTimeInMilliseconds( "  - Individual request #" + requestNumber + " response data=>" + json );
            resultReported = true;
          }
        }
        return json;
      }
      finally {
        mgr.friendOnlyAccess_dispose(); // Cleanup in case we are reusing thread
      }
    }
    catch( Exception t ) {       
      StandardErrorResponseData response = createJsonServerErrorResponse(request, t);
      String json = getGson().toJson(response);
View Full Code Here


        out.nullValue();
        return;
      }

      /* PAG: begin */
      JsonDeserializationManager manager = JsonDeserializationManager.getManager();
      manager.friendOnlyAccess_pushParent(value);
      /* PAG: end */
     
      out.beginObject();
      try {
        for (BoundField boundField : this.boundFields.values()) {  

          /* PAG: begin */
          String field = boundField.name;
          if( manager.friendOnlyAccess_isFieldExcluded(value, field)) {
            continue;
          }
          /* PAG: end */

          if (boundField.serialized) {
            /* PAG: begin */
            manager.friendOnlyAccess_pushField(field);
            /* PAG: end */
           
            out.name(boundField.name);
            boundField.write(out, value);
           
            /* PAG: begin */
            manager.friendOnlyAccess_popField();
            /* PAG: end */
          }
        }
      } catch (IllegalAccessException e) {
        throw new AssertionError();
      }
      out.endObject();
      /* PAG: begin */
      manager.friendOnlyAccess_popParent();
      /* PAG: end */
    }
View Full Code Here

    }
  }
  
  @DirectMethod
  public MyThing test_primitiveFieldExclusion(MyThing param) {
    JsonDeserializationManager mgr = JsonDeserializationManager.getManager();
    mgr.excludeFieldPaths("i");
   
    return param;
  }
View Full Code Here

    return param;
  }

  @DirectMethod
  public MyThing test_objectFieldExclusion(MyThing param) {
    JsonDeserializationManager mgr = JsonDeserializationManager.getManager();
    mgr.excludeFieldPaths("t");
   
    return param;
  }
View Full Code Here

    public int[] a;
  }
 
  @DirectMethod
  public WithArray test_arrayFieldExclusion(WithArray param) {
    JsonDeserializationManager mgr = JsonDeserializationManager.getManager();
    mgr.excludeFieldPaths("a");
   
    return param;
  }
View Full Code Here

 
  @DirectMethod
  public Base test_fieldInDerivedClassFieldExclusion() {
    Base result = new Derived("b", 33);
    JsonDeserializationManager mgr = JsonDeserializationManager.getManager();
    mgr.excludeFieldPaths("v2");
   
    return result;
  }
View Full Code Here

    return result;
  }
 
  @DirectMethod
  public MyThing test_nullFieldExclusion(MyThing param) {
    JsonDeserializationManager mgr = JsonDeserializationManager.getManager();
    mgr.excludeFieldPaths("s");
   
    return param;
  }
View Full Code Here

    return param;
  }

  @DirectMethod
  public MyThing test_multipleFieldExclusion(MyThing param) {
    JsonDeserializationManager mgr = JsonDeserializationManager.getManager();
    mgr.excludeFieldPaths("s", "i");
    mgr.excludeFieldPaths("t");
   
    return param;
  }
View Full Code Here

    return param;
  }

  @DirectMethod
  public MyThing test_nestedFieldExclusion(MyThing param) {
    JsonDeserializationManager mgr = JsonDeserializationManager.getManager();
    mgr.excludeFieldPaths("s", "i");
    mgr.excludeFieldPaths("t.s", "t.i");
   
    return param;
  }
View Full Code Here

    return param;
  }

  @DirectMethod
  public MyThing test_allFieldsExclusion(MyThing param) {
    JsonDeserializationManager mgr = JsonDeserializationManager.getManager();
    mgr.excludeFieldPaths("s", "i", "t.s", "t.i", "t.t");
   
    return param;
  }
View Full Code Here

TOP

Related Classes of com.softwarementors.extjs.djn.gson.JsonDeserializationManager

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.