KickJava   Java API By Example, From Geeks To Geeks.

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


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 org.apache.juddi.datatype.Name;
19 import org.apache.juddi.datatype.RegistryObject;
20
21 /**
22  * Used to locate information about one or more publishers. Returns a
23  * publisherList message that matches the conditions specified.
24  *
25  * @author Steve Viens (sviens@apache.org)
26  */

27 public class FindPublisher implements RegistryObject,Admin
28 {
29   String JavaDoc generic;
30   Name name;
31   FindQualifiers findQualifiers;
32   int maxRows;
33
34   /**
35    * Constructs a new empty find_publisher request.
36    */

37   public FindPublisher()
38   {
39   }
40
41   /**
42    *
43    * @param genericValue
44    */

45   public void setGeneric(String JavaDoc genericValue)
46   {
47     this.generic = genericValue;
48   }
49
50   /**
51    *
52    * @return String request's generic value.
53    */

54   public String JavaDoc getGeneric()
55   {
56     return this.generic;
57   }
58
59   /**
60    * Sets the name argument of the search to the given name. This value is a partial
61    * name. The PublisherList returned contains PublisherInfo objects for Publisher whose
62    * name matches the value passed (leftmost match).
63    *
64    * @param newName The name argument of the search.
65    */

66   public void setName(String JavaDoc newName)
67   {
68     setName(new Name(newName));
69   }
70
71   /**
72    * Sets the name argument of the search to the given name. This value is a partial
73    * name. The PublisherList returned contains PublisherInfo objects for Publisher whose
74    * name matches the value passed (leftmost match).
75    *
76    * @param newname The name argument of the search.
77    */

78   public void setName(Name newname)
79   {
80     name = newname;
81   }
82
83   /**
84    * Returns the name argument of the search. Null is returned if the name
85    * argument for this search has not been specified.
86    *
87    * @return The name argument of the search, or null if the argument has not been specified.
88    */

89   public Name getName()
90   {
91     return name;
92   }
93
94   /**
95    * Returns the name argument of the search. Null is returned if the name
96    * argument for this search has not been specified.
97    *
98    * @return The name argument of the search as a String, or null if the argument has not been specified.
99    */

100   public String JavaDoc getNameString()
101   {
102     if (this.name != null)
103       return this.name.getValue();
104     else
105       return null;
106   }
107
108   /**
109    *
110    */

111   public int getMaxRows()
112   {
113     return maxRows;
114   }
115
116   /**
117    *
118    */

119   public void setMaxRows(int maxRows)
120   {
121     this.maxRows = maxRows;
122   }
123
124   /**
125    *
126    */

127   public void setMaxRows(String JavaDoc maxRows)
128   {
129     setMaxRows(Integer.parseInt(maxRows));
130   }
131
132   /**
133    *
134    */

135   public void addFindQualifier(FindQualifier findQualifier)
136   {
137     if (this.findQualifiers == null)
138       this.findQualifiers = new FindQualifiers();
139     this.findQualifiers.addFindQualifier(findQualifier);
140   }
141
142   /**
143    *
144    */

145   public void setFindQualifiers(FindQualifiers findQualifiers)
146   {
147     this.findQualifiers = findQualifiers;
148   }
149
150   /**
151    *
152    */

153   public FindQualifiers getFindQualifiers()
154   {
155     return findQualifiers;
156   }
157 }
Popular Tags