Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkuppe2008-05-30 12:10:36 +0000
committermkuppe2008-05-30 12:10:36 +0000
commit47cdead86b8a5d1b3f28b438318692f4fe039db1 (patch)
treeecad4a334e769fe918a4bffe94cd08ebe1be9fc5 /providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/internal/provider/jslp/NullPatternLocator.java
parent71d9e892bca471a6a4151cf1310a9ed4de11a490 (diff)
downloadorg.eclipse.ecf-47cdead86b8a5d1b3f28b438318692f4fe039db1.tar.gz
org.eclipse.ecf-47cdead86b8a5d1b3f28b438318692f4fe039db1.tar.xz
org.eclipse.ecf-47cdead86b8a5d1b3f28b438318692f4fe039db1.zip
RESOLVED - bug 206444: [Discovery] Providers should be dynamic aware
https://bugs.eclipse.org/bugs/show_bug.cgi?id=206444
Diffstat (limited to 'providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/internal/provider/jslp/NullPatternLocator.java')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/internal/provider/jslp/NullPatternLocator.java93
1 files changed, 93 insertions, 0 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/internal/provider/jslp/NullPatternLocator.java b/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/internal/provider/jslp/NullPatternLocator.java
new file mode 100644
index 000000000..8b70308e6
--- /dev/null
+++ b/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/internal/provider/jslp/NullPatternLocator.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Versant Corp.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.internal.provider.jslp;
+
+import ch.ethz.iks.slp.*;
+import java.util.*;
+import org.eclipse.ecf.core.util.Trace;
+
+public class NullPatternLocator implements LocatorDecorator {
+ private final ServiceLocationEnumeration emptyServiceLocationEnumeration = new ServiceLocationEnumeration() {
+ public Object next() throws ServiceLocationException {
+ throw new ServiceLocationException(ServiceLocationException.INTERNAL_SYSTEM_ERROR, "no elements"); //$NON-NLS-1$
+ }
+
+ public boolean hasMoreElements() {
+ return false;
+ }
+
+ public Object nextElement() {
+ throw new NoSuchElementException();
+ }
+ };
+
+ /* (non-Javadoc)
+ * @see ch.ethz.iks.slp.Locator#findAttributes(ch.ethz.iks.slp.ServiceURL, java.util.List, java.util.List)
+ */
+ public ServiceLocationEnumeration findAttributes(ServiceURL url, List scopes, List attributeIds) {
+ return emptyServiceLocationEnumeration;
+ }
+
+ /* (non-Javadoc)
+ * @see ch.ethz.iks.slp.Locator#findAttributes(ch.ethz.iks.slp.ServiceType, java.util.List, java.util.List)
+ */
+ public ServiceLocationEnumeration findAttributes(ServiceType type, List scopes, List attributeIds) {
+ Trace.trace(Activator.PLUGIN_ID, JSLPDebugOptions.METHODS_TRACING, getClass(), "findAttributes(ch.ethz.iks.slp.ServiceType, java.util.List, java.util.List)", Locator.class + " not present"); //$NON-NLS-1$//$NON-NLS-2$
+ return emptyServiceLocationEnumeration;
+ }
+
+ /* (non-Javadoc)
+ * @see ch.ethz.iks.slp.Locator#findServiceTypes(java.lang.String, java.util.List)
+ */
+ public ServiceLocationEnumeration findServiceTypes(String namingAuthority, List scopes) {
+ Trace.trace(Activator.PLUGIN_ID, JSLPDebugOptions.METHODS_TRACING, getClass(), "findServiceTypes(String, List)", Locator.class + " not present"); //$NON-NLS-1$//$NON-NLS-2$
+ return emptyServiceLocationEnumeration;
+ }
+
+ /* (non-Javadoc)
+ * @see ch.ethz.iks.slp.Locator#findServices(ch.ethz.iks.slp.ServiceType, java.util.List, java.lang.String)
+ */
+ public ServiceLocationEnumeration findServices(ServiceType type, List scopes, String searchFilter) throws IllegalArgumentException {
+ Trace.trace(Activator.PLUGIN_ID, JSLPDebugOptions.METHODS_TRACING, getClass(), "findServies(ServiceType, List, String)", Locator.class + " not present"); //$NON-NLS-1$//$NON-NLS-2$
+ return emptyServiceLocationEnumeration;
+ }
+
+ /* (non-Javadoc)
+ * @see ch.ethz.iks.slp.Locator#getLocale()
+ */
+ public Locale getLocale() {
+ Trace.trace(Activator.PLUGIN_ID, JSLPDebugOptions.METHODS_TRACING, getClass(), "getLocale()", Locator.class + " not present"); //$NON-NLS-1$//$NON-NLS-2$
+ return Locale.getDefault();
+ }
+
+ /* (non-Javadoc)
+ * @see ch.ethz.iks.slp.Locator#setLocale(java.util.Locale)
+ */
+ public void setLocale(Locale locale) {
+ Trace.trace(Activator.PLUGIN_ID, JSLPDebugOptions.METHODS_TRACING, getClass(), "setLocale(Locale)", Locator.class + " not present"); //$NON-NLS-1$//$NON-NLS-2$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ecf.internal.provider.jslp.LocatorDecorator#getServiceURLs(ch.ethz.iks.slp.ServiceType, java.util.List)
+ */
+ public Map getServiceURLs(ServiceType serviceType, List scopes) {
+ Trace.trace(Activator.PLUGIN_ID, JSLPDebugOptions.METHODS_TRACING, getClass(), "getServiceURLs(ServiceType, List scopes", Locator.class + " not present"); //$NON-NLS-1$//$NON-NLS-2$
+ return new HashMap();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ecf.internal.provider.jslp.LocatorDecorator#getServiceURLs()
+ */
+ public Map getServiceURLs() {
+ Trace.trace(Activator.PLUGIN_ID, JSLPDebugOptions.METHODS_TRACING, getClass(), "getServiceURLs()", Locator.class + " not present"); //$NON-NLS-1$//$NON-NLS-2$
+ return new HashMap();
+ }
+}

Back to the top