@Test public void getValueForBaseNotNull() { Object value = resolver.getValue(elContext, new Object(), "myServiceTask"); assertThat(value, is(nullValue())); verifyZeroInteractions(elContext); }
@Override public Object getValue(ELContext context, Object base, Object property) { Object returnValue = null; if (base == null) { String key = (String) property; try { String ldapFilter = "(" + LDAP_FILTER_KEY + "=" + key + ")"; returnValue = checkRegisteredServicesByLdapFilter(ldapFilter); if (returnValue == null) { returnValue = checkRegisteredOsgiServices(JavaDelegate.class, key); } if (returnValue == null) { returnValue = checkRegisteredOsgiServices(ActivityBehavior.class, key); } if (returnValue == null) { returnValue = checkRegisteredOsgiServices(TaskListener.class, key); } } catch (InvalidSyntaxException e) { throw new RuntimeException(e); } } else { try { boolean readable = PropertyUtils.isReadable(base, property.toString()); if (readable) { returnValue = PropertyUtils.getProperty(base, property.toString()); } } catch (Exception e) { throw new RuntimeException(e); } } if (returnValue != null) { context.setPropertyResolved(true); } return returnValue; }
OSGiELResolver extends BeanELResolver { @Override public Object getValue(ELContext context, Object base, Object property) { Object returnValue = null; if (base == null) { String key = (String) property; try { String ldapFilter = "(" + LDAP_FILTER_KEY + "=" + key + ")"; returnValue = checkRegisteredServicesByLdapFilter(ldapFilter); if (returnValue == null) { returnValue = checkRegisteredOsgiServices(JavaDelegate.class, key); } if (returnValue == null) { returnValue = checkRegisteredOsgiServices(ActivityBehavior.class, key); } if (returnValue == null) { returnValue = checkRegisteredOsgiServices(TaskListener.class, key); } } catch (InvalidSyntaxException e) { throw new RuntimeException(e); } } else { try { boolean readable = PropertyUtils.isReadable(base, property.toString()); if (readable) { returnValue = PropertyUtils.getProperty(base, property.toString()); } } catch (Exception e) { throw new RuntimeException(e); } } if (returnValue != null) { context.setPropertyResolved(true); } return returnValue; } }
OSGiELResolver extends BeanELResolver { @Override public Object getValue(ELContext context, Object base, Object property) { Object returnValue = null; if (base == null) { String key = (String) property; try { String ldapFilter = "(" + LDAP_FILTER_KEY + "=" + key + ")"; returnValue = checkRegisteredServicesByLdapFilter(ldapFilter); if (returnValue == null) { returnValue = checkRegisteredOsgiServices(JavaDelegate.class, key); } if (returnValue == null) { returnValue = checkRegisteredOsgiServices(ActivityBehavior.class, key); } if (returnValue == null) { returnValue = checkRegisteredOsgiServices(TaskListener.class, key); } } catch (InvalidSyntaxException e) { throw new RuntimeException(e); } } else { try { boolean readable = PropertyUtils.isReadable(base, property.toString()); if (readable) { returnValue = PropertyUtils.getProperty(base, property.toString()); } } catch (Exception e) { throw new RuntimeException(e); } } if (returnValue != null) { context.setPropertyResolved(true); } return returnValue; }  }
OSGiELResolver extends BeanELResolver { @Override public Object getValue(ELContext context, Object base, Object property) { Object returnValue = null; if (base == null) { String key = (String) property; try { String ldapFilter = "(" + LDAP_FILTER_KEY + "=" + key + ")"; returnValue = checkRegisteredServicesByLdapFilter(ldapFilter); if (returnValue == null) { returnValue = checkRegisteredOsgiServices(JavaDelegate.class, key); } if (returnValue == null) { returnValue = checkRegisteredOsgiServices(ActivityBehavior.class, key); } if (returnValue == null) { returnValue = checkRegisteredOsgiServices(TaskListener.class, key); } } catch (InvalidSyntaxException e) { throw new RuntimeException(e); } } else { try { boolean readable = PropertyUtils.isReadable(base, property.toString()); if (readable) { returnValue = PropertyUtils.getProperty(base, property.toString()); } } catch (Exception e) { throw new RuntimeException(e); } } if (returnValue != null) { context.setPropertyResolved(true); } return returnValue; }  @Override Object getValue(ELContext context, Object base, Object property); @Override boolean isReadOnly(ELContext context, Object base, Object property); }
OSGiELResolver extends BeanELResolver { @Override public Object getValue(ELContext context, Object base, Object property) { Object returnValue = null; if (base == null) { String key = (String) property; try { String ldapFilter = "(" + LDAP_FILTER_KEY + "=" + key + ")"; returnValue = checkRegisteredServicesByLdapFilter(ldapFilter); if (returnValue == null) { returnValue = checkRegisteredOsgiServices(JavaDelegate.class, key); } if (returnValue == null) { returnValue = checkRegisteredOsgiServices(ActivityBehavior.class, key); } if (returnValue == null) { returnValue = checkRegisteredOsgiServices(TaskListener.class, key); } } catch (InvalidSyntaxException e) { throw new RuntimeException(e); } } else { try { boolean readable = PropertyUtils.isReadable(base, property.toString()); if (readable) { returnValue = PropertyUtils.getProperty(base, property.toString()); } } catch (Exception e) { throw new RuntimeException(e); } } if (returnValue != null) { context.setPropertyResolved(true); } return returnValue; }  @Override Object getValue(ELContext context, Object base, Object property); @Override boolean isReadOnly(ELContext context, Object base, Object property);  }