diff --git a/account-ui/pom.xml b/account-ui/pom.xml index fef414d..077fa69 100644 --- a/account-ui/pom.xml +++ b/account-ui/pom.xml @@ -1,149 +1,149 @@ - - - 4.0.0 - - shared - de.muehlencord - 1.1-SNAPSHOT - - - de.muehlencord.shared - shared-account-ui - war - - shared-account-ui - - - UTF-8 - ${maven.build.timestamp} - 143a2bd3-7e0b-4162-a76e-3031331c7dfe - 10 - 10 - - - development - - - - - org.primefaces - primefaces - - - - com.github.adminfaces - admin-template - 1.0.0-RC19 - - - - org.omnifaces - omnifaces - 3.2 - - - - org.apache.shiro - shiro-core - - - org.apache.shiro - shiro-web - - - de.muehlencord.shared - shared-shiro-faces - 1.1-SNAPSHOT - - - de.muehlencord.shared - shared-account - 1.1-SNAPSHOT - - - de.muehlencord.shared - shared-util - 1.1-SNAPSHOT - - - de.muehlencord.shared - shared-jeeutil - 1.1-SNAPSHOT - - - de.muehlencord.sf - filter - 1.0 - - - javax - javaee-web-api - 7.0 - provided - - - - - - ${basedir}/src/main/filters/${filter.name}.properties - - - - - - src/main/resources - true - - **/*.properties - **/*.xml - - - - - account - - - org.apache.maven.plugins - maven-compiler-plugin - - 10 - 10 - - - - org.apache.maven.plugins - maven-war-plugin - 3.2.2 - - false - - - ${basedir}/src/main/webapp - true - - WEB-INF/web.xml - WEB-INF/shiro.ini - - - - - - - - - - - development - - development - - - - - production - - production - - - - + + + 4.0.0 + + shared + de.muehlencord + 1.1-SNAPSHOT + + + de.muehlencord.shared + shared-account-ui + war + + shared-account-ui + + + UTF-8 + ${maven.build.timestamp} + 143a2bd3-7e0b-4162-a76e-3031331c7dfe + 10 + 10 + + + development + + + + + org.primefaces + primefaces + + + + com.github.adminfaces + admin-template + 1.0.0-RC19 + + + + org.omnifaces + omnifaces + 3.2 + + + + org.apache.shiro + shiro-core + + + org.apache.shiro + shiro-web + + + de.muehlencord.shared + shared-shiro-faces + 1.1-SNAPSHOT + + + de.muehlencord.shared + shared-account + 1.1-SNAPSHOT + + + de.muehlencord.shared + shared-util + 1.1-SNAPSHOT + + + de.muehlencord.shared + shared-jeeutil + 1.1-SNAPSHOT + + + de.muehlencord.sf + filter + 1.1-SNAPSHOT + + + javax + javaee-web-api + 7.0 + provided + + + + + + ${basedir}/src/main/filters/${filter.name}.properties + + + + + + src/main/resources + true + + **/*.properties + **/*.xml + + + + + account + + + org.apache.maven.plugins + maven-compiler-plugin + + 10 + 10 + + + + org.apache.maven.plugins + maven-war-plugin + 3.2.2 + + false + + + ${basedir}/src/main/webapp + true + + WEB-INF/web.xml + WEB-INF/shiro.ini + + + + + + + + + + + development + + development + + + + + production + + production + + + + diff --git a/account-ui/src/main/java/de/muehlencord/shared/account/web/presentation/InstanceView.java b/account-ui/src/main/java/de/muehlencord/shared/account/web/presentation/InstanceView.java index 9d99cdc..193ba72 100644 --- a/account-ui/src/main/java/de/muehlencord/shared/account/web/presentation/InstanceView.java +++ b/account-ui/src/main/java/de/muehlencord/shared/account/web/presentation/InstanceView.java @@ -1,46 +1,47 @@ -package de.muehlencord.shared.account.web.presentation; - -import de.muehlencord.shared.account.business.config.boundary.ConfigService; -import de.muehlencord.shared.account.business.config.entity.ConfigException; -import javax.ejb.EJB; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Named; -import org.slf4j.LoggerFactory; - -/** - * - * @author Joern Muehlencord - */ -@Named(value = "instanceView") -@ApplicationScoped -public class InstanceView { - - private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(InstanceView.class); - - @EJB - ConfigService configService; - - public boolean isDevelopmentVersion() { - String instanceName = getInstanceName(); - return !instanceName.equals("Production"); - } - - public String getInstanceName() { - String instanceName; - try { - instanceName = configService.getConfigValue("base.instance"); - } catch (ConfigException ex) { - if (LOGGER.isDebugEnabled()) { - LOGGER.debug(ex.toString(), ex); - } else { - LOGGER.error(ex.toString()); - } - instanceName = "unknown (" + ex.toString() + ")"; - } - if (instanceName == null) { - return "unknown"; - } else { - return instanceName; - } - } -} +package de.muehlencord.shared.account.web.presentation; + +import de.muehlencord.shared.account.business.config.boundary.ConfigService; +import de.muehlencord.shared.account.business.config.entity.ConfigException; +import javax.ejb.EJB; +import javax.enterprise.context.ApplicationScoped; +import javax.inject.Named; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * TODO - move to shared-account and remove from all applications and archetype + * @author Joern Muehlencord + */ +@Named(value = "instanceView") +@ApplicationScoped +public class InstanceView { + + private static final Logger LOGGER = LoggerFactory.getLogger(InstanceView.class); + + @EJB + ConfigService configService; + + public boolean isDevelopmentVersion() { + String instanceName = getInstanceName(); + return !instanceName.equals("Production"); + } + + public String getInstanceName() { + String instanceName; + try { + instanceName = configService.getConfigValue("base.instance"); + } catch (ConfigException ex) { + if (LOGGER.isDebugEnabled()) { + LOGGER.debug(ex.toString(), ex); + } else { + LOGGER.error(ex.toString()); + } + instanceName = "unknown (" + ex.toString() + ")"; + } + if (instanceName == null) { + return "unknown"; + } else { + return instanceName; + } + } +} diff --git a/shiro-faces/pom.xml b/shiro-faces/pom.xml index 3b74a4b..2f70325 100644 --- a/shiro-faces/pom.xml +++ b/shiro-faces/pom.xml @@ -32,6 +32,7 @@ javax javaee-api + provided