001: /**
002: Licensed to the Apache Software Foundation (ASF) under one or more
003: contributor license agreements. See the NOTICE file distributed with
004: this work for additional information regarding copyright ownership.
005: The ASF licenses this file to You under the Apache License, Version 2.0
006: (the "License"); you may not use this file except in compliance with
007: the License. You may obtain a copy of the License at
008:
009: http://www.apache.org/licenses/LICENSE-2.0
010:
011: Unless required by applicable law or agreed to in writing, software
012: distributed under the License is distributed on an "AS IS" BASIS,
013: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: See the License for the specific language governing permissions and
015: limitations under the License.
016:
017: $Header:$
018: */package org.apache.beehive.netui.util.config.bean;
019:
020: /**
021: *
022: */
023: public class NetUIConfig {
024:
025: private PageFlowActionInterceptorsConfig _pageFlowActionInterceptors;
026: private PageFlowHandlersConfig _pageFlowHandlers;
027: private PageFlowConfig _pageFlowConfig;
028: private PageFlowFactoriesConfig _pageFlowFactories;
029: private SharedFlowRefConfig[] _sharedFlowRef;
030: private RequestInterceptorsConfig _requestInterceptors;
031: private JspTagConfig _jspTagConfig;
032: private PrefixHandlerConfig[] _prefixHandlers;
033: private ExpressionLanguagesConfig _expressionLanguages;
034: private IteratorFactoryConfig[] _iteratorFactories;
035: private TypeConverterConfig[] _typeConverters;
036: private UrlConfig _urlConfig;
037: private CatalogConfig _catalogConfig;
038:
039: private boolean _locked = false;
040:
041: public NetUIConfig(
042: PageFlowActionInterceptorsConfig pageFlowActionInterceptors,
043: PageFlowHandlersConfig pageFlowHandlers,
044: PageFlowConfig pageFlowConfig,
045: PageFlowFactoriesConfig pageFlowFactories,
046: SharedFlowRefConfig[] sharedFlowRef,
047: RequestInterceptorsConfig requestInterceptors,
048: JspTagConfig jspTagConfig,
049: PrefixHandlerConfig[] prefixHandlers,
050: ExpressionLanguagesConfig expressionLanguages,
051: IteratorFactoryConfig[] iteratorFactories,
052: TypeConverterConfig[] typeConverters, UrlConfig urlConfig) {
053: _pageFlowActionInterceptors = pageFlowActionInterceptors;
054: _pageFlowHandlers = pageFlowHandlers;
055: _pageFlowConfig = pageFlowConfig;
056: _pageFlowFactories = pageFlowFactories;
057: _sharedFlowRef = sharedFlowRef;
058: _requestInterceptors = requestInterceptors;
059: _jspTagConfig = jspTagConfig;
060: _prefixHandlers = prefixHandlers;
061: _expressionLanguages = expressionLanguages;
062: _iteratorFactories = iteratorFactories;
063: _typeConverters = typeConverters;
064: _urlConfig = urlConfig;
065: }
066:
067: public void lock() {
068: _locked = true;
069: }
070:
071: public PageFlowActionInterceptorsConfig getPageFlowActionInterceptors() {
072: return _pageFlowActionInterceptors;
073: }
074:
075: public PageFlowHandlersConfig getPageFlowHandlers() {
076: return _pageFlowHandlers;
077: }
078:
079: public PageFlowConfig getPageFlowConfig() {
080: return _pageFlowConfig;
081: }
082:
083: public PageFlowFactoriesConfig getPageFlowFactories() {
084: return _pageFlowFactories;
085: }
086:
087: public SharedFlowRefConfig[] getSharedFlowRefs() {
088: return _sharedFlowRef;
089: }
090:
091: public RequestInterceptorsConfig getRequestInterceptors() {
092: return _requestInterceptors;
093: }
094:
095: public JspTagConfig getJspTagConfig() {
096: return _jspTagConfig;
097: }
098:
099: public PrefixHandlerConfig[] getPrefixHandlers() {
100: return _prefixHandlers;
101: }
102:
103: public ExpressionLanguagesConfig getExpressionLanguages() {
104: return _expressionLanguages;
105: }
106:
107: public IteratorFactoryConfig[] getIteratorFactories() {
108: return _iteratorFactories;
109: }
110:
111: public TypeConverterConfig[] getTypeConverters() {
112: return _typeConverters;
113: }
114:
115: public UrlConfig getUrlConfig() {
116: return _urlConfig;
117: }
118:
119: public CatalogConfig getCatalogConfig() {
120: return _catalogConfig;
121: }
122:
123: public void setCatalogConfig(CatalogConfig catalogConfig) {
124: ensureUnlocked();
125:
126: _catalogConfig = catalogConfig;
127: }
128:
129: private void ensureUnlocked() {
130: if (_locked)
131: throw new IllegalStateException(
132: "Unable to modify locked NetUI framework configuration.");
133: }
134: }
|