01: /**
02: Licensed to the Apache Software Foundation (ASF) under one or more
03: contributor license agreements. See the NOTICE file distributed with
04: this work for additional information regarding copyright ownership.
05: The ASF licenses this file to You under the Apache License, Version 2.0
06: (the "License"); you may not use this file except in compliance with
07: the License. You may obtain a copy of the License at
08:
09: http://www.apache.org/licenses/LICENSE-2.0
10:
11: Unless required by applicable law or agreed to in writing, software
12: distributed under the License is distributed on an "AS IS" BASIS,
13: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: See the License for the specific language governing permissions and
15: limitations under the License.
16:
17: $Header:$
18: */package org.apache.beehive.netui.util.config.bean;
19:
20: /**
21: *
22: */
23: public class UrlConfig {
24:
25: private static final boolean DEFAULT_URL_ENCODE_URLS = true;
26: private static final boolean DEFAULT_HTML_AMP_ENTITY = true;
27: private static final String DEFAULT_TEMPLATED_URL_FORMATTER_CLASS = "org.apache.beehive.netui.pageflow.internal.DefaultTemplatedURLFormatter";
28:
29: private boolean _urlEncodeUrls;
30: private boolean _htmlAmpEntity = DEFAULT_HTML_AMP_ENTITY;
31: private String _templatedUrlFormatterClass;
32:
33: public UrlConfig() {
34: _urlEncodeUrls = DEFAULT_URL_ENCODE_URLS;
35: _htmlAmpEntity = DEFAULT_HTML_AMP_ENTITY;
36: _templatedUrlFormatterClass = DEFAULT_TEMPLATED_URL_FORMATTER_CLASS;
37: }
38:
39: public UrlConfig(Boolean urlEncodeUrls, Boolean htmlAmpEntity,
40: String templatedUrlFormatterClass) {
41: this ();
42:
43: if (urlEncodeUrls != null)
44: _urlEncodeUrls = urlEncodeUrls.booleanValue();
45:
46: if (htmlAmpEntity != null)
47: _htmlAmpEntity = htmlAmpEntity.booleanValue();
48:
49: if (templatedUrlFormatterClass != null)
50: _templatedUrlFormatterClass = templatedUrlFormatterClass;
51: }
52:
53: public boolean isUrlEncodeUrls() {
54: return _urlEncodeUrls;
55: }
56:
57: public boolean isHtmlAmpEntity() {
58: return _htmlAmpEntity;
59: }
60:
61: public String getTemplatedUrlFormatterClass() {
62: return _templatedUrlFormatterClass;
63: }
64: }
|