Subversion Repositories Integrator Subversion

Rev

Rev 242 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
207 espaco 1
/*
2
 * Copyright 2009-2014 PrimeTek.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 * http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package br.com.ec.controller;
17
 
18
import java.io.Serializable;
19
 
242 espaco 20
import javax.inject.Named;
21
 
207 espaco 22
import org.springframework.context.annotation.Scope;
23
 
245 espaco 24
import br.com.ec.web.exception.VerificadorLancamentoException;
25
import br.com.ec.web.exception.VerificadorLancamentoException.CommandBean;
26
import br.com.ec.web.message.LancadorMensagem;
27
 
242 espaco 28
@Named
207 espaco 29
@Scope("session")
30
public class GuestPreferences implements Serializable {
31
 
32
        private String inputStyleClass = "";
33
        private String topbarTheme = "light";
34
        private String menuTheme = "dim";
35
        private String menuMode = "";
36
        private String darkMode = "light";
37
        private String componentTheme = "";
209 espaco 38
        private boolean orientationRTL = false;
207 espaco 39
 
40
        public String getInputStyleClass() {
41
                return inputStyleClass;
42
        }
43
        public void setInputStyleClass(String inputStyleClass) {
44
                this.inputStyleClass = inputStyleClass;
45
        }
46
 
47
        public String getTopbarTheme() {
48
                return topbarTheme;
49
        }
50
        public void setTopbarTheme(String topbarTheme) {
51
                this.topbarTheme = topbarTheme;
52
        }
53
 
54
        public String getMenuTheme() {
55
                return menuTheme;
56
        }
57
        public void setMenuTheme(String menuTheme) {
58
                this.menuTheme = menuTheme;
59
        }
60
 
61
        public String getMenuMode() {
62
                return menuMode;
63
        }
64
        public void setMenuMode(String menuMode) {
65
                this.menuMode = menuMode;
66
        }
67
 
68
        public String getDarkMode() {
69
                return darkMode;
70
        }
71
        public void setDarkMode(String darkMode) {
72
                this.darkMode = darkMode;
73
        }
74
 
75
        public boolean isOrientationRTL() {
76
                return orientationRTL;
77
        }
78
        public void setOrientationRTL(boolean orientationRTL) {
79
                this.orientationRTL = orientationRTL;
80
        }
245 espaco 81
 
82
        public String getComponentTheme() {
83
                return componentTheme;
84
        }
85
        public void setComponentTheme(String componentTheme) {
86
                this.componentTheme = componentTheme;
87
        }
88
 
89
        public void confirmarMudancas() {
90
                new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() {
91
                        public void execute() {
92
                                LancadorMensagem.lancarSucessoRedirecionandoTela("CONFIGURAÇÃO ALTERARA!", "/sistema/configuracoes.xhtml");
93
                        }
94
                });
95
        }
96
 
207 espaco 97
        /*
98
    private Map<String,String> themeColors;
99
 
100
    private String theme = "blue";
101
 
102
    private String menuLayout = "static";
103
 
104
    @PostConstruct
105
    public void init() {
106
        themeColors = new HashMap<String,String>();
107
        themeColors.put("turquoise", "#00acac");
108
        themeColors.put("blue", "#2f8ee5");
109
        themeColors.put("orange", "#efa64c");
110
        themeColors.put("purple", "#6c76af");
111
        themeColors.put("pink", "#f16383");
112
        themeColors.put("light-blue", "#63c9f1");
113
        themeColors.put("green", "#57c279");
114
        themeColors.put("deep-purple", "#7e57c2");
115
    }
116
 
117
    public String getTopbarTheme() {
118
        return "light";
119
    }
120
 
121
        public String getTheme() {             
122
                return theme;
123
        }
124
 
125
    public String getMenuLayout() {    
126
        if(this.menuLayout.equals("static"))
127
            return "menu-layout-static";
128
        else if(this.menuLayout.equals("overlay"))
129
            return "menu-layout-overlay";
130
        else if(this.menuLayout.equals("horizontal"))
131
            return "menu-layout-static menu-layout-horizontal";
132
        else
133
            return "menu-layout-static";
134
    }
135
 
136
        public void setTheme(String theme) {
137
                this.theme = theme;
138
        }
139
 
140
    public void setMenuLayout(String menuLayout) {
141
        this.menuLayout = menuLayout;
142
    }
143
 
144
    public Map getThemeColors() {
145
        return this.themeColors;
146
    }
147
         */
148
}