/** * Determine if the service has a dependency on the provided type and contains any of the provided * properties. This can be used in determining if a property is stale. * * @param type the config type * @param keyNames the names of all the config keys for the given type * @return <code>true</code> if the config is stale */ public boolean hasDependencyAndPropertyFor(String type, Collection<String> keyNames) { if (!hasConfigDependency(type)) return false; buildConfigLayout(); Set<String> keys = configLayout.get(type); for (String staleCheck : keyNames) { if (keys != null && keys.contains(staleCheck)) return true; } return false; }