01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2005-2006, GeoTools Project Managment Committee (PMC)
05: * (C) 2005, Refractions Research Inc.
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation;
10: * version 2.1 of the License.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: */
17: package org.geotools.catalog;
18:
19: import java.net.URI;
20: import java.util.List;
21: import java.util.Map;
22:
23: /**
24: * Builds service proxies or clones (with an id).
25: * <p>
26: * Where not specified, sensible defaults will be added to the create options. aka Magic will occur
27: * here :-)
28: * </p>
29: *
30: * @author David Zwiers, Refractions Research
31: * @author Justin Deoliveira, The Open Planning Project
32: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/api/src/main/java/org/geotools/catalog/ServiceFinder.java $
33: */
34: public interface ServiceFinder {
35: /**
36: * This will create a new IService magically. In some cases sensible default parameters may be
37: * added, in addition to parameters removed. An ID will be generated.
38: *
39: * @param params
40: * @return List<Service>
41: */
42: List aquire(Map params); // may look up authentication
43:
44: /**
45: * This method generates a default set of params, and calls aquire(params).
46: *
47: * @param target
48: * @return List<IService>
49: * @see #aquire(params)
50: */
51: List aquire(URI target); // creates a map, may look up authentication
52:
53: /**
54: * This methos is intended to be used when replacing an IService entry in a catalog, or for
55: * cloning. This allows you to retain the URI id, while providing new parameters. This is also
56: * intended for persistence frameworks to use. WARNING: This may have undesired
57: * results/conflicts when added to a ICatalog if care is not taken when using this method.
58: *
59: * @param id
60: * @param params
61: * @return List<IService>
62: */
63: List aquire(URI id, Map params); // may not look up
64: // authentication
65: }
|