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:
10: /**
11: * A data holder for configuration information about a specific component group service.
12: *
13: * @author Dan Ellentuck
14: * @version $Revision: 34758 $
15: * @see ICompositeGroupService
16: */
17: public class ComponentGroupServiceDescriptor extends HashMap {
18: // Known service attributes (there may optionally be others.)
19: public static final String NAME = "name";
20: public static final String FACTORY = "service_factory";
21: public static final String ENTITY_STORE_FACTORY = "entity_store_factory";
22: public static final String GROUP_STORE_FACTORY = "group_store_factory";
23: public static final String ENTITY_SEARCHER_FACTORY = "entity_searcher_factory";
24: public static final String INTERNALLY_MANAGED = "internally_managed";
25: public static final String CACHE_ENABLED = "cache_enabled";
26:
27: /**
28: * ComponentGroupServiceDescriptor constructor comment.
29: */
30: public ComponentGroupServiceDescriptor() {
31: super ();
32: }
33:
34: public Object getAttribute(String attName) {
35: return get(attName);
36: }
37:
38: public String getEntitySearcherFactoryName() {
39: return (String) get(ENTITY_SEARCHER_FACTORY);
40: }
41:
42: public String getEntityStoreFactoryName() {
43: return (String) get(ENTITY_STORE_FACTORY);
44: }
45:
46: public String getGroupStoreFactoryName() {
47: return (String) get(GROUP_STORE_FACTORY);
48: }
49:
50: public String getName() {
51: return (String) get(NAME);
52: }
53:
54: public String getServiceFactoryName() {
55: return (String) get(FACTORY);
56: }
57:
58: public boolean isCachingEnabled() {
59: Boolean result = (Boolean) get(CACHE_ENABLED);
60: return (result == null) ? false : result.booleanValue();
61: }
62:
63: public boolean isInternallyManaged() {
64: Boolean result = (Boolean) get(INTERNALLY_MANAGED);
65: return (result == null) ? false : result.booleanValue();
66: }
67:
68: public void setAttribute(String attName, Object attValue) {
69: put(attName, attValue);
70: }
71:
72: public void setCachingEnabled(boolean caching) {
73: put(CACHE_ENABLED, new Boolean(caching));
74: }
75:
76: public void setEntitySearcherFactoryName(String esfName) {
77: put(ENTITY_SEARCHER_FACTORY, esfName);
78: }
79:
80: public void setEntityStoreFactoryName(String esfName) {
81: put(ENTITY_STORE_FACTORY, esfName);
82: }
83:
84: public void setGroupStoreFactoryName(String gsfName) {
85: put(GROUP_STORE_FACTORY, gsfName);
86: }
87:
88: public void setInternallyManaged(boolean internal) {
89: put(INTERNALLY_MANAGED, new Boolean(internal));
90: }
91:
92: public void setName(String name) {
93: put(NAME, name);
94: }
95:
96: public void setServiceFactoryName(String sfName) {
97: put(FACTORY, sfName);
98: }
99: }
|