org.apache.isis.viewer.restfulobjects.applib
Class RepresentationWalker

java.lang.Object
  extended by org.apache.isis.viewer.restfulobjects.applib.RepresentationWalker

public class RepresentationWalker
extends Object


Constructor Summary
RepresentationWalker(RestfulClient restfulClient, javax.ws.rs.core.Response response)
           
 
Method Summary
 JsonRepresentation getEntity()
          The entity returned from the previous walk.
 String getError()
          The error (if any) that occurred from the previous walk.
 Exception getException()
          The exception (if any) that occurred from the previous walk.
 RestfulResponse<?> getResponse()
          The response returned from the previous walk.
 void walk(String path)
           
 void walk(String path, JsonRepresentation invokeBody)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepresentationWalker

public RepresentationWalker(RestfulClient restfulClient,
                            javax.ws.rs.core.Response response)
Method Detail

walk

public void walk(String path)

walk

public void walk(String path,
                 JsonRepresentation invokeBody)

getEntity

public JsonRepresentation getEntity()
                             throws org.codehaus.jackson.JsonParseException,
                                    org.codehaus.jackson.map.JsonMappingException,
                                    IOException
The entity returned from the previous walk.

Will return null if the previous walk returned an error.

Throws:
org.codehaus.jackson.JsonParseException
org.codehaus.jackson.map.JsonMappingException
IOException

getResponse

public RestfulResponse<?> getResponse()
The response returned from the previous walk.

Once a walk/performed has been attempted, is guaranteed to return a non-null value. (Conversely, will return null immediately after instantiation and prior to a walk being attempted/performed).


getError

public String getError()
The error (if any) that occurred from the previous walk.


getException

public Exception getException()
The exception (if any) that occurred from the previous walk.

Will only ever be populated if getError() is non-null.



Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.