Rev 245 |
Blame |
Compare with Previous |
Last modification |
View Log
| Download
| RSS feed
/*
* Copyright 2009-2014 PrimeTek.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package br.com.ec.controller;
import java.io.Serializable;
import javax.inject.Named;
import org.springframework.context.annotation.Scope;
import br.com.ec.web.exception.VerificadorLancamentoException;
import br.com.ec.web.exception.VerificadorLancamentoException.CommandBean;
import br.com.ec.web.message.LancadorMensagem;
@Named
@Scope
("session")
public class GuestPreferences
implements Serializable {
private String inputStyleClass =
"";
private String topbarTheme =
"light";
private String menuTheme =
"dim";
private String menuMode =
"";
private String darkMode =
"light";
private String componentTheme =
"";
private boolean orientationRTL =
false;
public GuestPreferences
() {}
public String getInputStyleClass
() {
return inputStyleClass
;
}
public void setInputStyleClass
(String inputStyleClass
) {
this.
inputStyleClass = inputStyleClass
;
}
public String getTopbarTheme
() {
return topbarTheme
;
}
public void setTopbarTheme
(String topbarTheme
) {
this.
topbarTheme = topbarTheme
;
}
public String getMenuTheme
() {
return menuTheme
;
}
public void setMenuTheme
(String menuTheme
) {
this.
menuTheme = menuTheme
;
}
public String getMenuMode
() {
return menuMode
;
}
public void setMenuMode
(String menuMode
) {
this.
menuMode = menuMode
;
}
public String getDarkMode
() {
return darkMode
;
}
public void setDarkMode
(String darkMode
) {
this.
darkMode = darkMode
;
}
public boolean isOrientationRTL
() {
return orientationRTL
;
}
public void setOrientationRTL
(boolean orientationRTL
) {
this.
orientationRTL = orientationRTL
;
}
public String getComponentTheme
() {
return componentTheme
;
}
public void setComponentTheme
(String componentTheme
) {
this.
componentTheme = componentTheme
;
}
public void confirmarMudancas
() {
new VerificadorLancamentoException
().
tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean
() {
public void execute
() {
LancadorMensagem.
lancarSucessoRedirecionandoTela("CONFIGURAÇÃO ALTERARA!",
"/sistema/configuracoes.xhtml");
}
});
}
/*
private Map<String,String> themeColors;
private String theme = "blue";
private String menuLayout = "static";
@PostConstruct
public void init() {
themeColors = new HashMap<String,String>();
themeColors.put("turquoise", "#00acac");
themeColors.put("blue", "#2f8ee5");
themeColors.put("orange", "#efa64c");
themeColors.put("purple", "#6c76af");
themeColors.put("pink", "#f16383");
themeColors.put("light-blue", "#63c9f1");
themeColors.put("green", "#57c279");
themeColors.put("deep-purple", "#7e57c2");
}
public String getTopbarTheme() {
return "light";
}
public String getTheme() {
return theme;
}
public String getMenuLayout() {
if(this.menuLayout.equals("static"))
return "menu-layout-static";
else if(this.menuLayout.equals("overlay"))
return "menu-layout-overlay";
else if(this.menuLayout.equals("horizontal"))
return "menu-layout-static menu-layout-horizontal";
else
return "menu-layout-static";
}
public void setTheme(String theme) {
this.theme = theme;
}
public void setMenuLayout(String menuLayout) {
this.menuLayout = menuLayout;
}
public Map getThemeColors() {
return this.themeColors;
}
*/
}