1 19 20 package org.netbeans.modules.web.api.webmodule; 21 22 import java.util.Iterator ; 23 import org.openide.filesystems.FileObject; 24 import org.openide.util.Lookup; 25 import org.netbeans.modules.web.spi.webmodule.RequestParametersProvider; 26 27 35 public final class RequestParametersQuery { 36 37 private static final Lookup.Result implementations = 38 Lookup.getDefault().lookup(new Lookup.Template(RequestParametersProvider.class)); 39 40 43 public static String getFileAndParameters(FileObject f) { 44 if (f == null) { 45 throw new NullPointerException ("Passed null to RequestParametersQuery.getRequestParameters(FileObject)"); } 47 Iterator it = implementations.allInstances().iterator(); 48 while (it.hasNext()) { 49 RequestParametersProvider impl = (RequestParametersProvider)it.next(); 50 String params = impl.getFileAndParameters(f); 51 if (params != null) { 52 return params; 53 } 54 } 55 return null; 56 } 57 } 58 | Popular Tags |