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
-
Method Summary
Modifier and TypeMethodDescription(package private) static int
Returns the trailing[n]
index value from a path.(package private) static boolean
matchesPropertyRef
(Set<String> propertyRefs, String newPrefix) Returnstrue
if 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 String
Removes 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
Returnstrue
if 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 ofnull
indicates 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
- iftrue
this method will throw a ReportableException containing aDeadEntityException
if an EntityProxy cannot be resolved
-