1 57 58 package org.apache.commons.discovery.resource.names; 59 60 import org.apache.commons.discovery.ResourceNameDiscover; 61 import org.apache.commons.discovery.ResourceNameListener; 62 import org.apache.commons.discovery.log.DiscoveryLogFactory; 63 import org.apache.commons.discovery.tools.ManagedProperties; 64 import org.apache.commons.logging.Log; 65 66 67 73 public class DiscoverNamesInManagedProperties extends ResourceNameDiscoverImpl 74 implements ResourceNameDiscover, ResourceNameListener 75 { 76 private static Log log = DiscoveryLogFactory.newLog(DiscoverNamesInManagedProperties.class); 77 public static void setLog(Log _log) { 78 log = _log; 79 } 80 81 83 public DiscoverNamesInManagedProperties() { 84 super(); 85 } 86 87 90 public boolean find(String resourceName) { 91 if (log.isDebugEnabled()) 92 log.debug("find: resourceName='" + resourceName + "'"); 93 94 return notifyListener(ManagedProperties.getProperty(resourceName)); 95 } 96 97 public boolean found(String resourceName) { 98 return find(resourceName); 99 } 100 } 101 | Popular Tags |