01: /* Copyright 2002 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.groups;
07:
08: import java.util.HashMap;
09: import java.util.Map;
10:
11: import javax.naming.Name;
12:
13: /**
14: * Reference implementation of IComponentGroupService.
15: * @author Dan Ellentuck
16: * @version $Revision: 34758 $
17: */
18: public class ReferenceComponentGroupService implements
19: IComponentGroupService {
20: /**
21: * The services contained by this component, keyed on the name of the service
22: * as it is known within this component. Used to assemble the composite.
23: */
24: protected Map componentServices = new HashMap();
25:
26: /**
27: * The fully-qualified <code>Name</code> of the service, which may not be
28: * known until the composite service is fully assembled.
29: */
30: protected Name serviceName;
31:
32: /**
33: * ReferenceComponentGroupService constructor comment.
34: */
35: public ReferenceComponentGroupService() {
36: super ();
37: }
38:
39: /**
40: * Returns a <code>Map</code> of the services contained by this component,
41: * keyed on the name of the service WITHIN THIS COMPONENT.
42: */
43: public Map getComponentServices() {
44: return componentServices;
45: }
46:
47: /**
48: * Returns the FULLY-QUALIFIED <code>Name</code> of the service, which
49: * may not be known until the composite service is assembled.
50: */
51: public javax.naming.Name getServiceName() {
52: return serviceName;
53: }
54:
55: /**
56: * Answers if this service is a leaf in the composite; a service that
57: * actually operates on groups.
58: */
59: public boolean isLeafService() {
60: return false;
61: }
62:
63: /**
64: * Sets the name of the service to the new value.
65: */
66: public void setServiceName(Name newServiceName) {
67: serviceName = newServiceName;
68: }
69: }
|