// Default to a UNKNOWN relationship
DeviceAncestorRelationship deviceRelationship =
DeviceAncestorRelationship.UNKNOWN;
// retrieve the DevicePolicyValueAccessor
DevicePolicyValueAccessor policyAccessor =
(DevicePolicyValueAccessor) expressionContext.getProperty(
DevicePolicyValueAccessor.class);
if (policyAccessor != null) {
Value deviceValue = values[0];
String deviceName = deviceValue.stringValue().asJavaString();
deviceRelationship = policyAccessor.getRelationshipTo(deviceName);
}
// allow sublcasses to process the relationship
return createFunctionReturnValue(expressionContext.getFactory(),
deviceRelationship);