class Resolver
extends java.lang.Object
RequestState.getResolver()| Constructor and Description |
|---|
Resolver(RequestState state)
Should only be called from
RequestState. |
| Modifier and Type | Method and Description |
|---|---|
(package private) static int |
index(java.lang.String path)
Returns the trailing
[n] index value from a path. |
(package private) static boolean |
matchesPropertyRef(java.util.Set<java.lang.String> propertyRefs,
java.lang.String newPrefix)
Returns
true if the given prefix is one of the requested property
references. |
java.lang.Object |
resolveClientValue(java.lang.Object domainValue,
java.lang.reflect.Type assignableTo,
java.util.Set<java.lang.String> propertyRefs)
Given a domain object, return a value that can be encoded by the client.
|
java.lang.Object |
resolveDomainValue(java.lang.Object maybeEntityProxy,
boolean detectDeadEntities)
Convert a client-side value into a domain value.
|
(package private) static java.lang.String |
snipIndex(java.lang.String path)
Removes the trailing
[n] from a path. |
Resolver(RequestState state)
RequestState.static int index(java.lang.String path)
[n] index value from a path.static boolean matchesPropertyRef(java.util.Set<java.lang.String> propertyRefs,
java.lang.String newPrefix)
true if the given prefix is one of the requested property
references.static java.lang.String snipIndex(java.lang.String path)
[n] from a path.public java.lang.Object resolveClientValue(java.lang.Object domainValue,
java.lang.reflect.Type assignableTo,
java.util.Set<java.lang.String> propertyRefs)
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 of null indicates that any
resolution will suffice.propertyRefs - the property references requested by the clientpublic java.lang.Object resolveDomainValue(java.lang.Object maybeEntityProxy,
boolean detectDeadEntities)
maybeEntityProxy - the client object to resolvedetectDeadEntities - if true this method will throw a
ReportableException containing a DeadEntityException if an
EntityProxy cannot be resolved