01: /**
02: * $Id: Service.java,v 1.3 2007/01/26 03:50:13 portalbld Exp $
03: * Copyright 2005 Sun Microsystems, Inc. All
04: * rights reserved. Use of this product is subject
05: * to license terms. Federal Acquisitions:
06: * Commercial Software -- Government Users
07: * Subject to Standard License Terms and
08: * Conditions.
09: *
10: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
11: * are trademarks or registered trademarks of Sun Microsystems,
12: * Inc. in the United States and other countries.
13: */package com.sun.portal.service;
14:
15: /**
16: * Service is an abstraction layer. A service implementation could
17: * be a portlet, a provider, a wsrp. In future it could be a set of
18: * portlets or providers and so forth.
19: */
20: public interface Service {
21:
22: /**
23: * Returns the service type.
24: */
25: ServiceType getServiceType();
26:
27: /**
28: * Method to be called when the service is added/removed etc.
29: * to a collaboration group
30: * like communities, org etc.
31: * @param request carries the data for provisioning request
32: * @param provisionResponse carries the data for provisioning response
33: */
34: void handleProvisionEvent(ProvisionRequest request,
35: ProvisionResponse provisionResponse)
36: throws ServiceException;
37:
38: /**
39: * Method to be called when a member is added to a collaboration group,
40: * that uses this service.
41: * @param request carries data to process membership requests
42: * @param response carries data for response
43: */
44: void memberAdded(MembershipRequest request,
45: MembershipResponse response) throws ServiceException;
46:
47: /**
48: * Method to be called when a member is removed from a collaboration group
49: * that is using this service.
50: * @param request carries data to process membership requests
51: * @param response carries data for response
52: */
53: void memberRemoved(MembershipRequest request,
54: MembershipResponse response) throws ServiceException;
55:
56: /**
57: * Not used in this release. Will be used when we have a real
58: * service registry persisting meta data for a service.
59: * Method to be called to initialize the service from its meta data
60: * that might be persisted in service registry.
61: */
62: void init(ServiceInitData data);
63:
64: /**
65: * Not used in this release. Will be used when we have a real
66: * service registry persisting meta data for a service.
67: * Method to be called to get the meta data
68: * that might be persisted in service registry.
69: */
70: ServiceInitData getServiceInitData();
71:
72: /**
73: * not used in this release.
74: */
75:
76: void destroy() throws ServiceException;
77: }
|