class TilesContextPropertyAccessorDelegateFactory implements
        PropertyAccessorDelegateFactory<Request> {

    public PropertyAccessor getPropertyAccessor(String propertyName,
            Request request) {
        PropertyAccessor retValue;
        if (propertyName.endsWith("Scope")) {
            String scopeName = propertyName.substring(0, propertyName.length()
                    - ScopePropertyAccessor.SCOPE_SUFFIX_LENGTH);
            if (request.getContext(scopeName) != null) {
                return scopePropertyAccessor;
            }
        }
        if (beanInfo.getMappedDescriptors(Request.class)
                .containsKey(propertyName)) {
            retValue = objectPropertyAccessor;
        } else if (beanInfo.getMappedDescriptors(ApplicationContext.class)
                .containsKey(propertyName)) {
            retValue = applicationContextPropertyAccessor;
        } else {
            return anyScopePropertyAccessor;
        }
        return retValue;
    }

    public  TilesContextPropertyAccessorDelegateFactory(
            PropertyAccessor objectPropertyAccessor,
            PropertyAccessor applicationContextPropertyAccessor,
            PropertyAccessor anyScopePropertyAccessor,
            PropertyAccessor scopePropertyAccessor);

}