01: /* Copyright 2001 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;
07:
08: import java.util.Enumeration;
09: import java.util.Hashtable;
10:
11: /**
12: * CoreXSLTStyleSheetDescription contains properties of core XSLT stylesheets.
13: * This includes structure and theme transformations.
14: *
15: * @author Peter Kharchenko
16: * @version $Revision: 34807 $
17: */
18:
19: public class CoreXSLTStylesheetDescription extends
20: CoreStylesheetDescription {
21:
22: Hashtable channelAttributeTable;
23:
24: public CoreXSLTStylesheetDescription() {
25: super ();
26: channelAttributeTable = new Hashtable();
27: }
28:
29: public Enumeration getChannelAttributeNames() {
30: return channelAttributeTable.keys();
31: }
32:
33: public String getChannelAttributeWordDescription(
34: String attributeName) {
35: DescriptionDefaultValuePair pair = (DescriptionDefaultValuePair) channelAttributeTable
36: .get(attributeName);
37: if (pair != null)
38: return pair.wordDescription;
39: else
40: return null;
41: }
42:
43: public String getChannelAttributeDefaultValue(String attributeName) {
44: DescriptionDefaultValuePair pair = (DescriptionDefaultValuePair) channelAttributeTable
45: .get(attributeName);
46: if (pair != null)
47: return pair.defaultValue;
48: else
49: return null;
50: }
51:
52: public void setChannelAttributeWordDescription(
53: String attributeName, String wordDescription) {
54: DescriptionDefaultValuePair pair = (DescriptionDefaultValuePair) channelAttributeTable
55: .get(attributeName);
56: if (pair != null)
57: pair.wordDescription = wordDescription;
58: }
59:
60: public void setChannelAttributeDefaultValue(String attributeName,
61: String defaultValue) {
62: DescriptionDefaultValuePair pair = (DescriptionDefaultValuePair) channelAttributeTable
63: .get(attributeName);
64: if (pair != null)
65: pair.defaultValue = defaultValue;
66: }
67:
68: public boolean containsChannelAttribute(String attributeName) {
69: return channelAttributeTable.containsKey(attributeName);
70: }
71:
72: public void addChannelAttribute(String name, String defaultValue,
73: String wordDescription) {
74: DescriptionDefaultValuePair pair = new DescriptionDefaultValuePair();
75: pair.defaultValue = defaultValue;
76: pair.wordDescription = wordDescription;
77: channelAttributeTable.put(name, pair);
78: }
79:
80: }
|