KickJava   Java API By Example, From Geeks To Geeks.

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


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.UploadRegister;
22 import org.apache.juddi.datatype.business.BusinessEntity;
23
24 /**
25  * "Used to register new businessEntity information or update existing
26  * businessEntity information. Use this to control the overall
27  * information about the entire business. Of the save_x APIs this one
28  * has the broadest effect."
29  *
30  * @author Steve Viens (sviens@apache.org)
31  */

32 public class SaveBusiness implements RegistryObject,Publish
33 {
34   String JavaDoc generic;
35   AuthInfo authInfo;
36   Vector JavaDoc businessVector;
37   Vector JavaDoc uploadRegisterVector;
38
39   /**
40    *
41    */

42   public SaveBusiness()
43   {
44   }
45
46   /**
47    *
48    */

49   public SaveBusiness(AuthInfo info, BusinessEntity business)
50   {
51     this.authInfo = info;
52     addBusinessEntity(business);
53   }
54
55   /**
56    *
57    */

58   public SaveBusiness(AuthInfo info,Vector JavaDoc businesses)
59   {
60     this.authInfo = info;
61     this.businessVector = businesses;
62   }
63
64   /**
65    *
66    * @param genericValue
67    */

68   public void setGeneric(String JavaDoc genericValue)
69   {
70     this.generic = genericValue;
71   }
72
73   /**
74    *
75    * @return String UDDI request's generic value.
76    */

77   public String JavaDoc getGeneric()
78   {
79     return this.generic;
80   }
81
82   /**
83    *
84    */

85   public void addBusinessEntity(BusinessEntity businessEntity)
86   {
87     if (this.businessVector == null)
88       this.businessVector = new Vector JavaDoc();
89     this.businessVector.add(businessEntity);
90   }
91
92   /**
93    *
94    */

95   public void setBusinessEntityVector(Vector JavaDoc businesses)
96   {
97     this.businessVector = businesses;
98   }
99
100   /**
101    *
102    */

103   public Vector JavaDoc getBusinessEntityVector()
104   {
105     return businessVector;
106   }
107
108   /**
109    *
110    */

111   public void addUploadRegister(UploadRegister register)
112   {
113     if (this.uploadRegisterVector == null)
114       this.uploadRegisterVector = new Vector JavaDoc();
115     this.uploadRegisterVector.add(register);
116   }
117
118   /**
119    *
120    */

121   public void setUploadRegisterVector(Vector JavaDoc registers)
122   {
123     this.uploadRegisterVector = registers;
124   }
125
126   /**
127    *
128    */

129   public Vector JavaDoc getUploadRegisterVector()
130   {
131     return this.uploadRegisterVector;
132   }
133
134   /**
135    *
136    */

137   public void setAuthInfo(AuthInfo authInfo)
138   {
139     this.authInfo = authInfo;
140   }
141
142   /**
143    *
144    */

145   public AuthInfo getAuthInfo()
146   {
147     return authInfo;
148   }
149 }
150
Popular Tags