Source Code Cross Referenced for ProducerEntityManager.java in  » Portal » Open-Portal » com » sun » portal » wsrp » consumer » producermanager » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » Open Portal » com.sun.portal.wsrp.consumer.producermanager 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * $Id: ProducerEntityManager.java,v 1.10 2006/05/25 07:19:31 rt130506 Exp $
003:         * Copyright 2003 Sun Microsystems, Inc. All
004:         * rights reserved. Use of this product is subject
005:         * to license terms. Federal Acquisitions:
006:         * Commercial Software -- Government Users
007:         * Subject to Standard License Terms and
008:         * Conditions.
009:         *
010:         * Sun, Sun Microsystems, the Sun logo, and Sun ONE
011:         * are trademarks or registered trademarks of Sun Microsystems,
012:         * Inc. in the United States and other countries.
013:         */package com.sun.portal.wsrp.consumer.producermanager;
014:
015:        import java.util.Map;
016:        import java.util.Set;
017:        import java.util.List;
018:
019:        import java.net.URL;
020:
021:        import javax.servlet.http.HttpServletRequest;
022:
023:        import com.iplanet.sso.SSOToken;
024:
025:        import com.sun.portal.wsrp.common.stubs.ServiceDescription;
026:        import com.sun.portal.wsrp.common.stubs.RegistrationContext;
027:        import com.sun.portal.wsrp.common.stubs.RegistrationData;
028:
029:        import com.sun.portal.wsrp.consumer.common.WSRPConsumerException;
030:
031:        /**
032:         * <code>ProducerEntityManager</code> interface contains methods needed by
033:         * the administrator to administer remote web services offered by the
034:         * producers.  In addition, this interface is also used by the markup 
035:         * manager to obtain information about each producer.
036:         * In terms of WSRP, this interface does the behind-scene work for the 
037:         * ServiceDescription and the Registration port types.
038:         */
039:        public interface ProducerEntityManager {
040:
041:            /**
042:             * Initialize the ProducerEntityManager from a servlet.  
043:             *
044:             * @param consumerId a <code>String</code> value identifying the consumer entity.
045:             * @param request a <code>HttpServletRequest</code> value
046:             * @exception WSRPConsumerException if an error occurs
047:             */
048:            public void init(String consumerId, HttpServletRequest request)
049:                    throws WSRPConsumerException;
050:
051:            /**
052:             * Initialize the ProducerEntityManager by supplying the credential in
053:             * a form of username and password.
054:             *
055:             * @param consumerId a <code>String</code> identifying the consumer entity.
056:             * @param username user id for establishing user context.
057:             * @param password user password to be used for establishing user context.
058:             * @exception WSRPConsumerException if an error occurs
059:             */
060:            public void init(String consumerId, String username, String password)
061:                    throws WSRPConsumerException;
062:
063:            /**
064:             * Initialize the ProducerEntityManager by supplying the credential in
065:             * a form of SSOToken.
066:             *
067:             * @param ssoToken a <code>SSOToken</code> 
068:             * @param portalId a <code>String</code> identifying the portal
069:             * @param consumerId consumer id for identifying the consumer entity.
070:             * @exception WSRPConsumerException if an error occurs
071:             */
072:            public void init(SSOToken ssoToken, String portalId,
073:                    String consumerId) throws WSRPConsumerException;
074:
075:            /**
076:             * Is WSRP consumer currently activated?  All callers of the
077:             * <code>ProducerEntityManager</code> is adviced to check this before
078:             * initiating any action.
079:             *
080:             * @return a <code>boolean</code> value indicating whether wsrp consumer is activated or not.
081:             * @exception WSRPConsumerException if an error occurs
082:             */
083:            public boolean isActivated() throws WSRPConsumerException;
084:
085:            /**
086:             * Get the name given to the consumer.  This name gets used
087:             * when the consumer registers with the producer.
088:             *
089:             * @return a name of the given consumer.
090:             */
091:            public String getConsumerName() throws WSRPConsumerException;
092:
093:            /**
094:             * Given the producer URL, make a connection to the producer end to
095:             * fetch the service description describing web service(s) offered by
096:             * the producer.  
097:             *
098:             * @param producerURL the <code>URL</code> where producer is located.
099:             * @return a <code>ServiceDescription</code> which describes the service(s) offered by the producer.
100:             */
101:            public ServiceDescription getServiceDescription(URL producerURL)
102:                    throws WSRPConsumerException;
103:
104:            /**
105:             * Given the producer URL, make a connection to the producer end to
106:             * determine if in-band registration is supported.  This is done
107:             * by checking to see if the registration port is available or not.
108:             *
109:             * @param producerURL the <code>URL</code> where producer is located.
110:             * @return a <code>boolean</code> value indicating whether in-band registration is available or not.
111:             */
112:            public boolean isInbandRegistrationSupported(URL producerURL)
113:                    throws WSRPConsumerException;
114:
115:            /**
116:             * Retrieve the <code>ProducerEntity</code> object from the
117:             * local data storage.
118:             *
119:             * @param producerEntityId a <code>String</code> of the producer entity.
120:             * @return a <code>ProducerEntity</code> for the given producer entity id.
121:             * @exception WSRPConsumerException if an error occurs
122:             */
123:            public ProducerEntity getProducerEntity(String producerEntityId)
124:                    throws WSRPConsumerException;
125:
126:            /**
127:             * Add the producer entity to the data storage.  It first makes
128:             * a connection to the producer end to fetch all neccessary
129:             * information before establishing a producer entity in the local
130:             * data storage.
131:             *
132:             * @param producerName name of the producer
133:             * @param producerURL URL endpoint of the producer
134:             * @param data registration data 
135:             * @param userCategories user category mapping
136:             * @param allowedUserProfiles allowed user profile mapping
137:             * @param customUserProfiles custom user profile mapping
138:             * @return ID of the added producer entity
139:             * @exception WSRPConsumerException if an error occurs
140:             * @exception InbandRegistrationNotSupportedException if the registration port on the producer end is not available which in most cases indicates that in-band registration is unavailable and that the consumer should use out-of-band mechanism to establish registration.
141:             */
142:            public String addProducerEntity(String producerName,
143:                    URL producerURL, String identityPropagationType,
144:                    RegistrationData data, Map userCategories,
145:                    Map allowedUserProfiles, Map customUserProfiles)
146:                    throws WSRPConsumerException,
147:                    InbandRegistrationNotSupportedException;
148:
149:            /**
150:             * Add the producer entity to the data storage using out-of-band
151:             * mechanism.  It first makes a connection to the producer end using
152:             * the registration handle that was pre-established via the out-of-band
153:             * process.  After gathering the information from the producer, it
154:             * creates a producer entity in the local data storage.
155:             *
156:             * @param producerName name of the producer
157:             * @param producerURL URL endpoint of the producer
158:             * @param data registration data
159:             * @param regHandle registration handle which was obtained via the out-of-band mechanism
160:             * @param userCategories user category mapping
161:             * @param allowedUserProfiles allowed user profile mapping
162:             * @param customUserProfiles custom user profile mapping
163:             * @return ID of the added producer entity
164:             * @exception WSRPConsumerException if an error occurs
165:             */
166:            public String addProducerEntity(String producerName,
167:                    URL producerURL, String identityPropagationType,
168:                    String regHandle, Map userCategories,
169:                    Map allowedUserProfiles, Map customUserProfiles)
170:                    throws WSRPConsumerException,
171:                    InbandRegistrationNotSupportedException;
172:
173:            /**
174:             * Update service description data by first making connection to the
175:             * producer end then updating local data storage with the fresh
176:             * data.
177:             *
178:             * @param producerEntityId a <code>String</code> of the producer entity.
179:             * @return a <code>ProducerEntity</code> for the given producer entity id.
180:             * @exception WSRPConsumerException if an error occurs
181:             */
182:            public void updateServiceDescription(String producerEntityId)
183:                    throws WSRPConsumerException;
184:
185:            /**
186:             * Modify registration information for the given producer entity.
187:             *
188:             * @param producerEntityId ID of the producer entity to be modified.
189:             * @param data a new <code>RegistrationData</code> 
190:             * @exception WSRPConsumerException if an error occurs
191:             * @exception InbandRegistrationUnsupportedException if the registration port on the producer end is not available which in most cases indicates that in-band registration is unavailable and that the consumer should use out-of-band mechanism to establish registration.
192:             */
193:            public void modifyRegistration(String producerEntityId,
194:                    RegistrationData data) throws WSRPConsumerException,
195:                    InbandRegistrationNotSupportedException;
196:
197:            /**
198:             * Make a connection to producer and deregister.  Then remove the
199:             * producer entity from the local data storage.
200:             *
201:             * @param producerEntityId ID of the producer entity to be removed.
202:             * @exception WSRPConsumerException if an error occurs
203:             * @exception InbandRegistrationUnsupportedException if the registration port on the producer end is not available which in most cases indicates that in-band deregistration is unavailable and that the consumer should use out-of-band mechanism to establish deregistration.
204:             */
205:            public void removeProducerEntity(String producerEntityId)
206:                    throws WSRPConsumerException,
207:                    InbandRegistrationNotSupportedException;
208:
209:            /**
210:             * Remove the producer entity from the local data storage only.
211:             * Note that this method does not deregister the consumer from
212:             * the producer - deregistration is expected to take place out-of-band.
213:             *
214:             * @param producerEntityId ID of the producer entity to be removed.
215:             * @exception WSRPConsumerException if an error occurs
216:             */
217:            public void eliminateProducerEntity(String producerEntityId)
218:                    throws WSRPConsumerException;
219:
220:            /**
221:             * Get a set of ID's of the producer entities from the data storage.
222:             *
223:             * @return a <code>Set</code> containing producer entity id's.
224:             * @exception WSRPConsumerException if an error occurs
225:             */
226:            public Set getProducerEntityIds() throws WSRPConsumerException;
227:
228:            /**
229:             * Get the standard user profile mapping. The user profiles
230:             * as predefined by the WSRP spec are mapped to the local portal
231:             * user attributes.
232:             *
233:             * @return  map containing the mapping.
234:             */
235:            public Map getStandardUserProfileMapping()
236:                    throws WSRPConsumerException;
237:
238:            /**
239:             * Get default RegistrationData.  
240:             *
241:             * @return a <code>RegistrationData</code> containing the default values.
242:             * @exception WSRPConsumerException if an error occurs
243:             */
244:            public RegistrationData getDefaultRegistrationData()
245:                    throws WSRPConsumerException;
246:
247:            /**
248:             * Set the consumer name.
249:             *
250:             * @param consumerName a new name of the given consumer.
251:             */
252:            public void setConsumerName(String consumerName)
253:                    throws WSRPConsumerException;
254:
255:            /**
256:             * Set the name of the producer entity.
257:             *
258:             * @param producerEntityId ID of the producer entity
259:             * @param name new name to be used for the producer entity.
260:             */
261:            public void setName(String prducerEntityId, String name)
262:                    throws WSRPConsumerException;
263:
264:            /**
265:             * Set the identity propagation type of the producer entity.
266:             *
267:             * @param producerEntityId ID of the producer entity
268:             * @param type, new type to be used for the producer entity.
269:             */
270:            public void setIdentityPropagationType(String prducerEntityId,
271:                    String type) throws WSRPConsumerException;
272:
273:            /**
274:             * Set the producer WSDL URL.
275:             * TBD: commented out for now - risk factor needs to be accessed before
276:             * we can make this available
277:             *
278:             * @param producerEntityId ID of the producer entity
279:             * @param url URL where producer's WSDL is located.
280:            public void setURL(String prducerEntityId, URL url) throws WSRPConsumerException;
281:             */
282:
283:            /**
284:             * Set status of the producer entity.
285:             *
286:             * @param producerEntityId ID of the producer entity
287:             * @param status the new status
288:             */
289:            public void setStatus(String producerEntityId,
290:                    ProducerEntityStatus status) throws WSRPConsumerException;
291:
292:            /**
293:             * Set the mapping of remote user categories to the local
294:             * infrastructure roles.
295:             *
296:             * @param producerEntityId ID of the producer entity
297:             * @param userCategoryMap map of remote user categories to the local
298:             * infrastructure roles. 
299:             */
300:            public void setUserCategoryMapping(String producerEntityId,
301:                    Map userCategoryMap) throws WSRPConsumerException;
302:
303:            /**
304:             * Set allowed user profile mapping which contains entries
305:             * for mapping a producer-generated user profile to a local
306:             * user profile value.  This is a subset of the standard user
307:             * profile mappings and contains only the mapping that's allowed
308:             * for the given producer.
309:             *
310:             * @param producerEntityId a <code>String</code> value
311:             * @param allowedUserProfileMap a <code>Map</code> value
312:             * @exception WSRPConsumerException if an error occurs
313:             */
314:            public void setAllowedUserProfileMapping(String producerEntityId,
315:                    Map allowedUserProfileMap) throws WSRPConsumerException;
316:
317:            /**
318:             * Set the custom user profile mapping which contains entries
319:             * for mapping a producer-generated user profile to a local
320:             * user profile value. 
321:             *
322:             * @param producerEntityId a <code>String</code> value
323:             * @param customUserProfileMap a <code>Map</code> value
324:             * @exception WSRPConsumerException if an error occurs
325:             */
326:            public void setCustomUserProfileMapping(String producerEntityId,
327:                    Map customUserProfileMap) throws WSRPConsumerException;
328:
329:            /**
330:             * Sets the map of standard user profile mapping.  Standard user profile
331:             * mapping is considered very static and is not meant to change.
332:             * Should there be an update to this map, server restart would be 
333:             * needed.
334:             *
335:             * @exception WSRPConsumerException if an error occurs
336:             */
337:            public void setStandardUserProfileMapping(Map standardUserProfileMap)
338:                    throws WSRPConsumerException;
339:
340:            /**
341:             * Sets the default registration data.  Default registration data
342:             * is considered very static and is not meant to change.
343:             * Should there be an update to this data, server restart would be
344:             * needed.
345:             *
346:             * @exception WSRPConsumerException if an error occurs
347:             */
348:            public void setDefaultRegistrationData(RegistrationData rd)
349:                    throws WSRPConsumerException;
350:
351:            /**
352:             * Gets the endPoint urls for the given producer URL
353:             */
354:
355:            public List getEndpoints(URL url) throws WSRPConsumerException;
356:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.