* @throws ExprValidationPropertyException if no such property exists
*/
protected static Pair<PropertyResolutionDescriptor, String> getTypeFromStream(StreamTypeService streamTypeService, String unresolvedPropertyName, String streamOrPropertyName, boolean obtainFragment)
throws ExprValidationPropertyException
{
PropertyResolutionDescriptor propertyInfo;
// no stream/property name supplied
if (streamOrPropertyName == null)
{
try
{
propertyInfo = streamTypeService.resolveByPropertyName(unresolvedPropertyName, obtainFragment);
}
catch (StreamTypesException ex)
{
throw getSuggestionException(ex);
}
catch (PropertyAccessException ex)
{
throw new ExprValidationPropertyException("Failed to find property '" + unresolvedPropertyName + "', the property name does not parse (are you sure?): " + ex.getMessage(), ex);
}
// resolves without a stream name, return descriptor and null stream name
return new Pair<PropertyResolutionDescriptor, String>(propertyInfo, propertyInfo.getStreamName());
}
// try to resolve the property name and stream name as it is (ie. stream name as a stream name)
StreamTypesException typeExceptionOne;
try