KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > juddi > datatype > request > ValidateValues


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.juddi.datatype.request;
17
18 import java.util.Vector JavaDoc;
19
20 import org.apache.juddi.datatype.RegistryObject;
21 import org.apache.juddi.datatype.business.BusinessEntity;
22 import org.apache.juddi.datatype.service.BusinessService;
23 import org.apache.juddi.datatype.tmodel.TModel;
24
25 /**
26  * "Whenever save_business, save_service or save_tModel are called,
27  * the contents of any included categoryBag or identifierBag element
28  * may be checked to see that it contains valid values. Checking is
29  * performed for taxonomies and identifier schemes that are classified
30  * as "checked". UDDI version 2 provides the ability for third parties
31  * to register new taxonomies and identifier schemes, and then control
32  * the validation process used by UDDI to perform such checks. Third
33  * parties that want to provision such a capability must implement a
34  * web service in the same manner that UDDI does (e.g. using SOAP 1.1
35  * over HTTP for message passing) that exposes a single method named
36  * validate_values. The interface for validate_values is described
37  * here."
38  *
39  * "A UDDI operator sends the validate_values message to the appropriate
40  * external service, of which there is exactly one, whenever a publisher
41  * saves data that uses a categorization value or identifier whose use
42  * is regulated by the external party who controls that service. For
43  * purposes of discussion, these identifiers and classifications are
44  * called checked value sets. The normal use is to verify that specific
45  * categories or identifiers (checking the keyValue attribute values
46  * supplied) exist within the given taxonomy or identifier system. For
47  * certain categorizations and identifiers, the party providing the
48  * validation service may further restrict the use of a value to certain
49  * parties based on the identifiers passed in the message or any other
50  * type of contextual check that is possible using the passed data."
51  *
52  * - from UDDI Version 2 Programmers API Specification, pg. 70
53  *
54  * @author Steve Viens (sviens@apache.org)
55  */

56 public class ValidateValues implements RegistryObject,Inquiry
57 {
58   String JavaDoc generic;
59   Vector JavaDoc businessVector;
60   Vector JavaDoc serviceVector;
61   Vector JavaDoc tModelVector;
62
63   /**
64    *
65    */

66   public ValidateValues()
67   {
68   }
69
70   /**
71    *
72    * @param genericValue
73    */

74   public void setGeneric(String JavaDoc genericValue)
75   {
76     this.generic = genericValue;
77   }
78
79   /**
80    *
81    * @return String UDDI request's generic value.
82    */

83   public String JavaDoc getGeneric()
84   {
85     return this.generic;
86   }
87
88   /**
89    *
90    */

91   public void addBusinessEntity(BusinessEntity business)
92   {
93     if (business == null)
94       return;
95
96     if (this.businessVector == null)
97       this.businessVector = new Vector JavaDoc();
98     this.businessVector.add(business);
99   }
100
101   /**
102    *
103    */

104   public void setBusinessEntityVector(Vector JavaDoc businesses)
105   {
106     this.businessVector = businesses;
107   }
108
109   /**
110    *
111    */

112   public Vector JavaDoc getBusinessEntityVector()
113   {
114     return this.businessVector;
115   }
116
117   /**
118    *
119    */

120   public void addBusinessService(BusinessService service)
121   {
122     if (service == null)
123       return;
124
125     if (this.serviceVector == null)
126       this.serviceVector = new Vector JavaDoc();
127     this.serviceVector.add(service);
128   }
129
130   /**
131    *
132    */

133   public void setBusinessServiceVector(Vector JavaDoc services)
134   {
135     this.serviceVector = services;
136   }
137
138   /**
139    *
140    */

141   public Vector JavaDoc getBusinessServiceVector()
142   {
143     return this.serviceVector;
144   }
145
146   /**
147    *
148    */

149   public void addTModel(TModel tModel)
150   {
151     if (tModel == null)
152       return;
153
154     if (this.tModelVector == null)
155       this.tModelVector = new Vector JavaDoc();
156     this.tModelVector.add(tModel);
157   }
158
159   /**
160    *
161    */

162   public void setTModelVector(Vector JavaDoc tModels)
163   {
164     this.tModelVector = tModels;
165   }
166
167   /**
168    *
169    */

170   public Vector JavaDoc getTModelVector()
171   {
172     return this.tModelVector;
173   }
174 }
Popular Tags