Class Resolver
java.lang.Object
com.google.web.bindery.requestfactory.server.Resolver
Responsible for converting between domain and client entities. This class has
a small amount of temporary state used to handle graph cycles and assignment
of synthetic ids.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static intReturns the trailing[n]index value from a path.(package private) static booleanmatchesPropertyRef(Set<String> propertyRefs, String newPrefix) Returnstrueif the given prefix is one of the requested property references.resolveClientValue(Object domainValue, Type assignableTo, Set<String> propertyRefs) Given a domain object, return a value that can be encoded by the client.resolveDomainValue(Object maybeEntityProxy, boolean detectDeadEntities) Convert a client-side value into a domain value.(package private) static StringRemoves the trailing[n]from a path.
-
Constructor Details
-
Resolver
Resolver(RequestState state) Should only be called fromRequestState.
-
-
Method Details
-
index
Returns the trailing[n]index value from a path. -
matchesPropertyRef
Returnstrueif the given prefix is one of the requested property references. -
snipIndex
Removes the trailing[n]from a path. -
resolveClientValue
Given a domain object, return a value that can be encoded by the client.- Parameters:
domainValue- the domain object to be converted into a client-side valueassignableTo- the type in the client to which the resolved value should be assignable. A value ofnullindicates that any resolution will suffice.propertyRefs- the property references requested by the client
-
resolveDomainValue
Convert a client-side value into a domain value.- Parameters:
maybeEntityProxy- the client object to resolvedetectDeadEntities- iftruethis method will throw a ReportableException containing aDeadEntityExceptionif an EntityProxy cannot be resolved
-