001: /*
002: * <copyright>
003: *
004: * Copyright 2002-2004 BBNT Solutions, LLC
005: * under sponsorship of the Defense Advanced Research Projects
006: * Agency (DARPA).
007: *
008: * You can redistribute this software and/or modify it under the
009: * terms of the Cougaar Open Source License as published on the
010: * Cougaar Open Source Website (www.cougaar.org).
011: *
012: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
013: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
014: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
015: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
016: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
017: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
018: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
019: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
020: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
021: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
022: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
023: *
024: * </copyright>
025: */
026:
027: package org.cougaar.yp;
028:
029: import java.util.Vector;
030:
031: import org.uddi4j.UDDIElement;
032: import org.uddi4j.UDDIException;
033: import org.uddi4j.datatype.assertion.PublisherAssertion;
034: import org.uddi4j.response.CompletionStatus;
035: import org.uddi4j.util.AuthInfo;
036: import org.uddi4j.util.CategoryBag;
037: import org.uddi4j.util.DiscoveryURLs;
038: import org.uddi4j.util.FindQualifiers;
039: import org.uddi4j.util.IdentifierBag;
040: import org.uddi4j.util.KeyedReference;
041: import org.uddi4j.util.TModelBag;
042: import org.w3c.dom.Element;
043:
044: // this could easily be code generated from uddi4j sources. sigh.
045:
046: /** This is the primary mechanism for constructing and executing YP queries.
047: * The interface is essentially a clone of the UDDI4J UDDIProxy API
048: * except that it takes the approach of asynchronous operations rather
049: * than synchronous operations.
050: **/
051:
052: public interface YPProxy {
053: public static final String DEFAULT_UDDI_USERNAME = "cougaar";
054: public static final String DEFAULT_UDDI_PASSWORD = "cougaarPass";
055:
056: public class SearchMode {
057: public static final int NO_COMMUNITY_SEARCH = 0;
058: public static final int HIERARCHICAL_COMMUNITY_SEARCH = 1;
059: public static final int SINGLE_COMMUNITY_SEARCH = 2;
060:
061: /* Change to highest value if more added */
062: public static final int MAX = SINGLE_COMMUNITY_SEARCH;
063:
064: static public boolean validSearchMode(int searchMode) {
065: return (searchMode >= 0) && (searchMode <= SearchMode.MAX);
066: }
067:
068: static public boolean validCommunitySearchMode(int searchMode) {
069: return ((searchMode == HIERARCHICAL_COMMUNITY_SEARCH) || (searchMode == SINGLE_COMMUNITY_SEARCH));
070: }
071: }
072:
073: /**
074: * Describes the search mode used to find YPServers -
075: * NO_SEARCH - YPProxy does not use the community structure to
076: * find the YPServer.
077: * HIERARCHICAL_COMMUNITY_SEARCH - Query progresses
078: * up the community structure of YP servers until either a match is found or
079: * search has reached the topmost community.
080: * SINGLE_COMMUNITY_SEARCH - Query is applied only to the
081: * YP server in the specified YP community context.
082: */
083: public int getSearchMode();
084:
085: /**
086: * The find_binding method returns a bindingDetail message that contains
087: * a bindingTemplates structure with zero or more bindingTemplate structures
088: * matching the criteria specified in the argument list.
089: *
090: * @param findQualifiers
091: * This collection of findQualifier elements can be used to alter the default
092: * behavior of search functionality.
093: * @param serviceKey Used to specify a particular instance of a businessService element
094: * in the registered data. Only bindings in the specific businessService
095: * data identified by the serviceKey passed will be searched.
096: * @param tModelBag This is a list of tModel uuid_key values that represent the technical
097: * fingerprint to locate in a bindingTemplate structure contained within
098: * the businessService instance specified by the serviceKey value. If more
099: * than one tModel key is specified in this structure, only bindingTemplate
100: * information that exactly matches all of the tModel keys specified will
101: * be returned (logical AND). The order of the keys in the tModelBag is
102: * not relevant. All tModelKey values begin with a uuid URN qualifier
103: * (e.g. "uuid:" followed by a known tModel UUID value.
104: * @param maxRows This optional integer value allows the requesting program to limit
105: * the number of results returned.
106: * @return This function returns a YPFuture wrapping a bindingDetail message on success. In the event that no matches were
107: * located for the specified criteria, the bindingDetail structure returned in the response the will be
108: * empty (e.g. contain no bindingTemplate data.)
109: * In the even of a large number of matches, an Operator Site may truncate the result set. If
110: * this occurs, the response message will contain the truncated attribute with the value of this attribute
111: * set to true.
112: * Searching using tModelBag will also return any bindingTemplate information that matches due to
113: * hostingRedirector references. The resolved bindingTemplate structure will be returned, even if that
114: * bindingTemplate is owned by a different businessService structure.
115: * @note The returned YPFuture will contain a BindingDetail when completed.
116: */
117: YPFuture find_binding(FindQualifiers findQualifiers,
118: String serviceKey, TModelBag tModelBag, int maxRows);
119:
120: /**
121: * The find_business message returns a businessList message that matches
122: * the conditions specified in the arguments.
123: *
124: * @param names vector of Name objects .
125: * @param discoveryURLs
126: * This is a list of URL's to be matched against the data associated
127: * with the discoveryURL's contents of registered businessEntity information.
128: * To search for URL without regard to useType attribute values, pass
129: * the useType component of the discoveryURL elements as empty attributes.
130: * If useType values are included, then the match will be made only on
131: * registered information that match both the useType and URL value.
132: * The returned businessList contains businessInfo structures matching
133: * any of the URL's passed (logical OR).
134: * @param identifierBag
135: * This is a list of business identifier references. The returned businessList
136: * contains businessInfo structures matching any of the identifiers passed
137: * (logical OR).
138: * @param categoryBag
139: * This is a list of category references. The returned businessList
140: * contains businessInfo structures matching all of the categories
141: * passed (logical AND).
142: * @param tModelBag The registered businessEntity data contains bindingTemplates that in turn
143: * contain specific tModel references. The tModelBag argument lets you
144: * search for businesses that have bindings that are compatible with a
145: * specific tModel pattern. The returned businessList contains businessInfo
146: * structures that match all of the tModel keys passed (logical AND).
147: * tModelKey values must be formatted as URN qualified UUID values
148: * (e.g. prefixed with "uuid:")
149: * @param findQualifiers
150: * can be used to alter the default behavior of search functionality.
151: * @param maxRows allows the requesting program to limit the number of results returned.
152: * @return This function returns a YPFuture wrapping a businessList on success. In the event that no
153: * matches were located for the specified criteria, a businessList
154: * structure with zero businessInfo structures is returned.
155: * @note The returned YPFuture will contain a BusinessList when completed.
156: */
157: YPFuture find_business(Vector names, DiscoveryURLs discoveryURLs,
158: IdentifierBag identifierBag, CategoryBag categoryBag,
159: TModelBag tModelBag, FindQualifiers findQualifiers,
160: int maxRows);
161:
162: /**
163: * The find_relatedBusinesses API call is used to locate information about businessEntity
164: * registrations that are related to a specific business entity whose key is passed in the
165: * inquiry. The Related Businesses feature is used to manage registration of business units and
166: * subsequently relate them based on organizational hierarchies or business partner relationships.
167: *
168: * This returns zero or more relatedBusinessInfo structures .For the businessEntity specified in the
169: * the response reports complete business relationships with other businessEntity
170: * registrations. Business relationships are complete between two businessEntity registrations when the
171: * publishers controlling each of the businessEntity structures involved in the relationship set
172: * assertions affirming that relationship.
173: *
174: * @param businessKey This is used to specify a particular BusinessEntity instance.
175: *
176: * @param keyedReference This is a single, optional keyedReference element that is used to
177: * specify that only businesses that are related to the focal point
178: * in a specific way should be included in the results.
179: * @param findQualifiers
180: * Can be used to alter the default behavior of search functionality.
181: * @param maxRows allows the requesting program to limit the number of results returned.
182: * @return This function returns a YPFuture wrapping a RelatedBusinessesList on success.
183: * @note The returned YPFuture will contain a RelatedBusinessesList when completed.
184: */
185: YPFuture find_relatedBusinesses(String businessKey,
186: KeyedReference keyedReference,
187: FindQualifiers findQualifiers, int maxRows);
188:
189: /**
190: * This function returns a YPFuture wrapping a serviceList on success. In the event that no
191: * matches were located for the specified criteria, the serviceList
192: * structure returned will contain an empty businessServices structure.
193: *
194: * @param businessKey
195: * This optional uuid_key is used to specify a particular
196: * BusinessEntity instance. This argument may be used to
197: * specify an existing businessEntity in the registry or
198: * may be specified as null or "" (empty string) to indicate
199: * that all businessEntities are to be searched.
200: * @param names This optional Vector of Name objects represents one or more partial names qualified
201: * with xml:lang attributes. Any businessService data contained in the specified
202: * businessEntity with a matching partial name value gets returned. A wildcard character %
203: * may be used to signify any number of any characters. Up to 5 name values may be
204: * specified. If multiple name values are passed, the match occurs on a logical OR basis
205: * within any names supplied (e.g. any match on name/language pairs will cause a
206: * registered service to be included in the final result set).
207: * @param categoryBag
208: * : This is a list of category references. The returned serviceList contains
209: * businessInfo structures matching all of the categories passed (logical AND by
210: * default).
211: * @param tModelBag
212: * This is a list of tModel uuid_key values that represent the technical fingerprint of
213: * a bindingTemplate structure to find. Version 2.0 defines a way to associate
214: * businessService structures with more than one businessEntity. All bindingTemplate
215: * structures within any businessService associated with the businessEntity specified by
216: * the businessKey argument will be searched. If more than one tModel key is specified
217: * in this structure, only businessService structures that contain bindingTemplate
218: * structures with fingerprint information that matches all of the tModel keys specified
219: * will be returned (logical AND only).
220: * @param findQualifiers
221: * used to alter the default behavior of search functionality.
222: * @param maxRows allows the requesting program to limit the number of results returned.
223: * @return This function returns a YPFuture wrapping a serviceList on success. In the event that no
224: * matches were located for the specified criteria, the serviceList
225: * structure returned will contain an empty businessServices structure.
226: * @note The returned YPFuture will contain a ServiceList when completed.
227: */
228: YPFuture find_service(String businessKey, Vector names,
229: CategoryBag categoryBag, TModelBag tModelBag,
230: FindQualifiers findQualifiers, int maxRows);
231:
232: /**
233: * This find_tModel message is for locating a list of tModel entries
234: * that match a set of specific criteria. The response will be a list
235: * of abbreviated information about tModels that match the criteria (tModelList).
236: *
237: * @param name This string value represents a partial name. Since tModel data only has a single name,
238: * only a single name may be passed. A wildcard character % may be used to signify any
239: * number of any characters. The returned tModelList contains tModelInfo elements for
240: * tModels whose name matches the value passed (via lexical-order - i.e., leftmost in
241: * left-to-right languages - partial match or wild card treatment).
242: *
243: * @param categoryBag
244: * This is a list of category references. The returned tModelList contains tModelInfo
245: * elements matching all of the categories passed (logical AND by default). FindQualifier
246: * can be used to alter this logical AND behavior.
247: * @param identifierBag
248: * This is a list of business identifier references. The returned tModelList
249: * contains tModelInfo structures matching any of the identifiers
250: * passed (logical OR).
251: * @param findQualifiers
252: * used to alter the default behavior of search functionality.
253: * @param maxRows allows the requesting program to limit the number of results returned.
254: * @return This function returns a YPFuture wrapping a tModelList on success. In the event that no
255: * matches were located for the specified criteria, an empty tModelList
256: * object will be returned (e.g. will contain zero tModelInfo objects).
257: * This signifies zero matches.
258: * @note The returned YPFuture will contain a TModelList when completed.
259: */
260: YPFuture find_tModel(String name, CategoryBag categoryBag,
261: IdentifierBag identifierBag, FindQualifiers findQualifiers,
262: int maxRows);
263:
264: /**
265: * The get_bindingDetail message is for requesting the run-time
266: * bindingTemplate information location information for the purpose of
267: * invoking a registered business API.
268: *
269: * @param bindingKey uuid_key string that represent specific instance
270: * of known bindingTemplate data.
271: * @return This function returns a YPFuture wrapping a bindingDetail message on successful match
272: * @note The returned YPFuture will contain a BindingDetail when completed.
273: */
274: YPFuture get_bindingDetail(String bindingKey);
275:
276: /**
277: * The get_bindingDetail message is for requesting the run-time
278: * bindingTemplate information location information for the purpose of
279: * invoking a registered business API.
280: *
281: * @param bindingKeyStrings Vector of uuid_key strings that represent specific instances
282: * of known bindingTemplate data.
283: * @return This function returns a YPFuture wrapping a bindingDetail message on successful match of one
284: * or more bindingKey values. If multiple bindingKey values were passed, the
285: * results will be returned in the same order as the keys passed.
286: * @note The returned YPFuture will contain a BindingDetail when completed.
287: */
288: YPFuture get_bindingDetail(Vector bindingKeyStrings);
289:
290: /**
291: * The get_businessDetail message returns complete businessEntity information
292: * for one or more specified businessEntitys
293: *
294: * @param businessKey
295: * A uuid_key string that represents a specific instance of known
296: * businessEntity data.
297: * @return This function returns a YPFuture wrapping a businessDetail object on successful match
298: * of one or more businessKey values. If multiple businessKey values
299: * were passed, the results will be returned in the same order as the
300: * keys passed.
301: * @note The returned YPFuture will contain a BusinessDetail when completed.
302: */
303: YPFuture get_businessDetail(String businessKey);
304:
305: /**
306: * The get_businessDetail message returns complete businessEntity information
307: * for one or more specified businessEntitys
308: *
309: * @param businessKeyStrings
310: * Vector of uuid_key strings that represent specific instances of known
311: * businessEntity data.
312: * @return This function returns a YPFuture wrapping a businessDetail message on successful match
313: * of one or more businessKey values. If multiple businessKey values
314: * were passed, the results will be returned in the same order as the
315: * keys passed.
316: * @note The returned YPFuture will contain a BusinessDetail when completed.
317: */
318: YPFuture get_businessDetail(Vector businessKeyStrings);
319:
320: /**
321: * The get_businessDetailExt message returns extended businessEntity
322: * information for one or more specified businessEntitys. This
323: * message returns exactly the same information as the get_businessDetail
324: * message, but may contain additional attributes if the source is
325: * an external registry (not an Operator Site) that is compatible
326: * with this API specification.
327: *
328: * @param businessKey
329: * A uuid_key string that represents a specific instance of known
330: * businessEntity data.
331: * @return This function returns a YPFuture wrapping a businessDetailExt message on successful match
332: * of one or more businessKey values. If multiple businessKey values
333: * were passed, the results will be returned in the same order as the
334: * keys passed.
335: * @note The returned YPFuture will contain a BusinessDetailExt when completed.
336: */
337: YPFuture get_businessDetailExt(String businessKey);
338:
339: /**
340: * The get_businessDetailExt message returns extended businessEntity
341: * information for one or more specified businessEntitys. This
342: * message returns exactly the same information as the get_businessDetail
343: * message, but may contain additional attributes if the source is
344: * an external registry (not an Operator Site) that is compatible
345: * with this API specification.
346: *
347: * @param businessKeyStrings
348: * Vector of uuid_key strings that represent specific instances of known
349: * businessEntity data.
350: * @return This function returns a YPFuture wrapping a businessDetailExt message on successful match
351: * of one or more businessKey values. If multiple businessKey values
352: * were passed, the results will be returned in the same order as the
353: * keys passed.
354: * @note The returned YPFuture will contain a BusinessDetailExt when completed.
355: */
356: YPFuture get_businessDetailExt(Vector businessKeyStrings);
357:
358: /**
359: * The get_serviceDetail message is used to request full information
360: * about a known businessService structure.
361: *
362: * @param serviceKey A uuid_key string that represents a specific instance of
363: * known businessService data.
364: * @return This function returns a YPFuture wrapping a serviceDetail message on successful match
365: * of one or more serviceKey values. If multiple serviceKey values
366: * were passed, the results will be returned in the same order as the
367: * keys passed.
368: * @note The returned YPFuture will contain a ServiceDetail when completed.
369: */
370: YPFuture get_serviceDetail(String serviceKey);
371:
372: /**
373: * The get_serviceDetail message is used to request full information
374: * about a known businessService structure.
375: *
376: * @param serviceKeyStrings
377: * A vector of uuid_key strings that represent specific instances of
378: * known businessService data.
379: * @return This function returns a YPFuture wrapping a serviceDetail message on successful match
380: * of one or more serviceKey values. If multiple serviceKey values
381: * were passed, the results will be returned in the same order as the
382: * keys passed.
383: * @note The returned YPFuture will contain a ServiceDetail when completed.
384: */
385: YPFuture get_serviceDetail(Vector serviceKeyStrings);
386:
387: /**
388: * The get_tModelDetail message is used to request full information
389: * about a known tModel structure.
390: *
391: * @param tModelKey A URN qualified uuid_key string that represent a specific
392: * instance of known tModel data. All tModelKey values begin with a
393: * uuid URN qualifier (e.g. "uuid:" followed by a known tModel UUID value.)
394: * @return This function returns a YPFuture wrapping a tModelDetail message on successful match
395: * of one or more tModelKey values. If multiple tModelKey values
396: * were passed, the results will be returned in the same order as
397: * the keys passed.
398: * @note The returned YPFuture will contain a TModelDetail when completed.
399: */
400: YPFuture get_tModelDetail(String tModelKey);
401:
402: /**
403: * The get_tModelDetail message is used to request full information
404: * about a known tModel structure.
405: *
406: * @param tModelKeyStrings
407: * A Vector of URN qualified uuid_key strings that represent specific
408: * instances of known tModel data. All tModelKey values begin with a
409: * uuid URN qualifier (e.g. "uuid:" followed by a known tModel UUID value.)
410: * @return This function returns a YPFuture wrapping a tModelDetail message on successful match
411: * of one or more tModelKey values. If multiple tModelKey values
412: * were passed, the results will be returned in the same order as
413: * the keys passed.
414: * @note The returned YPFuture will contain a TModelDetail when completed.
415: */
416: YPFuture get_tModelDetail(Vector tModelKeyStrings);
417:
418: /**
419: * The add_publisherAssertions message is used to add relationship assertions to the
420: * existing set of assertions.
421: *
422: * @param authInfo Contains an authentication token. Authentication tokens are obtained
423: * using the get_authToken method.
424: * @param publisherAssertion Contains a relationship assertion.
425: * @return This function returns a YPFuture wrapping a DispositionReport with a single success indicator.
426: * @note The returned YPFuture will contain a DispositionReport when completed.
427: */
428: YPFuture add_publisherAssertions(String authInfo,
429: PublisherAssertion publisherAssertion);
430:
431: /**
432: * The add_publisherAssertions message is used to add relationship assertions to the
433: * existing set of assertions.
434: *
435: * @param authInfo Contains an authentication token. Authentication tokens are obtained
436: * using the get_authToken method.
437: * @param publisherAssertion Vector of publisherAssertion object. Each publisherAssertion
438: * contains a relationship assertion.
439: * @return This function returns a YPFuture wrapping a DispositionReport with a single success indicator.
440: * @note The returned YPFuture will contain a DispositionReport when completed.
441: */
442: YPFuture add_publisherAssertions(String authInfo,
443: Vector publisherAssertion);
444:
445: /**
446: * The get_assertionStatusReport message is used to request a status
447: * report containing publisher assertions and status information. This contains
448: * all complete and incomplete assertions and serves an administrative use including
449: * the determination if there are any outstanding, incomplete assertions about relationships
450: * involving businesses the publisher account is associated with.
451: *
452: * @param authInfo Contains an authentication token. Authentication tokens are obtained
453: * using the get_authToken method.
454: * @param completionStatus This argument (String) lets the publisher restrict the result set
455: * to only those relationships that have the status value specified.
456: * @return Upon successful completion, an assertionStatusReport message is returned
457: * containing assertion status information.
458: * @note The returned YPFuture will contain a AssertionStatusReport when completed.
459: */
460: YPFuture get_assertionStatusReport(String authInfo,
461: String completionStatus);
462:
463: /**
464: * The get_assertionStatusReport message is used to request a status
465: * report containing publisher assertions and status information. This contains
466: * all complete and incomplete assertions and serves an administrative use including
467: * the determination if there are any outstanding, incomplete assertions about relationships
468: * involving businesses the publisher account is associated with.
469: *
470: * @param authInfo Contains an authentication token. Authentication tokens are obtained
471: * using the get_authToken method.
472: * @param completionStatus This argument lets the publisher restrict the result set to
473: * only those relationships that have the status value specified.
474: * @return Upon successful completion, an assertionStatusReport message is returned
475: * containing assertion status information.
476: * @note The returned YPFuture will contain a AssertionStatusReport when completed.
477: */
478: YPFuture get_assertionStatusReport(String authInfo,
479: CompletionStatus completionStatus);
480:
481: /**
482: * The get_publisherAssertions message is used to get a list of active
483: * publisher assertions that are controlled by an individual publisher account.
484: *
485: * @param authInfo Contains an authentication token. Authentication tokens are obtained
486: * using the get_authToken method.
487: * @return This function returns a YPFuture wrapping a PublisherAssertions message that contains a
488: * publisherAssertion element for each publisher assertion registered by the
489: * publisher account associated with the authentication information.
490: * @note The returned YPFuture will contain a PublisherAssertions when completed.
491: */
492: YPFuture get_publisherAssertions(String authInfo);
493:
494: /**
495: * The delete_binding message causes one or more bindingTemplate to be deleted.
496: *
497: * @param authInfo Contains an authentication token. Authentication tokens are obtained
498: * using the get_authToken method.
499: * @param bindingKey A uuid_key value that represents a specific instance of
500: * known bindingTemplate data.
501: * @return Upon successful completion, a dispositionReport is returned with a
502: * single success indicator.
503: * @note The returned YPFuture will contain a DispositionReport when completed.
504: */
505: YPFuture delete_binding(String authInfo, String bindingKey);
506:
507: /**
508: * The delete_binding message causes one or more bindingTemplate to be deleted.
509: *
510: * @param authInfo Contains an authentication token. Authentication tokens are obtained
511: * using the get_authToken method.
512: * @param bindingKeyStrings
513: * A vector of uuid_key strings that represents specific instances of
514: * known bindingTemplate data.
515: * @return Upon successful completion, a dispositionReport is returned with a
516: * single success indicator
517: * @note The returned YPFuture will contain a DispositionReport when completed.
518: */
519: YPFuture delete_binding(String authInfo, Vector bindingKeyStrings);
520:
521: /**
522: * The delete_business message is used to remove one or more
523: * businessEntity structures.
524: *
525: * @param authInfo Contains an authentication token. Authentication tokens are obtained
526: * using the get_authToken method.
527: * @param businessKey
528: * Uuid_key string that represents specific instance of known
529: * businessEntity data.
530: * @return Upon successful completion, a dispositionReport is returned with a
531: * single success indicator
532: * @note The returned YPFuture will contain a DispositionReport when completed.
533: */
534: YPFuture delete_business(String authInfo, String businessKey);
535:
536: /**
537: * The delete_business message is used to remove one or more
538: * businessEntity structures.
539: *
540: * @param authInfo Contains an authentication token. Authentication tokens are obtained
541: * using the get_authToken method.
542: * @param businessKeyStrings
543: * Vector of uuid_key strings that represent specific instances of known
544: * businessEntity data.
545: * @return Upon successful completion, a dispositionReport is returned with a
546: * single success indicator
547: * @note The returned YPFuture will contain a DispositionReport when completed.
548: */
549: YPFuture delete_business(String authInfo, Vector businessKeyStrings);
550:
551: /**
552: * The delete_service message is used to remove one or more
553: * businessService structures.
554: *
555: * @param authInfo Contains an authentication token. Authentication tokens are obtained
556: * using the get_authToken method.
557: * @param serviceKey uuid_key string that represents specific instance of known
558: * businessService data.
559: * @return Upon successful completion, a dispositionReport is returned with a
560: * single success indicator
561: * @note The returned YPFuture will contain a DispositionReport when completed.
562: */
563: YPFuture delete_service(String authInfo, String serviceKey);
564:
565: /**
566: * The delete_service message is used to remove one or more
567: * businessService structures.
568: *
569: * @param authInfo Contains an authentication token. Authentication tokens are obtained
570: * using the get_authToken method.
571: * @param serviceKeyStrings
572: * Vector of uuid_key strings that represent specific instances of known
573: * businessService data.
574: * @return Upon successful completion, a dispositionReport is returned with a
575: * single success indicator
576: * @note The returned YPFuture will contain a DispositionReport when completed.
577: */
578: YPFuture delete_service(String authInfo, Vector serviceKeyStrings);
579:
580: /**
581: * The delete_tModel message is used to remove or retire one or more
582: * tModel structures.
583: *
584: * @param authInfo Contains an authentication token. Authentication tokens are obtained
585: * using the get_authToken method.
586: * @param tModelKey uuid_key string that represents specific instance of known
587: * tModel data.
588: * @return Upon successful completion, a dispositionReport is returned with a
589: * single success indicator
590: * @note The returned YPFuture will contain a DispositionReport when completed.
591: */
592: YPFuture delete_tModel(String authInfo, String tModelKey);
593:
594: /**
595: * The delete_tModel message is used to remove or retire one or more
596: * tModel structures.
597: *
598: * @param authInfo Contains an authentication token. Authentication tokens are obtained
599: * using the get_authToken method.
600: * @param tModelKeyStrings
601: * Vector of uuid_key strings that represent specific instances of known
602: * tModel data.
603: * @return Upon successful completion, a dispositionReport is returned with a
604: * single success indicator
605: * @note The returned YPFuture will contain a DispositionReport when completed.
606: */
607: YPFuture delete_tModel(String authInfo, Vector tModelKeyStrings);
608:
609: /**
610: * The delete_publisherAssertions message is used to delete specific publisher assertions
611: * from the assertion collection controlled by a particular publisher account. Deleting assertions from
612: * the assertion collection will affect the visibility of business relationships. Deleting an assertion
613: * will cause any relationships based on that assertion to be invalidated.
614: *
615: * @param authInfo Contains an authentication token. Authentication tokens are obtained
616: * using the get_authToken method.
617: * @param publisherAssertion Contains a relationship assertion.
618: *
619: * @return Upon successful completion, a dispositionReport is returned with a
620: * single success indicator
621: * @note The returned YPFuture will contain a DispositionReport when completed.
622: */
623: YPFuture delete_publisherAssertions(String authInfo,
624: PublisherAssertion publisherAssertion) throws UDDIException;
625:
626: /**
627: * The delete_publisherAssertions message is used to delete specific publisher assertions
628: * from the assertion collection controlled by a particular publisher account. Deleting assertions from
629: * the assertion collection will affect the visibility of business relationships. Deleting an assertion
630: * will cause any relationships based on that assertion to be invalidated.
631: *
632: * @param authInfo Contains an authentication token. Authentication tokens are obtained
633: * using the get_authToken method.
634: * @param publisherAssertion Is a vector of publisherAssertion values. Each publisherAssertion
635: * contains a relationship assertion.
636: * @return Upon successful completion, a dispositionReport is returned with a
637: * single success indicator
638: * @note The returned YPFuture will contain a DispositionReport when completed.
639: */
640: YPFuture delete_publisherAssertions(String authInfo,
641: Vector publisherAssertion) throws UDDIException;
642:
643: /**
644: * The discard_authToken message is used to inform an Operator Site that the
645: * authentication token can be discarded. Subsequent calls that use the
646: * same authToken may be rejected. This message is optional for Operator
647: * Sites that do not manage session state or that do not support the
648: * get_authToken message.
649: *
650: * @param authInfo Contains an String authentication token. Authentication tokens are obtained
651: * using the get_authToken method.
652: * @return Upon successful completion, a dispositionReport is returned with a
653: * single success indicator. Discarding an expired authToken will be
654: * processed and reported as a success condition.
655: * @note The returned YPFuture will contain a DispositionReport when completed.
656: */
657: YPFuture discard_authToken(String authInfo);
658:
659: /**
660: * The discard_authToken message is used to inform an Operator Site that the
661: * authentication token can be discarded. Subsequent calls that use the
662: * same authToken may be rejected. This message is optional for Operator
663: * Sites that do not manage session state or that do not support the
664: * get_authToken message.
665: *
666: * @param authInfo Contains an authentication token. Authentication tokens are obtained
667: * using the get_authToken method.
668: * @return Upon successful completion, a dispositionReport is returned with a
669: * single success indicator. Discarding an expired authToken will be
670: * processed and reported as a success condition.
671: * @note The returned YPFuture will contain a DispositionReport when completed.
672: */
673: YPFuture discard_authToken(AuthInfo authInfo);
674:
675: /**
676: * The get_authToken message is used to obtain an authentication token.
677: * Authentication tokens are opaque values that are required for all
678: * other publisher API calls. This message is not required for Operator
679: * Sites that have an external mechanism defined for users to get an
680: * authentication token. This API is provided for implementations that
681: * do not have some other method of obtaining an authentication token or
682: * certificate, or that choose to use userID and Password based authentication.
683: *
684: * @param userid user that an individual authorized user was assigned by an Operator Site.
685: * Operator Sites will each provide a way for individuals to obtain a UserID
686: * and password that will be valid only at the given Operator Site.
687: * @param cred password or credential that is associated with the user.
688: * @return This function returns a YPFuture wrapping an authToken object that contains a valid
689: * authInfo object that can be used in subsequent calls to publisher
690: * API calls that require an authInfo value.
691: * @note The returned YPFuture will contain a AuthToken when completed.
692: */
693: YPFuture get_authToken(String userid, String cred);
694:
695: /**
696: * The get_registeredInfo message is used to get an abbreviated list
697: * of all businessEntity keys and tModel keys that are controlled by
698: * the individual associated the credentials passed.
699: *
700: * @param authInfo Contains an authentication token. Authentication tokens are obtained
701: * using the get_authToken API call.
702: * @return The function returns a YPFuture wrapping upon successful completion, a registeredInfo object will be returned,
703: * listing abbreviated business information in one or more businessInfo
704: * objects, and tModel information in one or more tModelInfo objects.
705: * This API is useful for determining the full extent of registered
706: * information controlled by a single user in a single call.
707: * @note The returned YPFuture will contain a RegisteredInfo when completed.
708: */
709: YPFuture get_registeredInfo(String authInfo);
710:
711: /**
712: * The save_binding message is used to save or update a complete
713: * bindingTemplate structure. This message can be used to add or
714: * update one or more bindingTemplate structures to one or more existing
715: * businessService structures.
716: *
717: * @param authInfo Contains an authentication token. Authentication tokens are obtained
718: * using the get_authToken method.
719: * @param bindingTemplates
720: * Vector of bindingTemplate objects. The order in which these are
721: * processed is not defined. To save a new bindingTemplate, pass a
722: * bindingTemplate object with an empty bindingKey attribute value.
723: * @return This API returns a bindingDetail object containing the final results
724: * of the call that reflects the newly registered information for the
725: * effected bindingTemplate objects.
726: * @note The returned YPFuture will contain a BindingDetail when completed.
727: */
728: YPFuture save_binding(String authInfo, Vector bindingTemplates);
729:
730: /**
731: * The save_business message is used to save or update information about a
732: * complete businessEntity structure. This API has the broadest scope of
733: * all of the save_x API calls in the publisher API, and can be used to make
734: * sweeping changes to the published information for one or more
735: * businessEntity structures controlled by an individual.
736: *
737: * @param authInfo Contains an authentication token. Authentication tokens are obtained
738: * using the get_authToken method.
739: * @param businessEntities
740: * Vector of businessEntity objects. These objects can be obtained in advance
741: * by using the get_businessDetail API call or by any other means.
742: * @return This API returns a businessDetail message containing the final results
743: * of the call that reflects the new registered information for the
744: * businessEntity information provided.
745: * @note The returned YPFuture will contain a BusinessDetail when completed.
746: */
747: YPFuture save_business(String authInfo, Vector businessEntities);
748:
749: /**
750: * The save_service message adds or updates one or more businessService
751: * structures.
752: *
753: * @param authInfo Contains an authentication token. Authentication tokens are obtained
754: * using the get_authToken method.
755: * @param businessServices
756: * Vector of businessService objects. These objects can be obtained in
757: * advance by using the get_serviceDetail API call or by any other means.
758: * @return This API returns a serviceDetail object containing the final results
759: * of the call that reflects the newly registered information for the
760: * effected businessService structures.
761: * @note The returned YPFuture will contain a ServiceDetail when completed.
762: */
763: YPFuture save_service(String authInfo, Vector businessServices);
764:
765: /**
766: * The save_tModel message adds or updates one or more tModel structures.
767: *
768: * @param authInfo Contains an authentication token. Authentication tokens are obtained
769: * using the get_authToken method.
770: * @param tModels Vector of complete tModel structures. If adding a new tModel,
771: * the tModelKey value should be passed as an empty element.
772: * @return This API returns a tModelDetail message containing the final results
773: * of the call that reflects the new registered information for the
774: * effected tModel structures
775: * @note The returned YPFuture will contain a TModelDetail when completed.
776: */
777: YPFuture save_tModel(String authInfo, Vector tModels);
778:
779: /**
780: * The set_publisherAssertions message is used to save the complete set of publisher
781: * assertions for an individual publisher account. When this message is processed, the publisher
782: * assertions that are active prior to this API call for a given publisher account are examined by the
783: * UDDI registry. Any new assertions not present prior to the call are added to the assertions attributed
784: * to the publisher. As a result, new relationships may be activated (e.g. determined to have a completed
785: * status), and existing relationships may be deactivated.
786: *
787: * @param authInfo Contains an authentication token. Authentication tokens are obtained
788: * using the get_authToken method.
789: * @param pub Contains a relationship assertion.
790: * @return Upon successful completion, a publisherAssertions message is returned containing
791: * all of the relationship assertions currently attributed to the publisher account
792: * that is associated with the authInfo data passed.
793: * @note The returned YPFuture will contain a PublisherAssertions when completed.
794: */
795: YPFuture set_publisherAssertions(String authInfo,
796: PublisherAssertion pub);
797:
798: /**
799: * The set_publisherAssertions message is used to save the complete set of publisher
800: * assertions for an individual publisher account. When this message is processed, the publisher
801: * assertions that are active prior to this API call for a given publisher account are examined by the
802: * UDDI registry. Any new assertions not present prior to the call are added to the assertions attributed
803: * to the publisher. As a result, new relationships may be activated (e.g. determined to have a completed
804: * status), and existing relationships may be deactivated.
805: *
806: * @param authInfo Contains an authentication token. Authentication tokens are obtained
807: * using the get_authToken method.
808: * @param publisherAssertion Is a vector of publisherAssertion object. Each publisherAssertion
809: * contains a relationship assertion.
810: * @return Upon successful completion, a publisherAssertions message is returned containing
811: * all of the relationship assertions currently attributed to the publisher account
812: * that is associated with the authInfo data passed.
813: * @note The returned YPFuture will contain a PublisherAssertions when completed.
814: */
815: YPFuture set_publisherAssertions(String authInfo,
816: Vector publisherAssertion);
817:
818: /**
819: * A UDDI operator sends the validate_values message to the appropriate external service, whenever a
820: * publisher saves data that uses a categorization value or identifier whose use is regulated by the
821: * external party who controls that service. The normal use is to verify that specific categories or
822: * identifiers (checking the keyValue attribute values supplied) exist within the given taxonomy or
823: * identifier system
824: *
825: * @param businessEntity
826: * The vector of businessEntity structure being validated.
827: * @return Upon successful completion, a dispositionReport is returned with a
828: * single success indicator.
829: * @note The returned YPFuture will contain a DispositionReport when completed.
830: */
831: YPFuture validate_values_businessEntity(Vector businessEntity);
832:
833: /**
834: * A UDDI operator sends the validate_values message to the appropriate external service, whenever a
835: * publisher saves data that uses a categorization value or identifier whose use is regulated by the
836: * external party who controls that service. The normal use is to verify that specific categories or
837: * identifiers (checking the keyValue attribute values supplied) exist within the given taxonomy or
838: * identifier system
839: *
840: * @param businessService
841: * The vector of business service structure being validated.
842: * @return Upon successful completion, a dispositionReport is returned with a
843: * single success indicator.
844: * @note The returned YPFuture will contain a DispositionReport when completed.
845: */
846: YPFuture validate_values_businessService(Vector businessService);
847:
848: /**
849: * A UDDI operator sends the validate_values message to the appropriate external service, whenever a
850: * publisher saves data that uses a categorization value or identifier whose use is regulated by the
851: * external party who controls that service. The normal use is to verify that specific categories or
852: * identifiers (checking the keyValue attribute values supplied) exist within the given taxonomy or
853: * identifier system
854: *
855: * @param tModel The vector of tModel structure being validated.
856: * @return Upon successful completion, a dispositionReport is returned with a
857: * single success indicator.
858: * @note The returned YPFuture will contain a DispositionReport when completed.
859: */
860: YPFuture validate_values_tModel(Vector tModel);
861:
862: /**
863: * Sends a UDDIElement to either the inquiry or publish URL.
864: *
865: * @param el
866: * @param inquiry
867: * @return An element representing a XML DOM tree containing the UDDI response.
868: * @note The returned YPFuture will contain a Element when completed.
869: */
870: YPFuture send(UDDIElement el, boolean inquiry);
871:
872: /**
873: * Sends an XML DOM tree indentified by the given element to either the
874: * inquiry or publish URL. Can be used to send an manually constructed
875: * message to the UDDI registry.
876: *
877: * @param el
878: * @param inquiry
879: * @return An element representing a XML DOM tree containing the UDDI response.
880: * @note The returned YPFuture will contain a Element when completed.
881: */
882: YPFuture send(Element el, boolean inquiry);
883:
884: // Extra method for sending queries without blackboard involvement.
885:
886: YPFuture execute(YPFuture pendingQuery);
887: }
888:
889: /*
890: class SamplePlugin {
891: void execute() {
892: final BlackboardService bb = getBlackboardService();
893: Runnable waker = new Runnable() {
894: public void run() {
895: bb.signalClientActivity();
896: };
897: };
898: String context = "geographic"; // geographic context, looks it up in community for most-local YP server
899:
900: YPProxy yp = ypservice.getYPProxy(context);
901: // option1 - make your own uddi4j object
902: // YPFuture q1 = yp.send(new GetAuthToken(userid, cred), true);
903: // option2 - proxy-like api
904: YPFuture q2 = yp.getAuthToken(userid, cred);
905:
906: publishAdd(q2); // implicitly sends query
907:
908: if (q.isReady()) {
909: AuthToken token = (AuthToken) q.get();
910: }
911:
912:
913: // replacement for old mechanism
914: // old
915: AuthToken token = uddiproxy.getAuthToken(userid,cred);
916: // new
917: AuthToken token = (AuthToken) (yp.execute(yp.getAuthToken(userid,cred))).get();
918: }
919: }
920: */
|