KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > wsrp > consumer > Producer


1 package org.exoplatform.services.wsrp.consumer;
2
3 import org.exoplatform.services.wsrp.exceptions.WSRPException;
4 import org.exoplatform.services.wsrp.intf.WSRP_v1_PortletManagement_PortType;
5 import org.exoplatform.services.wsrp.intf.WSRP_v1_Registration_PortType;
6 import org.exoplatform.services.wsrp.intf.WSRP_v1_ServiceDescription_PortType;
7 import org.exoplatform.services.wsrp.type.*;
8
9 /**
10  * A consumer representation of a WSRP-producer providing WSRP-portlets.
11  * Generally a producer can expose up to four WSRP-Interfaces. These interfaces are
12  * Markup-, Service Description-,Registration- and Portlet Management Interface. Whereas
13  * the Registration- and Portlet Management Interface are optional.
14  *
15  * @author Stephan Laertz
16  * @author Benjamin Mestrallet
17  */

18 public interface Producer {
19
20   public String JavaDoc[] getDesiredLocales();
21   public void setDesiredLocales(String JavaDoc[] desiredLocales);
22
23   /**
24    * Get the name of the producer.
25    *
26    * @return The name of the producer
27    */

28   public String JavaDoc getName();
29
30   /**
31    * Set the name of the producer.
32    *
33    * @param name The name of the producer
34    */

35   public void setName(String JavaDoc name);
36
37   /**
38    * Get the ID of the producer.
39    *
40    * @return The ID of the producer
41    */

42   public String JavaDoc getID();
43
44   /**
45    * Set the ID of the producer to he given value.
46    *
47    * @param id ID of the producer.
48    */

49   public void setID(String JavaDoc id);
50
51   /**
52    * Get a description of the producer.
53    *
54    * @return A description of the producer
55    */

56   public String JavaDoc getDescription();
57
58   /**
59    * Set a description of the producer.
60    *
61    * @param description Some descriptive information about the producer
62    */

63   public void setDescription(String JavaDoc description);
64
65   /**
66    * Get the URL of the producers service description interface.
67    *
68    * @return URL of the service description interface.
69    */

70   public String JavaDoc getServiceDescriptionInterfaceEndpoint();
71
72   /**
73    * Set the URL of the producers service description interface.
74    *
75    * @param url of the service description interface.
76    */

77   public void setServiceDescriptionInterfaceEndpoint(String JavaDoc url);
78
79   /**
80    * Get the producers service description interface.
81    *
82    * @return service description interface.
83    */

84   public WSRP_v1_ServiceDescription_PortType getServiceDescriptionInterface();
85
86   /**
87    * Get the URL of the producers markup interface.
88    *
89    * @return URL of the markup interface.
90    */

91   public String JavaDoc getMarkupInterfaceEndpoint();
92
93   /**
94    * Set the URL of the producers markup interface.
95    *
96    * @param url of the markup interface.
97    */

98   public void setMarkupInterfaceEndpoint(String JavaDoc url);
99
100   /**
101    * Get the URL of the producers portlet management interface.
102    *
103    * @return URL of the portlet management interface.
104    */

105   public String JavaDoc getPortletManagementInterfaceEndpoint();
106
107   /**
108    * Set the URL of the producers portlet management interface.
109    *
110    * @param url of the portlet management interface.
111    */

112   public void setPortletManagementInterfaceEndpoint(String JavaDoc url);
113
114   /**
115    * Get the producers portlet management interface.
116    *
117    * @return portlet management interface.
118    */

119   public WSRP_v1_PortletManagement_PortType getPortletManagementInterface();
120
121   /**
122    * Get the URL of the producers registration interface.
123    *
124    * @return URL of the registration interface.
125    */

126   public String JavaDoc getRegistrationInterfaceEndpoint();
127
128   /**
129    * Set the URL of the producers registration interface.
130    */

131   public void setRegistrationInterfaceEndpoint(String JavaDoc url);
132
133   /**
134    * Get the producers registration interface.
135    *
136    * @return registration interface.
137    */

138   public WSRP_v1_Registration_PortType getRegistrationInterface();
139
140   /**
141    * Indicates wether or not the producer requires consumer registration.
142    *
143    * @return True if consumer registration is required.
144    */

145   public boolean isRegistrationRequired();
146
147   /**
148    * Get the registration data the consumer uses to register at this producer.
149    *
150    * @return The consumer registration data
151    */

152   public RegistrationData getRegistrationData();
153
154   /**
155    * Set the registration the consumer uses the register at this producer.
156    *
157    * @param regData The registration data which is used to register at this producer
158    */

159   public void setRegistrationData(RegistrationData regData);
160
161   /**
162    * Get the service description of the producer
163    *
164    * @param newRequest If set to true a new request is send to the producer otherwise a cached service description
165    * is used if available
166    * @return Service description of the producer
167    */

168   public ServiceDescription getServiceDescription(boolean newRequest) throws WSRPException;
169
170   /**
171    * Same as getServiceDescription(false)
172    */

173   public ServiceDescription getServiceDescription() throws WSRPException;
174
175   /**
176    * Get the portlet description of the portlet with the given handle or
177    * null if the producer doesn't know an portlet with this handle.
178    *
179    * @param portletHandle The portlet handle of the portlet
180    * @return The portlet description of the portlet with the given handle
181    */

182   public PortletDescription getPortletDescription(String JavaDoc portletHandle) throws WSRPException;
183
184   /**
185    * Get the current registration context of the consumer registered at this producer or null
186    * if no registration is required or happend so far.
187    *
188    * @return The current registration context of the consumer at this producer or null.
189    */

190   public RegistrationContext getRegistrationContext() throws WSRPException;
191
192   /**
193    * Method establishes a relationship between consumer and producer.
194    * <p/>
195    *
196    * @param registrationData Data which is used to register the consumer
197    * @return The registration context received by the producer
198    */

199   public RegistrationContext register(RegistrationData registrationData) throws WSRPException;
200
201   /**
202    * Can be used to modify the relationship between consumer and producer.
203    * <p/>
204    *
205    * @param registrationData The new registration data
206    * @return New registration context
207    */

208   public RegistrationState modifyRegistration(RegistrationData registrationData) throws WSRPException;
209
210   /**
211    * End an existing consumer producer relationship and remove the registration context
212    *
213    * @return Can be anything
214    */

215   public ReturnAny deregister() throws WSRPException;
216
217   /**
218    * Check wether the optional registration interface is supported
219    *
220    * @return true if a registration interface endpoint URL is set
221    */

222   public boolean isRegistrationInterfaceSupported();
223
224   /**
225    * Check wether the optional portlet management interface is supported
226    *
227    * @return true if a portlet management interface endpoint URL is set
228    */

229   public boolean isPortletManagementInferfaceSupported();
230
231 }
232
233
Popular Tags