001/*
002 * Copyright 2012-2017 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package org.springframework.boot.autoconfigure.mobile;
018
019import org.springframework.boot.context.properties.ConfigurationProperties;
020
021/**
022 * Properties for device view resolver.
023 *
024 * @author Stephane Nicoll
025 * @since 1.2.0
026 */
027@ConfigurationProperties(prefix = "spring.mobile.devicedelegatingviewresolver")
028public class DeviceDelegatingViewResolverProperties {
029
030        /**
031         * Enable support for fallback resolution.
032         */
033        private boolean enableFallback;
034
035        /**
036         * Prefix that gets prepended to view names for normal devices.
037         */
038        private String normalPrefix = "";
039
040        /**
041         * Suffix that gets appended to view names for normal devices.
042         */
043        private String normalSuffix = "";
044
045        /**
046         * Prefix that gets prepended to view names for mobile devices.
047         */
048        private String mobilePrefix = "mobile/";
049
050        /**
051         * Suffix that gets appended to view names for mobile devices.
052         */
053        private String mobileSuffix = "";
054
055        /**
056         * Prefix that gets prepended to view names for tablet devices.
057         */
058        private String tabletPrefix = "tablet/";
059
060        /**
061         * Suffix that gets appended to view names for tablet devices.
062         */
063        private String tabletSuffix = "";
064
065        public void setEnableFallback(boolean enableFallback) {
066                this.enableFallback = enableFallback;
067        }
068
069        public boolean isEnableFallback() {
070                return this.enableFallback;
071        }
072
073        public String getNormalPrefix() {
074                return this.normalPrefix;
075        }
076
077        public void setNormalPrefix(String normalPrefix) {
078                this.normalPrefix = normalPrefix;
079        }
080
081        public String getNormalSuffix() {
082                return this.normalSuffix;
083        }
084
085        public void setNormalSuffix(String normalSuffix) {
086                this.normalSuffix = normalSuffix;
087        }
088
089        public String getMobilePrefix() {
090                return this.mobilePrefix;
091        }
092
093        public void setMobilePrefix(String mobilePrefix) {
094                this.mobilePrefix = mobilePrefix;
095        }
096
097        public String getMobileSuffix() {
098                return this.mobileSuffix;
099        }
100
101        public void setMobileSuffix(String mobileSuffix) {
102                this.mobileSuffix = mobileSuffix;
103        }
104
105        public String getTabletPrefix() {
106                return this.tabletPrefix;
107        }
108
109        public void setTabletPrefix(String tabletPrefix) {
110                this.tabletPrefix = tabletPrefix;
111        }
112
113        public String getTabletSuffix() {
114                return this.tabletSuffix;
115        }
116
117        public void setTabletSuffix(String tabletSuffix) {
118                this.tabletSuffix = tabletSuffix;
119        }
120
121}