From 99c93dbc0c019d976217bd6399138c44837fa5ce Mon Sep 17 00:00:00 2001 From: Willem Cazander Date: Tue, 3 Jan 2012 02:49:12 +0100 Subject: [PATCH] init commit logstats bsd source --- .gitignore | 42 ++ .project | 2 +- logstats-ear/.classpath | 6 + logstats-ear/.project | 29 + .../org.eclipse.core.resources.prefs | 3 + .../.settings/org.eclipse.jdt.core.prefs | 13 + .../.settings/org.eclipse.m2e.core.prefs | 5 + .../.settings/org.maven.ide.eclipse.prefs | 9 + .../.settings/org.maven.ide.eclipse.wtp.prefs | 3 + logstats-ear/pom.xml | 185 ++++++ logstats-ejb/.classpath | 15 + logstats-ejb/.project | 36 ++ .../org.eclipse.core.resources.prefs | 7 + .../.settings/org.eclipse.jdt.core.prefs | 13 + .../.settings/org.eclipse.m2e.core.prefs | 5 + .../.settings/org.maven.ide.eclipse.prefs | 9 + logstats-ejb/pom.xml | 92 +++ .../logstats/ejb/jobs/UpdateIndexJob.java | 437 ++++++++++++++ .../ejb/models/AbstractEntityBase.java | 110 ++++ .../ejb/models/AbstractFieldTemplates.java | 109 ++++ .../logstats/ejb/models/LogData.java | 158 +++++ .../logstats/ejb/models/LogHost.java | 127 +++++ .../logstats/ejb/models/LogHostGroup.java | 104 ++++ .../logstats/ejb/models/LogLevel.java | 138 +++++ .../logstats/ejb/models/LogRightRole.java | 108 ++++ .../logstats/ejb/models/LogServerRun.java | 122 ++++ .../logstats/ejb/models/LogSource.java | 106 ++++ .../logstats/ejb/models/LogStats.java | 320 +++++++++++ .../logstats/ejb/models/LogUser.java | 173 ++++++ .../logstats/ejb/models/LogUserRightRole.java | 133 +++++ .../logstats/ejb/models/LogUserSetting.java | 164 ++++++ .../logstats/ejb/models/LogValue.java | 143 +++++ .../logstats/ejb/models/LogValueLine.java | 284 +++++++++ .../logstats/ejb/models/LogValueType.java | 128 +++++ .../logstats/ejb/services/LoginManager.java | 151 +++++ .../ejb/services/LoginManagerRemote.java | 49 ++ .../logstats/ejb/services/ServerManager.java | 82 +++ .../ejb/services/ServerManagerRemote.java | 52 ++ .../src/main/resources/META-INF/ejb-jar.xml | 5 + .../src/main/resources/META-INF/jboss.xml | 26 + .../main/resources/META-INF/persistence.xml | 23 + .../src/main/resources/META-INF/vasc-ejb3.xml | 11 + .../resources/META-INF/xtes-xpql-ejb3.xml | 9 + .../i18n/LogstatsBundleEJB_en.properties | 173 ++++++ .../i18n/LogstatsBundleEJB_nl.properties | 174 ++++++ .../logstats/resources/vasc/logstats.xml | 142 +++++ .../logstats/resources/xpql/logstats.xml | 117 ++++ .../logstats/ejb/models/I18nTests.java | 222 ++++++++ logstats-jboss-sar/.classpath | 11 + logstats-jboss-sar/.project | 23 + .../org.eclipse.core.resources.prefs | 7 + .../.settings/org.eclipse.jdt.core.prefs | 6 + .../.settings/org.eclipse.m2e.core.prefs | 5 + .../.settings/org.maven.ide.eclipse.prefs | 9 + logstats-jboss-sar/pom.xml | 27 + .../jboss/log4j/DataSourceLog4jAppender.java | 67 +++ .../log4j/DataSourceLogPersistThread.java | 222 ++++++++ .../jboss/log4j/DataSourceLogService.java | 433 ++++++++++++++ .../log4j/DataSourceLogServiceMBean.java | 198 +++++++ .../main/resources/META-INF/jboss-service.xml | 54 ++ .../src/main/resources/META-INF/log4j.dtd | 166 ++++++ .../resources/META-INF/logstats-log4j.xml | 13 + logstats-war/.classpath | 16 + logstats-war/.project | 42 ++ logstats-war/.settings/.jsdtscope | 12 + .../org.eclipse.core.resources.prefs | 8 + .../.settings/org.eclipse.jdt.core.prefs | 13 + .../.settings/org.eclipse.m2e.core.prefs | 5 + ...rg.eclipse.wst.jsdt.ui.superType.container | 1 + .../org.eclipse.wst.jsdt.ui.superType.name | 1 + .../.settings/org.maven.ide.eclipse.prefs | 9 + logstats-war/pom.xml | 158 +++++ .../web/beans/RealTimeController.java | 235 ++++++++ .../logstats/web/beans/UserController.java | 76 +++ .../web/beans/VascFacesController.java | 62 ++ .../logstats/web/filters/UserFilter.java | 104 ++++ .../META-INF/skins/logstats.skin.properties | 73 +++ .../i18n/LogstatsBundleWAR_en.properties | 82 +++ .../i18n/LogstatsBundleWAR_nl.properties | 82 +++ .../src/main/webapp/WEB-INF/faces.xml | 47 ++ .../src/main/webapp/WEB-INF/jboss-web.xml | 9 + logstats-war/src/main/webapp/WEB-INF/web.xml | 203 +++++++ .../src/main/webapp/css/ie6_fixes.css | 8 + .../src/main/webapp/css/ie7_fixes.css | 8 + .../src/main/webapp/css/ie8_fixes.css | 4 + logstats-war/src/main/webapp/css/site.css | 538 ++++++++++++++++++ .../src/main/webapp/img/icon_download.png | Bin 0 -> 175 bytes .../src/main/webapp/img/icon_print.png | Bin 0 -> 172 bytes .../src/main/webapp/img/logstats-logo.png | Bin 0 -> 15551 bytes .../src/main/webapp/jsp/admin/index.xhtml | 22 + logstats-war/src/main/webapp/jsp/help.xhtml | 10 + .../webapp/jsp/includes/index-pulic.xhtml | 15 + .../main/webapp/jsp/includes/index-user.xhtml | 16 + .../src/main/webapp/jsp/includes/layout.xhtml | 71 +++ .../webapp/jsp/includes/vasc-template.xhtml | 318 +++++++++++ .../webapp/jsp/includes/wiki-template.xhtml | 10 + logstats-war/src/main/webapp/jsp/index.xhtml | 20 + .../src/main/webapp/jsp/index_jsp.jsp | 2 + .../main/webapp/jsp/login/login-error.xhtml | 11 + .../main/webapp/jsp/login/login-forgot.xhtml | 11 + .../src/main/webapp/jsp/login/login.xhtml | 23 + .../src/main/webapp/jsp/login/logout.xhtml | 11 + .../src/main/webapp/jsp/realtime.xhtml | 56 ++ .../src/main/webapp/jsp/reports.xhtml | 10 + pom.xml | 206 +++++++ 105 files changed, 8422 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 logstats-ear/.classpath create mode 100644 logstats-ear/.project create mode 100644 logstats-ear/.settings/org.eclipse.core.resources.prefs create mode 100644 logstats-ear/.settings/org.eclipse.jdt.core.prefs create mode 100644 logstats-ear/.settings/org.eclipse.m2e.core.prefs create mode 100644 logstats-ear/.settings/org.maven.ide.eclipse.prefs create mode 100644 logstats-ear/.settings/org.maven.ide.eclipse.wtp.prefs create mode 100644 logstats-ear/pom.xml create mode 100644 logstats-ejb/.classpath create mode 100644 logstats-ejb/.project create mode 100644 logstats-ejb/.settings/org.eclipse.core.resources.prefs create mode 100644 logstats-ejb/.settings/org.eclipse.jdt.core.prefs create mode 100644 logstats-ejb/.settings/org.eclipse.m2e.core.prefs create mode 100644 logstats-ejb/.settings/org.maven.ide.eclipse.prefs create mode 100644 logstats-ejb/pom.xml create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/jobs/UpdateIndexJob.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/AbstractEntityBase.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/AbstractFieldTemplates.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogData.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogHost.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogHostGroup.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogLevel.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogRightRole.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogServerRun.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogSource.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogStats.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogUser.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogUserRightRole.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogUserSetting.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogValue.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogValueLine.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogValueType.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/services/LoginManager.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/services/LoginManagerRemote.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/services/ServerManager.java create mode 100644 logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/services/ServerManagerRemote.java create mode 100644 logstats-ejb/src/main/resources/META-INF/ejb-jar.xml create mode 100644 logstats-ejb/src/main/resources/META-INF/jboss.xml create mode 100644 logstats-ejb/src/main/resources/META-INF/persistence.xml create mode 100644 logstats-ejb/src/main/resources/META-INF/vasc-ejb3.xml create mode 100644 logstats-ejb/src/main/resources/META-INF/xtes-xpql-ejb3.xml create mode 100644 logstats-ejb/src/main/resources/net/forwardfire/logstats/resources/i18n/LogstatsBundleEJB_en.properties create mode 100644 logstats-ejb/src/main/resources/net/forwardfire/logstats/resources/i18n/LogstatsBundleEJB_nl.properties create mode 100644 logstats-ejb/src/main/resources/net/forwardfire/logstats/resources/vasc/logstats.xml create mode 100644 logstats-ejb/src/main/resources/net/forwardfire/logstats/resources/xpql/logstats.xml create mode 100644 logstats-ejb/src/test/java/net/forwardfire/logstats/ejb/models/I18nTests.java create mode 100644 logstats-jboss-sar/.classpath create mode 100644 logstats-jboss-sar/.project create mode 100644 logstats-jboss-sar/.settings/org.eclipse.core.resources.prefs create mode 100644 logstats-jboss-sar/.settings/org.eclipse.jdt.core.prefs create mode 100644 logstats-jboss-sar/.settings/org.eclipse.m2e.core.prefs create mode 100644 logstats-jboss-sar/.settings/org.maven.ide.eclipse.prefs create mode 100644 logstats-jboss-sar/pom.xml create mode 100644 logstats-jboss-sar/src/main/java/net/forwardfire/logstats/jboss/log4j/DataSourceLog4jAppender.java create mode 100644 logstats-jboss-sar/src/main/java/net/forwardfire/logstats/jboss/log4j/DataSourceLogPersistThread.java create mode 100644 logstats-jboss-sar/src/main/java/net/forwardfire/logstats/jboss/log4j/DataSourceLogService.java create mode 100644 logstats-jboss-sar/src/main/java/net/forwardfire/logstats/jboss/log4j/DataSourceLogServiceMBean.java create mode 100644 logstats-jboss-sar/src/main/resources/META-INF/jboss-service.xml create mode 100644 logstats-jboss-sar/src/main/resources/META-INF/log4j.dtd create mode 100644 logstats-jboss-sar/src/main/resources/META-INF/logstats-log4j.xml create mode 100644 logstats-war/.classpath create mode 100644 logstats-war/.project create mode 100644 logstats-war/.settings/.jsdtscope create mode 100644 logstats-war/.settings/org.eclipse.core.resources.prefs create mode 100644 logstats-war/.settings/org.eclipse.jdt.core.prefs create mode 100644 logstats-war/.settings/org.eclipse.m2e.core.prefs create mode 100644 logstats-war/.settings/org.eclipse.wst.jsdt.ui.superType.container create mode 100644 logstats-war/.settings/org.eclipse.wst.jsdt.ui.superType.name create mode 100644 logstats-war/.settings/org.maven.ide.eclipse.prefs create mode 100644 logstats-war/pom.xml create mode 100644 logstats-war/src/main/java/net/forwardfire/logstats/web/beans/RealTimeController.java create mode 100644 logstats-war/src/main/java/net/forwardfire/logstats/web/beans/UserController.java create mode 100644 logstats-war/src/main/java/net/forwardfire/logstats/web/beans/VascFacesController.java create mode 100644 logstats-war/src/main/java/net/forwardfire/logstats/web/filters/UserFilter.java create mode 100644 logstats-war/src/main/resources/META-INF/skins/logstats.skin.properties create mode 100644 logstats-war/src/main/resources/net/forwardfire/logstats/resources/i18n/LogstatsBundleWAR_en.properties create mode 100644 logstats-war/src/main/resources/net/forwardfire/logstats/resources/i18n/LogstatsBundleWAR_nl.properties create mode 100644 logstats-war/src/main/webapp/WEB-INF/faces.xml create mode 100644 logstats-war/src/main/webapp/WEB-INF/jboss-web.xml create mode 100644 logstats-war/src/main/webapp/WEB-INF/web.xml create mode 100644 logstats-war/src/main/webapp/css/ie6_fixes.css create mode 100644 logstats-war/src/main/webapp/css/ie7_fixes.css create mode 100644 logstats-war/src/main/webapp/css/ie8_fixes.css create mode 100644 logstats-war/src/main/webapp/css/site.css create mode 100644 logstats-war/src/main/webapp/img/icon_download.png create mode 100644 logstats-war/src/main/webapp/img/icon_print.png create mode 100644 logstats-war/src/main/webapp/img/logstats-logo.png create mode 100644 logstats-war/src/main/webapp/jsp/admin/index.xhtml create mode 100644 logstats-war/src/main/webapp/jsp/help.xhtml create mode 100644 logstats-war/src/main/webapp/jsp/includes/index-pulic.xhtml create mode 100644 logstats-war/src/main/webapp/jsp/includes/index-user.xhtml create mode 100644 logstats-war/src/main/webapp/jsp/includes/layout.xhtml create mode 100644 logstats-war/src/main/webapp/jsp/includes/vasc-template.xhtml create mode 100644 logstats-war/src/main/webapp/jsp/includes/wiki-template.xhtml create mode 100644 logstats-war/src/main/webapp/jsp/index.xhtml create mode 100644 logstats-war/src/main/webapp/jsp/index_jsp.jsp create mode 100644 logstats-war/src/main/webapp/jsp/login/login-error.xhtml create mode 100644 logstats-war/src/main/webapp/jsp/login/login-forgot.xhtml create mode 100644 logstats-war/src/main/webapp/jsp/login/login.xhtml create mode 100644 logstats-war/src/main/webapp/jsp/login/logout.xhtml create mode 100644 logstats-war/src/main/webapp/jsp/realtime.xhtml create mode 100644 logstats-war/src/main/webapp/jsp/reports.xhtml create mode 100644 pom.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dc955ab --- /dev/null +++ b/.gitignore @@ -0,0 +1,42 @@ +# +# Ignore some files in the logstats project. +# + +# Ignore all maven target directories +/target +*/target +*/*/target +*/*/*/target + +# Ignore leftovers of really failed release build +release.properties +pom.xml.next +pom.xml.releaseBackup +pom.xml.backup +pom.xml.branch +pom.xml.tag +# Ignore version plugin backup +pom.xml.versionsBackup + + +# Ignore C/java/images binary files +*.o +*.hex +*.dat +*.bmp +*.gif +*.pdf + +# Ignore netbeans directory +nbproject + +# Ignore mac finder files +.DS_Store + +# Ignore windows files. +Thumbs.db +Desktop.ini + +# Ignore auto eclipse plugins settings +org.eclipse.wst.common.component +org.eclipse.wst.common.project.facet.core.xml diff --git a/.project b/.project index fbec084..e76b6dc 100644 --- a/.project +++ b/.project @@ -1,6 +1,6 @@ - logstats-base + logstats diff --git a/logstats-ear/.classpath b/logstats-ear/.classpath new file mode 100644 index 0000000..3f62785 --- /dev/null +++ b/logstats-ear/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/logstats-ear/.project b/logstats-ear/.project new file mode 100644 index 0000000..9dd2202 --- /dev/null +++ b/logstats-ear/.project @@ -0,0 +1,29 @@ + + + logstats-ear + + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.common.modulecore.ModuleCoreNature + + diff --git a/logstats-ear/.settings/org.eclipse.core.resources.prefs b/logstats-ear/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..a28d758 --- /dev/null +++ b/logstats-ear/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +#Mon Jan 02 23:18:50 CET 2012 +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/logstats-ear/.settings/org.eclipse.jdt.core.prefs b/logstats-ear/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..657554d --- /dev/null +++ b/logstats-ear/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,13 @@ +#Thu Jun 10 02:50:42 CEST 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.4 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.4 diff --git a/logstats-ear/.settings/org.eclipse.m2e.core.prefs b/logstats-ear/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..bf4333d --- /dev/null +++ b/logstats-ear/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,5 @@ +#Mon Jan 02 23:18:47 CET 2012 +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/logstats-ear/.settings/org.maven.ide.eclipse.prefs b/logstats-ear/.settings/org.maven.ide.eclipse.prefs new file mode 100644 index 0000000..6903895 --- /dev/null +++ b/logstats-ear/.settings/org.maven.ide.eclipse.prefs @@ -0,0 +1,9 @@ +#Wed Jun 09 21:35:29 CEST 2010 +activeProfiles= +eclipse.preferences.version=1 +fullBuildGoals=process-test-resources +includeModules=false +resolveWorkspaceProjects=true +resourceFilterGoals=process-resources resources\:testResources +skipCompilerPlugin=true +version=1 diff --git a/logstats-ear/.settings/org.maven.ide.eclipse.wtp.prefs b/logstats-ear/.settings/org.maven.ide.eclipse.wtp.prefs new file mode 100644 index 0000000..013bc07 --- /dev/null +++ b/logstats-ear/.settings/org.maven.ide.eclipse.wtp.prefs @@ -0,0 +1,3 @@ +#Tue Jan 03 00:48:11 CET 2012 +eclipse.preferences.version=1 +org.maven.ide.eclipse.wtp.enabledProjectSpecificPrefs=false diff --git a/logstats-ear/pom.xml b/logstats-ear/pom.xml new file mode 100644 index 0000000..f291646 --- /dev/null +++ b/logstats-ear/pom.xml @@ -0,0 +1,185 @@ + + 4.0.0 + + logstats + net.forwardfire.logstats + 0.0.1-SNAPSHOT + + logstats-ear + ear + logstats-ear + logstats-ear + + logstats-jboss + + + maven-ear-plugin + + true + + + + + + com.sun.facelets + jsf-facelets + true + + + net.forwardfire.logstats + logstats-ejb + + + net.forwardfire.logstats + logstats-war + /logstats + + + + org.x4o + x4o-core + true + + + net.forwardfire.vasc + vasc-core + true + + + net.forwardfire.vasc + vasc-backend-jpa + true + + + net.forwardfire.vasc + vasc-xpql-ejb3 + + + net.forwardfire.vasc + vasc-ejb3 + + + net.forwardfire.vasc + vasc-xpql + true + + + + + + + + + + + + + net.forwardfire.logstats + logstats-ejb + ejb + ${project.version} + + + net.forwardfire.logstats + logstats-war + war + ${project.version} + + + + com.sun.facelets + jsf-facelets + 1.1.11 + + + + + org.x4o + x4o-core + ${x4o-core.version} + + + + + net.forwardfire.vasc + vasc-backend-jpa + ${vasc.version} + + + + + net.forwardfire.vasc + vasc-xpql-ejb3 + ${vasc.version} + ejb + + + net.forwardfire.vasc + vasc-ejb3 + ${vasc.version} + ejb + + + + + + + javax.el + el-ri + 1.2 + provided + + + + javax.el + el-api + 1.2 + provided + + + + \ No newline at end of file diff --git a/logstats-ejb/.classpath b/logstats-ejb/.classpath new file mode 100644 index 0000000..0b58ddc --- /dev/null +++ b/logstats-ejb/.classpath @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/logstats-ejb/.project b/logstats-ejb/.project new file mode 100644 index 0000000..a1b1928 --- /dev/null +++ b/logstats-ejb/.project @@ -0,0 +1,36 @@ + + + logstats-ejb + + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.m2e.core.maven2Nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.common.project.facet.core.nature + + diff --git a/logstats-ejb/.settings/org.eclipse.core.resources.prefs b/logstats-ejb/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..9d17326 --- /dev/null +++ b/logstats-ejb/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,7 @@ +#Mon Jan 02 23:18:50 CET 2012 +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding//src/test/resources=UTF-8 +encoding/=UTF-8 diff --git a/logstats-ejb/.settings/org.eclipse.jdt.core.prefs b/logstats-ejb/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3d0c4d7 --- /dev/null +++ b/logstats-ejb/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,13 @@ +#Mon Jun 14 01:44:40 CEST 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/logstats-ejb/.settings/org.eclipse.m2e.core.prefs b/logstats-ejb/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..bf4333d --- /dev/null +++ b/logstats-ejb/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,5 @@ +#Mon Jan 02 23:18:47 CET 2012 +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/logstats-ejb/.settings/org.maven.ide.eclipse.prefs b/logstats-ejb/.settings/org.maven.ide.eclipse.prefs new file mode 100644 index 0000000..e3484c2 --- /dev/null +++ b/logstats-ejb/.settings/org.maven.ide.eclipse.prefs @@ -0,0 +1,9 @@ +#Wed Jun 09 21:36:34 CEST 2010 +activeProfiles= +eclipse.preferences.version=1 +fullBuildGoals=process-test-resources +includeModules=false +resolveWorkspaceProjects=true +resourceFilterGoals=process-resources resources\:testResources +skipCompilerPlugin=true +version=1 diff --git a/logstats-ejb/pom.xml b/logstats-ejb/pom.xml new file mode 100644 index 0000000..3a9fb51 --- /dev/null +++ b/logstats-ejb/pom.xml @@ -0,0 +1,92 @@ + + 4.0.0 + + logstats + net.forwardfire.logstats + 0.0.1-SNAPSHOT + + logstats-ejb + ejb + logstats-ejb + logstats-ejb + + + + org.apache.maven.plugins + maven-ejb-plugin + + 3.0 + + + + + + + javax.ejb + ejb-api + 3.0 + provided + + + javax.persistence + persistence-api + 1.0 + provided + + + org.hibernate + hibernate-annotations + 3.4.0.GA + provided + + + + + org.x4o + x4o-core + ${x4o-core.version} + provided + + + + javax.el + el-ri + 1.2 + provided + + + + javax.el + el-api + 1.2 + provided + + + + + net.forwardfire.vasc + vasc-backend-jpa + ${vasc.version} + provided + + + net.forwardfire.vasc + vasc-xpql-ejb3 + ${vasc.version} + + + net.forwardfire.vasc + vasc-ejb3 + ${vasc.version} + + + + + opensymphony + quartz + 1.6.3 + provided + + + + \ No newline at end of file diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/jobs/UpdateIndexJob.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/jobs/UpdateIndexJob.java new file mode 100644 index 0000000..90a291c --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/jobs/UpdateIndexJob.java @@ -0,0 +1,437 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.jobs; + +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Queue; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.logging.Logger; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.annotation.Resource; +import javax.ejb.ActivationConfigProperty; +import javax.ejb.EJB; +import javax.ejb.MessageDriven; +import javax.ejb.TransactionManagement; +import javax.ejb.TransactionManagementType; +import javax.persistence.EntityManager; +import javax.persistence.NoResultException; +import javax.persistence.PersistenceContext; +import javax.transaction.NotSupportedException; +import javax.transaction.SystemException; +import javax.transaction.UserTransaction; + +//import org.jboss.annotation.ejb.ResourceAdapter; +//import org.jboss.ejb3.annotation.ResourceAdapter; +import net.forwardfire.logstats.ejb.models.LogData; +import net.forwardfire.logstats.ejb.models.LogHost; +import net.forwardfire.logstats.ejb.models.LogLevel; +import net.forwardfire.logstats.ejb.models.LogServerRun; +import net.forwardfire.logstats.ejb.models.LogSource; +import net.forwardfire.logstats.ejb.models.LogStats; +import net.forwardfire.logstats.ejb.models.LogValueLine; +import net.forwardfire.logstats.ejb.models.LogValueType; + +import org.quartz.InterruptableJob; +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; +import org.quartz.UnableToInterruptJobException; + +import net.forwardfire.vasc.xpql.XPQLParser; +import net.forwardfire.vasc.xpql.ejb3.XpqlQueryManager; +import net.forwardfire.vasc.xpql.query.Query; + +/** + * 1.0 03 Aug 2007 + * + * A "Cron-Expression" is a string comprised of 6 or 7 fields separated by white space. The 6 mandatory and 1 optional fields are as follows: + * FIELD NAME ALLOWED VALUES ALLOWED SPECIAL CHARACTERS + * Seconds 0-59 , - * / + * Minutes 0-59 , - * / + * Hours 0-23 , - * / + * Day-of-month 1-31 , - * ? / L W C + * Month 1-12 or JAN-DEC , - * / + * Day-of-Week 1-7 or SUN-SAT , - * ? / L C # + * Year (Optional) empty, 1970-2099 , - * / + * + * MORE INFO: http://quartz.sourceforge.net/javadoc/org/quartz/CronTrigger.html + * + * + * + * @author Willem Cazander + * @version 1.0 Sep 13, 2007 + */ +@MessageDriven( + messageListenerInterface=Job.class, + activationConfig = { + @ActivationConfigProperty(propertyName = "cronTrigger", propertyValue = "13 */2 * * * ?"), + @ActivationConfigProperty(propertyName = "jobName", propertyValue = "UpdateIndexJob"), + @ActivationConfigProperty(propertyName = "jobGroup", propertyValue = "system") +}) +//@ResourceAdapter("quartz-ra.rar") +@TransactionManagement(TransactionManagementType.BEAN) +public class UpdateIndexJob implements InterruptableJob { + + private Logger logger = Logger.getLogger(UpdateIndexJob.class.getName()); + + @EJB(beanInterface=XpqlQueryManager.IRemote.class) + private XpqlQueryManager xtesManager; + + @PersistenceContext + private EntityManager entityManager; + + @Resource + private UserTransaction utx; + + private static boolean running = false; + + private int count = 0; + + private volatile boolean interrupted = false; + + static public Queue logDataRealtime = new LinkedBlockingQueue(); + + /** + * @see org.quartz.InterruptableJob#interrupt() + */ + public void interrupt() throws UnableToInterruptJobException { + interrupted=true; + logger.info("Job interrupted"); + } + + public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { + logger.info("executing UpdateIndexJob job"); + long startTime = System.currentTimeMillis(); + + if (running) { + //serverLogManager.logMessage(UpdateIndexJob,"UpdateIndexJob is already running."); + return; + } + try { + running=true; + + long startDate = System.currentTimeMillis(); + long lastId = 0l; + try { + LogServerRun last = (LogServerRun)xtesManager.executeObject("LogServerRun.getLast", null); + lastId = last.getLastDataId(); + } catch (NoResultException nre) { + // first run on this DB + } + + // cache some lists for 5min + List logValueLines = (List)xtesManager.execute("LogValueLine.getAllIndexActive",null); + List logHosts = (List)xtesManager.execute("LogHost.getAll",null); + List logSources = (List)xtesManager.execute("LogSource.getAll",null); + List lineData = prepareData(logValueLines); + logger.info("Cached data sizes; logValueLines: "+logValueLines.size()+" logHosts: "+logHosts.size()+" logSources: "+logSources.size()+" lineData: "+lineData.size() ); + + if (lineData.isEmpty()) { + return; // no data to match against + } + + // loop until time is over + while (true) { + Query q = xtesManager.getQuery("LogData.getFromId"); + String sql = q.toPreparedSQL(q); + javax.persistence.Query q2 = entityManager.createQuery(sql); + q2.setParameter(1, lastId); + q2.setMaxResults(1000); + List logData = q2.getResultList(); + if (logData.isEmpty()==false) { + logger.info("Got log data size: "+logData.size()); + long lastIdNew = parseLogData(logData,lineData,logHosts,logSources); + if (lastIdNew>0) { + lastId = lastIdNew; + } + } + if (interrupted) { + break; + } + long thisTime = System.currentTimeMillis(); + long diffTime = thisTime-startTime; + long minTime = 100*1000; // stop working just 20sec before next fire !! + if (diffTime>minTime) { + break; + } + Thread.sleep(10*1000); // sleep 10sec before checking again for new records. + } + + LogServerRun thisRun = new LogServerRun(); + thisRun.setLastDataId(lastId); + thisRun.setStartDate(new Date(startDate)); + thisRun.setStopDate(new Date()); + + utx.begin(); + entityManager.persist(thisRun); + utx.commit(); + + } catch (Exception e) { + e.printStackTrace(); + //serverLogManager.logException(e); + } finally { + running=false; + long endTime = System.currentTimeMillis(); + logger.info("UpdateIndexJob done in: "+(endTime-startTime)+" ms updated records: "+count); + //serverLogManager.logMessage(UpdateIndexJob.class,"Total UpdateIndexJob updated: "+count+" in "+(endTime-startTime)+" ms"); + } + + } + + private List prepareData(List logValueLines) throws Exception { + // create logValueLine List + List lines = new ArrayList(logValueLines.size()); + for (LogValueLine line:logValueLines) { + + if (line.getActive()==false) { + continue; + } + // todo: check start/stop date + + // setup data obj + LogValueLineData data = new LogValueLineData(); + data.logStats = new HashMap(100); + data.logValueLine=line; + + String match = line.getMatchRegex(); + if (match.isEmpty()) { + logger.info("Skipped LogValueLine because match regex is empty."); + continue; + } + data.matchPattern = Pattern.compile(match); + + // fill regex + String regex = line.getSplitRegex(); + if (regex.isEmpty()) { + logger.info("Skipped LogValueLine because split regex is empty."); + continue; + } + data.splitPattern = Pattern.compile(regex); + + lines.add(data); + } + + // put already calulated logStats in data obj. + List logStats = (List)xtesManager.execute("LogStats.getLastDay",null); + for (int i=0;i logData,List lines,List logHosts,List logSources) throws Exception { + + logger.info("parseLogData size: "+logData.size()+" lines: "+lines.size()); + // process the raw log data + Long lastId = null; + for (int i=0;itimeNumber) { + stats.setTimeMin(timeNumber); + } + if (stats.getTimeMax()100) { + logDataRealtime.remove(); + } + } + + // save changed stats records. + for (LogValueLineData line:lines) { + utx.begin(); + for (String key:line.logStats.keySet()) { + LogStats stats = line.logStats.get(key); + if (stats.getModifiedDate().getTime()==0l) { + stats.setModifiedDate(new Date()); + entityManager.merge(stats); + count++; + } + } + utx.commit(); + } + + return lastId; + } + + private LogHost findOrCreateLogHost(List logHosts,String hostname) throws Exception { + for (int i=0;i logSources,String source) throws Exception { + for (int i=0;i0) { + valueTime=valueTime.substring(0, msIndex); // remove "ms" from Long + } + return new Integer(valueTime); + } + + private String getString(String[] lineValues,int index) { + try { + return lineValues[index]; + } catch (ArrayIndexOutOfBoundsException e) { + return ""; + } + } + + + class LogValueLineData { + LogValueLine logValueLine = null; + Pattern matchPattern = null; + Pattern splitPattern = null; + Map logStats = null; + } +} diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/AbstractEntityBase.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/AbstractEntityBase.java new file mode 100644 index 0000000..83c134d --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/AbstractEntityBase.java @@ -0,0 +1,110 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.models; + +import java.io.Serializable; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Map; + +import javax.persistence.Id; + +/** + * Base class for all enities + * + * Currenly only implements the overriden equals method. + * On list to do; + * - hashCode + * - 3x date + * + * @author Willem Cazander + * @version 1.0 Aug 08, 2009 + */ +abstract public class AbstractEntityBase implements Serializable { + + /** The serial version ID */ + private static final long serialVersionUID = 10l; + + /** + * static cacheing so it is only scanned one per classloader + */ + static private Map,Method> cachedEntityId = new HashMap,Method>(100); + + /** + * Scannes the class for the "@Id" annotation and caches the result. + * + * @param clazz The class the get the id method for. + * @return The Method to invoke to return the Id of the clazz. + */ + static private Method lookupEntityIdMethod(Class clazz) { + Method entityId = cachedEntityId.get(clazz); + if (entityId!=null) { + return entityId; + } + + // scan class + Method[] methods = clazz.getMethods(); + for (Method method : methods) { + if (method.isAnnotationPresent(Id.class)) { + entityId = method; + break; + } + } + if (entityId==null) { + throw new RuntimeException("Can't equal/hash entity bean with no @Id annotation class: "+clazz); + } + cachedEntityId.put(clazz,entityId); + return entityId; + } + + /** + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if ( obj == null ) { + return false; // false on null + } + if ( this.hashCode() == obj.hashCode() ) { + return true; // true on same object ? + } + if ( obj.getClass() != this.getClass() ) { + return false; // false on other classes incl subclasses ! + } + + Method entityId = lookupEntityIdMethod(this.getClass()); + Object idThis = null; + Object idObj = null; + try { + idThis = entityId.invoke(this, (Object[]) null); + idObj = entityId.invoke(obj, (Object[]) null); + } catch (Exception e) { + throw new RuntimeException(e); + } + if (idThis==null | idObj==null) { + return super.equals(obj); // no id, do super + } + boolean result = idThis.equals(idObj); + return result; + } +} \ No newline at end of file diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/AbstractFieldTemplates.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/AbstractFieldTemplates.java new file mode 100644 index 0000000..fb8dd27 --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/AbstractFieldTemplates.java @@ -0,0 +1,109 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.models; + +import java.util.Date; + +import net.forwardfire.vasc.annotations.VascDefaultValue; +import net.forwardfire.vasc.annotations.VascDisplayName; +import net.forwardfire.vasc.annotations.VascField; +import net.forwardfire.vasc.annotations.VascFieldOrder; +import net.forwardfire.vasc.annotations.VascFieldType; +import net.forwardfire.vasc.annotations.VascI18n; +import net.forwardfire.vasc.annotations.VascPrimaryKey; +import net.forwardfire.vasc.annotations.VascStyle; +import net.forwardfire.vasc.validators.VascObjectNotNull; +import net.forwardfire.vasc.validators.VascStringLength; + +/** + * Template class for common vasc annotations + * + * @author Willem Cazander + * @version 1.0 May 23, 2009 + */ +abstract public class AbstractFieldTemplates { + + /** + * Template for id field. + */ + @VascI18n(name="generic.id.labelText",description="generic.id.toolTipText") + @VascPrimaryKey + @VascStyle(sizeList=50) + @VascFieldOrder(orderIndex=0) + @VascField(create=false,editReadOnly=true) + abstract public Integer getId(); + + /** + * Template for name field. + */ + @VascI18n(name="generic.name.labelText",description="generic.name.toolTipText") + @VascDisplayName + @VascObjectNotNull + @VascStringLength(min=4,max=128) + @VascStyle(sizeList=250,sizeEdit=40) + @VascFieldOrder(orderIndex=1) + abstract public String getName(); + + /** + * Template for description field. + */ + @VascI18n(name="generic.description.labelText",description="generic.description.toolTipText") + @VascFieldType(type="TextAreaField",properties={"editor.columns=40","editor.rows=5"}) + @VascField(list=false) + @VascStringLength(min=8,max=4096) + @VascObjectNotNull + @VascFieldOrder(orderIndex=2) + abstract public String getDescription(); + + /** + * Template for active field. + */ + @VascI18n(name="generic.active.labelText",description="generic.active.toolTipText") + @VascDefaultValue(value="true") + @VascObjectNotNull + @VascFieldOrder(orderIndex=4) + abstract public Boolean getActive(); + + /** + * Template for order number field. + */ + @VascI18n(name="generic.orderNumber.labelText",description="generic.orderNumber.toolTipText") + @VascField(view=false) + abstract public Integer getOrderNumber(); + + /** + * Template for createdDate field. + */ + @VascI18n(name="generic.createdDate.labelText",description="generic.createdDate.toolTipText") + @VascField(create=false,editReadOnly=true) + @VascDefaultValue(value="now()") + abstract public Date getCreatedDate(); + + /** + * Template for modifiedDate field. + */ + @VascI18n(name="generic.modifiedDate.labelText",description="generic.modifiedDate.toolTipText") + @VascField(create=false,editReadOnly=true) + @VascDefaultValue(value="now()") + abstract public Date getModifiedDate(); +} \ No newline at end of file diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogData.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogData.java new file mode 100644 index 0000000..8b6feee --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogData.java @@ -0,0 +1,158 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.models; + +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; +import org.hibernate.annotations.ResultCheckStyle; +import org.hibernate.annotations.SQLInsert; + +import net.forwardfire.vasc.annotations.VascDisplayName; +import net.forwardfire.vasc.annotations.VascFieldTemplate; + +/** + * LogData + * + * @author Willem Cazander + * @version 1.0 Jun 09, 2010 + */ +@Entity +@Table(name = "log_data") +@SequenceGenerator(name="LOG_DATA_ID_SEQ", sequenceName="log_data_global_id_seq",allocationSize=1) +@Cache(usage=CacheConcurrencyStrategy.NONE) +@org.hibernate.annotations.Entity(selectBeforeUpdate=true,dynamicInsert=true,dynamicUpdate=true) +@SQLInsert(sql="SQL GENERATED BY dynamicInsert=true",check=ResultCheckStyle.NONE) +public class LogData extends AbstractEntityBase { + + private static final long serialVersionUID = 10L; + private Long id = null; + private Date logDate = null; + private Integer logLevel = null; + private String hostname = null; + private String source = null; + private String message = null; + + /** + * @return the id + */ + @Id + @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="LOG_DATA_ID_SEQ") + @Column(name="id",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Long getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(Long id) { + this.id = id; + } + + /** + * @return the logDate + */ + @Column(name="log_date",nullable=false) + @VascDisplayName + public Date getLogDate() { + return logDate; + } + + /** + * @param logDate the logDate to set + */ + public void setLogDate(Date logDate) { + this.logDate = logDate; + } + + /** + * @return the logLevel + */ + @Column(name="log_level",nullable=false) + public Integer getLogLevel() { + return logLevel; + } + + /** + * @param logLevel the logLevel to set + */ + public void setLogLevel(Integer logLevel) { + this.logLevel = logLevel; + } + + /** + * @return the hostname + */ + @Column(name="hostname",nullable=false) + public String getHostname() { + return hostname; + } + + /** + * @param hostname the hostname to set + */ + public void setHostname(String hostname) { + this.hostname = hostname; + } + + /** + * @return the source + */ + @Column(name="source",nullable=false) + public String getSource() { + return source; + } + + /** + * @param source the source to set + */ + public void setSource(String source) { + this.source = source; + } + + /** + * @return the message + */ + @Column(name="message",nullable=false) + public String getMessage() { + return message; + } + + /** + * @param message the message to set + */ + public void setMessage(String message) { + this.message = message; + } +} \ No newline at end of file diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogHost.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogHost.java new file mode 100644 index 0000000..f352c83 --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogHost.java @@ -0,0 +1,127 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.models; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToOne; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; + +import net.forwardfire.vasc.annotations.VascDisplayName; +import net.forwardfire.vasc.annotations.VascFieldTemplate; +import net.forwardfire.vasc.annotations.VascModelReference; + +/** + * LogHost + * + * @author Willem Cazander + * @version 1.0 Jun 09, 2010 + */ +@Entity +@Table(name = "log_host") +@SequenceGenerator(name="LOG_HOST_ID_SEQ", sequenceName="log_host_id_seq",allocationSize=1) +@Cache(usage=CacheConcurrencyStrategy.NONE) +public class LogHost extends AbstractEntityBase { + + private static final long serialVersionUID = 10L; + private Integer id = null; + private String hostname = null; + private Boolean active = null; + private LogHostGroup logHostGroup = null; + + /** + * @return the id + */ + @Id + @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="LOG_HOST_ID_SEQ") + @Column(name="id",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Integer getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * @return the hostname + */ + @Column(name="hostname",nullable=false) + @VascDisplayName + public String getHostname() { + return hostname; + } + + /** + * @param hostname the hostname to set + */ + public void setHostname(String hostname) { + this.hostname = hostname; + } + + /** + * @return the active + */ + @Column(name="active",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Boolean getActive() { + return active; + } + + /** + * @param active the active to set + */ + public void setActive(Boolean active) { + this.active = active; + } + + /** + * @return the logHostGroup + */ + @OneToOne(fetch=FetchType.LAZY) + @JoinColumn(name="log_host_group_id",nullable=true) + @VascModelReference + public LogHostGroup getLogHostGroup() { + return logHostGroup; + } + + /** + * @param logHostGroup the logHostGroup to set + */ + public void setLogHostGroup(LogHostGroup logHostGroup) { + this.logHostGroup = logHostGroup; + } +} \ No newline at end of file diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogHostGroup.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogHostGroup.java new file mode 100644 index 0000000..29b6978 --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogHostGroup.java @@ -0,0 +1,104 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.models; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; + +import net.forwardfire.vasc.annotations.VascFieldTemplate; + +/** + * LogHostGroup + * + * @author Willem Cazander + * @version 1.0 Jun 09, 2010 + */ +@Entity +@Table(name = "log_host_group") +@SequenceGenerator(name="LOG_HOST_GROUP_ID_SEQ", sequenceName="log_host_group_id_seq",allocationSize=1) +@Cache(usage=CacheConcurrencyStrategy.NONE) +public class LogHostGroup extends AbstractEntityBase { + + private static final long serialVersionUID = 10L; + private Integer id = null; + private String name = null; + private String description = null; + + /** + * @return the id + */ + @Id + @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="LOG_HOST_GROUP_ID_SEQ") + @Column(name="id",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Integer getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * @return the name + */ + @Column(name="name",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the description + */ + @Column(name="description",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public String getDescription() { + return description; + } + + /** + * @param description the description to set + */ + public void setDescription(String description) { + this.description = description; + } +} \ No newline at end of file diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogLevel.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogLevel.java new file mode 100644 index 0000000..7510299 --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogLevel.java @@ -0,0 +1,138 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.models; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; + +import net.forwardfire.vasc.annotations.VascDisplayName; +import net.forwardfire.vasc.annotations.VascFieldTemplate; + +/** + * LogLevel + * + * @author Willem Cazander + * @version 1.0 Jun 13, 2010 + */ +@Entity +@Table(name = "log_level") +@SequenceGenerator(name="LOG_LEVEL_ID_SEQ", sequenceName="log_level_id_seq",allocationSize=1) +@Cache(usage=CacheConcurrencyStrategy.NONE) +public class LogLevel extends AbstractEntityBase { + + private static final long serialVersionUID = 10L; + private Integer id = null; + private String levelType = null; + private Integer levelNumber = null; + private Integer orderNumber = null; + private Boolean active = null; + + /** + * @return the id + */ + @Id + @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="LOG_LEVEL_ID_SEQ") + @Column(name="id",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Integer getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * @return the levelType + */ + @Column(name="level_type",nullable=false) + @VascDisplayName + public String getLevelType() { + return levelType; + } + + /** + * @param levelType the levelType to set + */ + public void setLevelType(String levelType) { + this.levelType = levelType; + } + + /** + * @return the levelNumber + */ + @Column(name="level_number",nullable=false) + public Integer getLevelNumber() { + return levelNumber; + } + + /** + * @param levelNumber the levelNumber to set + */ + public void setLevelNumber(Integer levelNumber) { + this.levelNumber = levelNumber; + } + + /** + * @return the orderNumber + */ + @Column(name="order_number",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Integer getOrderNumber() { + return orderNumber; + } + + /** + * @param orderNumber the orderNumber to set + */ + public void setOrderNumber(Integer orderNumber) { + this.orderNumber = orderNumber; + } + + /** + * @return the active + */ + @Column(name="active",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Boolean getActive() { + return active; + } + + /** + * @param active the active to set + */ + public void setActive(Boolean active) { + this.active = active; + } +} \ No newline at end of file diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogRightRole.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogRightRole.java new file mode 100644 index 0000000..8dc7937 --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogRightRole.java @@ -0,0 +1,108 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.models; + +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; + +import net.forwardfire.vasc.annotations.VascDisplayName; +import net.forwardfire.vasc.annotations.VascFieldTemplate; + +/** + * LogRightRole + * + * @author Willem Cazander + * @version 1.0 Jun 24, 2010 + */ +@Entity +@Table(name = "log_right_role") +@SequenceGenerator(name="LOG_RIGHT_ROLE_ID_SEQ", sequenceName="log_right_role_id_seq",allocationSize=1) +@Cache(usage=CacheConcurrencyStrategy.NONE) +public class LogRightRole extends AbstractEntityBase { + + + private static final long serialVersionUID = 10L; + private Integer id = null; + private String roleKey = null; + private Date createdDate = null; + + /** + * @return the id + */ + @Id + @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="LOG_RIGHT_ROLE_ID_SEQ") + @Column(name="id",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Integer getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * @return the roleKey + */ + @VascDisplayName + @Column(name="role_key",nullable=false) + public String getRoleKey() { + return roleKey; + } + + /** + * @param roleKey the roleKey to set + */ + public void setRoleKey(String roleKey) { + this.roleKey = roleKey; + } + + /** + * @return the createdDate + */ + @Column(name="created_date",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Date getCreatedDate() { + return createdDate; + } + + /** + * @param createdDate the createdDate to set + */ + public void setCreatedDate(Date createdDate) { + this.createdDate = createdDate; + } +} \ No newline at end of file diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogServerRun.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogServerRun.java new file mode 100644 index 0000000..f857a69 --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogServerRun.java @@ -0,0 +1,122 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.models; + +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; + +import net.forwardfire.vasc.annotations.VascDisplayName; +import net.forwardfire.vasc.annotations.VascFieldTemplate; + +/** + * LogServerRun + * + * @author Willem Cazander + * @version 1.0 Jun 29, 2010 + */ +@Entity +@Table(name = "log_server_run") +@SequenceGenerator(name="LOG_SERVER_RUN_ID_SEQ", sequenceName="log_server_run_id_seq",allocationSize=1) +@Cache(usage=CacheConcurrencyStrategy.NONE) +public class LogServerRun extends AbstractEntityBase { + + private static final long serialVersionUID = 10L; + private Integer id = null; + private Date startDate = null; + private Date stopDate = null; + private Long lastDataId = null; + + /** + * @return the id + */ + @Id + @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="LOG_SERVER_RUN_ID_SEQ") + @Column(name="id",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Integer getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * @return the startDate + */ + @Column(name="start_date",nullable=false) + @VascDisplayName + public Date getStartDate() { + return startDate; + } + + /** + * @param startDate the startDate to set + */ + public void setStartDate(Date startDate) { + this.startDate = startDate; + } + + /** + * @return the stopDate + */ + @Column(name="stop_date",nullable=false) + public Date getStopDate() { + return stopDate; + } + + /** + * @param stopDate the stopDate to set + */ + public void setStopDate(Date stopDate) { + this.stopDate = stopDate; + } + + /** + * @return the lastDataId + */ + @Column(name="last_data_id",nullable=false) + public Long getLastDataId() { + return lastDataId; + } + + /** + * @param lastDataId the lastDataId to set + */ + public void setLastDataId(Long lastDataId) { + this.lastDataId = lastDataId; + } +} \ No newline at end of file diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogSource.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogSource.java new file mode 100644 index 0000000..c38eb80 --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogSource.java @@ -0,0 +1,106 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.models; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; + +import net.forwardfire.vasc.annotations.VascDisplayName; +import net.forwardfire.vasc.annotations.VascFieldTemplate; + +/** + * LogSource + * + * @author Willem Cazander + * @version 1.0 Jun 13, 2010 + */ +@Entity +@Table(name = "log_source") +@SequenceGenerator(name="LOG_SOURCE_ID_SEQ", sequenceName="log_source_id_seq",allocationSize=1) +@Cache(usage=CacheConcurrencyStrategy.NONE) +public class LogSource extends AbstractEntityBase { + + private static final long serialVersionUID = 10L; + private Integer id = null; + private String source = null; + private Boolean active = null; + + /** + * @return the id + */ + @Id + @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="LOG_SOURCE_ID_SEQ") + @Column(name="id",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Integer getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * @return the source + */ + + @Column(name="source",nullable=false) + @VascDisplayName + public String getSource() { + return source; + } + + /** + * @param source the source to set + */ + public void setSource(String source) { + this.source = source; + } + + /** + * @return the active + */ + @Column(name="active",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Boolean getActive() { + return active; + } + + /** + * @param active the active to set + */ + public void setActive(Boolean active) { + this.active = active; + } +} \ No newline at end of file diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogStats.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogStats.java new file mode 100644 index 0000000..078ec1f --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogStats.java @@ -0,0 +1,320 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.models; + +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; +import org.hibernate.annotations.ResultCheckStyle; +import org.hibernate.annotations.SQLInsert; + +import net.forwardfire.vasc.annotations.VascDisplayName; +import net.forwardfire.vasc.annotations.VascFieldTemplate; + +/** + * LogStats + * + * @author Willem Cazander + * @version 1.0 Jun 13, 2010 + */ +@Entity +@Table(name = "log_stats") +@SequenceGenerator(name="LOG_STATS_ID_SEQ", sequenceName="log_stats_id_seq",allocationSize=1) +@Cache(usage=CacheConcurrencyStrategy.NONE) +@org.hibernate.annotations.Entity(selectBeforeUpdate=true,dynamicInsert=true,dynamicUpdate=true) +@SQLInsert(sql="SQL GENERATED BY dynamicInsert=true",check=ResultCheckStyle.NONE) +public class LogStats extends AbstractEntityBase { + + private static final long serialVersionUID = 10L; + private Integer id = null; + private Date logDay = null; + private Integer logHostId = null; + private String logHost = null; + private Integer logSourceId = null; + private String logSource = null; + private Integer logValueId = null; + private String logValue = null; + private Integer timeTotal = null; + private Integer timeMin = null; + private Integer timeMax = null; + private Integer timeAvg = null; + private Integer valueCount = null; + private String valueText = null; + private Date createdDate = null; + private Date modifiedDate = null; + + /** + * @return the id + */ + @Id + @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="LOG_STATS_ID_SEQ") + @Column(name="id",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Integer getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * @return the logDay + */ + @Column(name="log_day",nullable=false) + @VascDisplayName + public Date getLogDay() { + return logDay; + } + + /** + * @param logDay the logDay to set + */ + public void setLogDay(Date logDay) { + this.logDay = logDay; + } + + /** + * @return the logHostId + */ + @Column(name="log_host_id",nullable=true) + public Integer getLogHostId() { + return logHostId; + } + + /** + * @param logHostId the logHostId to set + */ + public void setLogHostId(Integer logHostId) { + this.logHostId = logHostId; + } + + /** + * @return the logHost + */ + @Column(name="log_host",nullable=false) + public String getLogHost() { + return logHost; + } + + /** + * @param logHost the logHost to set + */ + public void setLogHost(String logHost) { + this.logHost = logHost; + } + + /** + * @return the logSourceId + */ + @Column(name="log_source_id",nullable=true) + public Integer getLogSourceId() { + return logSourceId; + } + + /** + * @param logSourceId the logSourceId to set + */ + public void setLogSourceId(Integer logSourceId) { + this.logSourceId = logSourceId; + } + + /** + * @return the logSource + */ + @Column(name="log_source",nullable=false) + public String getLogSource() { + return logSource; + } + + /** + * @param logSource the logSource to set + */ + public void setLogSource(String logSource) { + this.logSource = logSource; + } + + /** + * @return the logValueId + */ + @Column(name="log_value_id",nullable=true) + public Integer getLogValueId() { + return logValueId; + } + + /** + * @param logValueId the logValueId to set + */ + public void setLogValueId(Integer logValueId) { + this.logValueId = logValueId; + } + + /** + * @return the logValue + */ + @Column(name="log_value",nullable=false) + public String getLogValue() { + return logValue; + } + + /** + * @param logValue the logValue to set + */ + public void setLogValue(String logValue) { + this.logValue = logValue; + } + + /** + * @return the timeTotal + */ + @Column(name="time_total",nullable=false) + public Integer getTimeTotal() { + return timeTotal; + } + + /** + * @param timeTotal the timeTotal to set + */ + public void setTimeTotal(Integer timeTotal) { + this.timeTotal = timeTotal; + } + + /** + * @return the timeMin + */ + @Column(name="time_min",nullable=true) + public Integer getTimeMin() { + return timeMin; + } + + /** + * @param timeMin the timeMin to set + */ + public void setTimeMin(Integer timeMin) { + this.timeMin = timeMin; + } + + /** + * @return the timeMax + */ + @Column(name="time_max",nullable=true) + public Integer getTimeMax() { + return timeMax; + } + + /** + * @param timeMax the timeMax to set + */ + public void setTimeMax(Integer timeMax) { + this.timeMax = timeMax; + } + + /** + * @return the timeAvg + */ + @Column(name="time_avg",nullable=true) + public Integer getTimeAvg() { + return timeAvg; + } + + /** + * @param timeAvg the timeAvg to set + */ + public void setTimeAvg(Integer timeAvg) { + this.timeAvg = timeAvg; + } + + /** + * @return the valueCount + */ + @Column(name="value_count",nullable=false) + public Integer getValueCount() { + return valueCount; + } + + /** + * @param valueCount the valueCount to set + */ + public void setValueCount(Integer valueCount) { + this.valueCount = valueCount; + } + + /** + * @return the valueText + */ + @Column(name="value_text",nullable=false) + public String getValueText() { + return valueText; + } + + /** + * @param valueText the valueText to set + */ + public void setValueText(String valueText) { + this.valueText = valueText; + } + + /** + * @return the createdDate + */ + @Column(name="created_date",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Date getCreatedDate() { + return createdDate; + } + + /** + * @param createdDate the createdDate to set + */ + public void setCreatedDate(Date createdDate) { + this.createdDate = createdDate; + } + + /** + * @return the modifiedDate + */ + @Column(name="modified_date",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Date getModifiedDate() { + return modifiedDate; + } + + /** + * @param modifiedDate the modifiedDate to set + */ + public void setModifiedDate(Date modifiedDate) { + this.modifiedDate = modifiedDate; + } +} \ No newline at end of file diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogUser.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogUser.java new file mode 100644 index 0000000..2b76e38 --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogUser.java @@ -0,0 +1,173 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.models; + +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; + +import net.forwardfire.vasc.annotations.VascDisplayName; +import net.forwardfire.vasc.annotations.VascFieldTemplate; + +/** + * LogUser + * + * @author Willem Cazander + * @version 1.0 Jun 24, 2010 + */ +@Entity +@Table(name = "log_user") +@SequenceGenerator(name="LOG_USER_ID_SEQ", sequenceName="log_user_id_seq",allocationSize=1) +@Cache(usage=CacheConcurrencyStrategy.NONE) +public class LogUser extends AbstractEntityBase { + + private static final long serialVersionUID = 10L; + private Integer id = null; + private String username = null; + private String password = null; + private Boolean active = null; + private String i18nLocale = null; + private Date createdDate = null; + private Date modifiedDate = null; + + /** + * @return the id + */ + @Id + @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="LOG_USER_ID_SEQ") + @Column(name="id",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Integer getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * @return the username + */ + @VascDisplayName + @Column(name="username",nullable=false) + public String getUsername() { + return username; + } + + /** + * @param username the username to set + */ + public void setUsername(String username) { + this.username = username; + } + + /** + * @return the password + */ + @Column(name="password",nullable=false) + public String getPassword() { + return password; + } + + /** + * @param password the password to set + */ + public void setPassword(String password) { + this.password = password; + } + + /** + * @return the active + */ + @Column(name="active",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Boolean getActive() { + return active; + } + + /** + * @param active the active to set + */ + public void setActive(Boolean active) { + this.active = active; + } + + /** + * @return the i18nLocale + */ + @Column(name="i18n_locale",nullable=false) + public String getI18nLocale() { + return i18nLocale; + } + + /** + * @param i18nLocale the i18nLocale to set + */ + public void setI18nLocale(String i18nLocale) { + this.i18nLocale = i18nLocale; + } + + /** + * @return the createdDate + */ + @Column(name="created_date",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Date getCreatedDate() { + return createdDate; + } + + /** + * @param createdDate the createdDate to set + */ + public void setCreatedDate(Date createdDate) { + this.createdDate = createdDate; + } + + /** + * @return the modifiedDate + */ + @Column(name="modified_date",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Date getModifiedDate() { + return modifiedDate; + } + + /** + * @param modifiedDate the modifiedDate to set + */ + public void setModifiedDate(Date modifiedDate) { + this.modifiedDate = modifiedDate; + } +} \ No newline at end of file diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogUserRightRole.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogUserRightRole.java new file mode 100644 index 0000000..d6008b2 --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogUserRightRole.java @@ -0,0 +1,133 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.models; + +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToOne; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; + +import net.forwardfire.vasc.annotations.VascDisplayName; +import net.forwardfire.vasc.annotations.VascField; +import net.forwardfire.vasc.annotations.VascFieldTemplate; +import net.forwardfire.vasc.annotations.VascModelReference; + +/** + * LogUserRightRole + * + * @author Willem Cazander + * @version 1.0 Jun 24, 2010 + */ +@Entity +@Table(name = "log_user_right_role") +@SequenceGenerator(name="LOG_USER_RIGHT_ROLE_ID_SEQ", sequenceName="log_user_right_role_id_seq",allocationSize=1) +@Cache(usage=CacheConcurrencyStrategy.NONE) +public class LogUserRightRole extends AbstractEntityBase { + + private static final long serialVersionUID = 10L; + private Integer id = null; + private LogUser logUser = null; + private LogRightRole logRightRole = null; + private Date createdDate = null; + + /** + * @return the id + */ + @Id + @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="LOG_USER_RIGHT_ROLE_ID_SEQ") + @Column(name="id",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Integer getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * @return the logUser + */ + @OneToOne(fetch=FetchType.LAZY) + @JoinColumn(name="log_user_id",nullable=false) + @VascModelReference + @VascField(edit=false,create=false) + public LogUser getLogUser() { + return logUser; + } + + /** + * @param logUser the logUser to set + */ + public void setLogUser(LogUser logUser) { + this.logUser = logUser; + } + + /** + * @return the logRightRole + */ + @OneToOne(fetch=FetchType.LAZY) + @JoinColumn(name="log_right_role_id",nullable=false) + @VascModelReference + @VascDisplayName + public LogRightRole getLogRightRole() { + return logRightRole; + } + + /** + * @param logRightRole the logRightRole to set + */ + public void setLogRightRole(LogRightRole logRightRole) { + this.logRightRole = logRightRole; + } + + /** + * @return the createdDate + */ + @Column(name="created_date",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Date getCreatedDate() { + return createdDate; + } + + /** + * @param createdDate the createdDate to set + */ + public void setCreatedDate(Date createdDate) { + this.createdDate = createdDate; + } +} \ No newline at end of file diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogUserSetting.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogUserSetting.java new file mode 100644 index 0000000..c9a339d --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogUserSetting.java @@ -0,0 +1,164 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.models; + +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToOne; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; + +import net.forwardfire.vasc.annotations.VascField; +import net.forwardfire.vasc.annotations.VascFieldTemplate; +import net.forwardfire.vasc.annotations.VascModelReference; + +/** + * LogUserSetting + * + * @author Willem Cazander + * @version 1.0 Jun 24, 2010 + */ +@Entity +@Table(name = "log_user_setting") +@SequenceGenerator(name="LOG_USER_SETTING_ID_SEQ", sequenceName="log_user_setting_id_seq",allocationSize=1) +@Cache(usage=CacheConcurrencyStrategy.NONE) +public class LogUserSetting extends AbstractEntityBase { + + + private static final long serialVersionUID = 10L; + private Integer id = null; + private LogUser logUser = null; + private String name = null; + private String value = null; + private Date createdDate = null; + private Date modifiedDate = null; + + /** + * @return the id + */ + @Id + @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="LOG_USER_SETTING_ID_SEQ") + @Column(name="id",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Integer getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * @return the logUser + */ + @OneToOne(fetch=FetchType.LAZY) + @JoinColumn(name="log_user_id",nullable=false) + @VascField(list=false) + @VascModelReference + public LogUser getLogUser() { + return logUser; + } + + /** + * @param logUser the logUser to set + */ + public void setLogUser(LogUser logUser) { + this.logUser = logUser; + } + + /** + * @return the name + */ + @Column(name="name",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the value + */ + @Column(name="value",nullable=false) + public String getValue() { + return value; + } + + /** + * @param value the value to set + */ + public void setValue(String value) { + this.value = value; + } + + /** + * @return the createdDate + */ + @Column(name="created_date",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Date getCreatedDate() { + return createdDate; + } + + /** + * @param createdDate the createdDate to set + */ + public void setCreatedDate(Date createdDate) { + this.createdDate = createdDate; + } + + /** + * @return the modifiedDate + */ + @Column(name="modified_date",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Date getModifiedDate() { + return modifiedDate; + } + + /** + * @param modifiedDate the modifiedDate to set + */ + public void setModifiedDate(Date modifiedDate) { + this.modifiedDate = modifiedDate; + } +} \ No newline at end of file diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogValue.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogValue.java new file mode 100644 index 0000000..cc119e1 --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogValue.java @@ -0,0 +1,143 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.models; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToOne; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; + +import net.forwardfire.vasc.annotations.VascFieldTemplate; +import net.forwardfire.vasc.annotations.VascModelReference; + +/** + * LogValue + * + * @author Willem Cazander + * @version 1.0 Jun 09, 2010 + */ +@Entity +@Table(name = "log_value") +@SequenceGenerator(name="LOG_VALUE_ID_SEQ", sequenceName="log_value_id_seq",allocationSize=1) +@Cache(usage=CacheConcurrencyStrategy.NONE) +public class LogValue extends AbstractEntityBase { + + private static final long serialVersionUID = 10L; + private Integer id = null; + private String name = null; + private String description = null; + private Boolean active = null; + private LogValueType logValueType = null; + + /** + * @return the id + */ + @Id + @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="LOG_VALUE_ID_SEQ") + @Column(name="id",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Integer getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * @return the name + */ + @Column(name="name",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the description + */ + @Column(name="description",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public String getDescription() { + return description; + } + + /** + * @param description the description to set + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * @return the active + */ + @Column(name="active",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Boolean getActive() { + return active; + } + + /** + * @param active the active to set + */ + public void setActive(Boolean active) { + this.active = active; + } + + /** + * @return the logValueType + */ + @OneToOne(fetch=FetchType.LAZY) + @JoinColumn(name="log_value_type_id",nullable=false) + @VascModelReference + public LogValueType getLogValueType() { + return logValueType; + } + + /** + * @param logValueType the logValueType to set + */ + public void setLogValueType(LogValueType logValueType) { + this.logValueType = logValueType; + } +} \ No newline at end of file diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogValueLine.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogValueLine.java new file mode 100644 index 0000000..57881d5 --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogValueLine.java @@ -0,0 +1,284 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.models; + +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToOne; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; + +import net.forwardfire.vasc.annotations.VascDefaultValue; +import net.forwardfire.vasc.annotations.VascDisplayName; +import net.forwardfire.vasc.annotations.VascField; +import net.forwardfire.vasc.annotations.VascFieldTemplate; +import net.forwardfire.vasc.annotations.VascModelReference; + +/** + * LogValueLine + * + * @author Willem Cazander + * @version 1.0 Jun 09, 2010 + */ +@Entity +@Table(name = "log_value_line") +@SequenceGenerator(name="LOG_VALUE_LINE_ID_SEQ", sequenceName="log_value_line_id_seq",allocationSize=1) +@Cache(usage=CacheConcurrencyStrategy.NONE) +public class LogValueLine extends AbstractEntityBase { + + private static final long serialVersionUID = 10L; + private Integer id = null; + private Boolean active = null; + private LogHost logHost = null; + private LogValue logValue = null; + private LogLevel logLevel = null; + private LogSource logSource = null; + private String matchRegex = null; + private String splitRegex = null; + private Integer timeIndexNumber = null; + private Integer valueIndexNumber = null; + private Integer valueMinimal = null; + private Date startDate = null; + private Date stopDate = null; + + /** + * @return the id + */ + @Id + @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="LOG_VALUE_LINE_ID_SEQ") + @Column(name="id",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Integer getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * @return the active + */ + @Column(name="active",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Boolean getActive() { + return active; + } + + /** + * @param active the active to set + */ + public void setActive(Boolean active) { + this.active = active; + } + + /** + * @return the splitRegex + */ + @Column(name="split_regex",nullable=false) + @VascDisplayName + @VascDefaultValue(value="\\s") + public String getSplitRegex() { + return splitRegex; + } + + /** + * @param splitRegex the splitRegex to set + */ + public void setSplitRegex(String splitRegex) { + this.splitRegex = splitRegex; + } + + /** + * @return the matchRegex + */ + @Column(name="match_regex",nullable=false) + public String getMatchRegex() { + return matchRegex; + } + + /** + * @param matchRegex the matchRegex to set + */ + public void setMatchRegex(String matchRegex) { + this.matchRegex = matchRegex; + } + + /** + * @return the timeIndexNumber + */ + @Column(name="time_index_number",nullable=false) + public Integer getTimeIndexNumber() { + return timeIndexNumber; + } + + /** + * @param timeIndexNumber the timeIndexNumber to set + */ + public void setTimeIndexNumber(Integer timeIndexNumber) { + this.timeIndexNumber = timeIndexNumber; + } + + /** + * @return the valueIndexNumber + */ + @Column(name="value_index_number",nullable=false) + public Integer getValueIndexNumber() { + return valueIndexNumber; + } + + /** + * @param valueIndexNumber the valueIndexNumber to set + */ + public void setValueIndexNumber(Integer valueIndexNumber) { + this.valueIndexNumber = valueIndexNumber; + } + + /** + * @return the valueMinimal + */ + @Column(name="value_minimal",nullable=true) + public Integer getValueMinimal() { + return valueMinimal; + } + + /** + * @param valueMinimal the valueMinimal to set + */ + public void setValueMinimal(Integer valueMinimal) { + this.valueMinimal = valueMinimal; + } + + /** + * @return the startDate + */ + @Column(name="start_date",nullable=true) + public Date getStartDate() { + return startDate; + } + + /** + * @param startDate the startDate to set + */ + public void setStartDate(Date startDate) { + this.startDate = startDate; + } + + /** + * @return the stopDate + */ + @Column(name="stop_date",nullable=true) + public Date getStopDate() { + return stopDate; + } + + /** + * @param stopDate the stopDate to set + */ + public void setStopDate(Date stopDate) { + this.stopDate = stopDate; + } + + + /** + * @return the logHost + */ + @OneToOne(fetch=FetchType.LAZY) + @JoinColumn(name="log_host_id",nullable=true) + @VascModelReference + public LogHost getLogHost() { + return logHost; + } + + /** + * @param logHost the logHost to set + */ + public void setLogHost(LogHost logHost) { + this.logHost = logHost; + } + + /** + * @return the logValue + */ + @OneToOne(fetch=FetchType.LAZY) + @JoinColumn(name="log_value_id",nullable=false) + @VascModelReference + @VascField(edit=false,list=false) + public LogValue getLogValue() { + return logValue; + } + + /** + * @param logValue the logValue to set + */ + public void setLogValue(LogValue logValue) { + this.logValue = logValue; + } + + /** + * @return the logLevel + */ + @OneToOne(fetch=FetchType.LAZY) + @JoinColumn(name="log_level_id",nullable=false) + @VascModelReference + public LogLevel getLogLevel() { + return logLevel; + } + + /** + * @param logLevel the logLevel to set + */ + public void setLogLevel(LogLevel logLevel) { + this.logLevel = logLevel; + } + + /** + * @return the logSource + */ + @OneToOne(fetch=FetchType.LAZY) + @JoinColumn(name="log_source_id",nullable=false) + @VascModelReference + public LogSource getLogSource() { + return logSource; + } + + /** + * @param logSource the logSource to set + */ + public void setLogSource(LogSource logSource) { + this.logSource = logSource; + } +} \ No newline at end of file diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogValueType.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogValueType.java new file mode 100644 index 0000000..3f16c41 --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/models/LogValueType.java @@ -0,0 +1,128 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.models; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; + +import net.forwardfire.vasc.annotations.VascDisplayName; +import net.forwardfire.vasc.annotations.VascFieldTemplate; + +/** + * LogValueType + * + * @author Willem Cazander + * @version 1.0 Jun 09, 2010 + */ +@Entity +@Table(name = "log_value_type") +@SequenceGenerator(name="LOG_VALUE_TYPE_ID_SEQ", sequenceName="log_value_type_id_seq",allocationSize=1) +@Cache(usage=CacheConcurrencyStrategy.NONE) +public class LogValueType extends AbstractEntityBase { + + private static final long serialVersionUID = 10L; + private Integer id = null; + private String valueType = null; + private Integer orderNumber = null; + private Boolean active = null; + + public static final String VALUE_AVG = "VALUE_AVG"; // value and time , time avg + public static final String VALUE_COUNT = "VALUE_COUNT"; // value only , count hits. + public static final String VALUE_SUM = "VALUE_SUM"; // value only , sum hits + public static final String VALUE_TIME = "VALUE_TIME"; // value and time , sum time ? + + + /** + * @return the id + */ + @Id + @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="LOG_VALUE_TYPE_ID_SEQ") + @Column(name="id",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Integer getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * @return the valueType + */ + @Column(name="value_type",nullable=false) + @VascDisplayName + public String getValueType() { + return valueType; + } + + /** + * @param valueType the valueType to set + */ + public void setValueType(String valueType) { + this.valueType = valueType; + } + + /** + * @return the orderNumber + */ + @Column(name="order_number",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Integer getOrderNumber() { + return orderNumber; + } + + /** + * @param orderNumber the orderNumber to set + */ + public void setOrderNumber(Integer orderNumber) { + this.orderNumber = orderNumber; + } + + /** + * @return the active + */ + @Column(name="active",nullable=false) + @VascFieldTemplate(templateClass=AbstractFieldTemplates.class) + public Boolean getActive() { + return active; + } + + /** + * @param active the active to set + */ + public void setActive(Boolean active) { + this.active = active; + } +} \ No newline at end of file diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/services/LoginManager.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/services/LoginManager.java new file mode 100644 index 0000000..24f9fb5 --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/services/LoginManager.java @@ -0,0 +1,151 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.services; + + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.annotation.Resource; +//import javax.annotation.security.RolesAllowed; +import javax.ejb.EJB; +import javax.ejb.SessionContext; +import javax.ejb.Stateless; +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; + +import net.forwardfire.logstats.ejb.models.LogRightRole; +import net.forwardfire.logstats.ejb.models.LogUser; +import net.forwardfire.logstats.ejb.models.LogUserRightRole; + +import net.forwardfire.vasc.xpql.ejb3.XpqlQueryManager; +import net.forwardfire.vasc.xpql.query.Query; + + +/** + * An simple ejb bean to force an login. + * + * @author Willem Cazander + * @version 1.0 16 Jul 2007 + */ +@Stateless(name="ejb/loginManager") +public class LoginManager implements LoginManagerRemote { + + @Resource + private SessionContext session; + + @EJB(beanInterface=XpqlQueryManager.ILocal.class) + private XpqlQueryManager xtesManager; + + @PersistenceContext + private EntityManager entityManager; + + /** + * Tests for the login role + */ + //@RolesAllowed("login") + public String doClientLogin() { + /* + FlowUser u = null; + try { + u = getUser(); + } catch (Exception e) { + throw new IllegalStateException("Could not lookup user from username: "+session.getCallerPrincipal().getName()); + } + FlowUserSession us = new FlowUserSession(); + us.setLoginDate(new Date()); + us.setLogoutDate(null); // set when doing doClientLogout(); + + // current_time_in_secs + str_to_int(username)*10E20 + long timeSS = us.getLoginDate().getTime(); + int userSS = hashUserName(u.getUsername()); + int modSS = 10230; + long sessionId = timeSS+userSS*modSS; + us.setSessionHash(sessionId+""); + //System.out.println("Created sessionId: timeSS: "+timeSS+" userSS: "+userSS+" modSS: "+modSS); + + us.setFlowUser(u); + entityManager.persist(us); + return u.getUsername(); + */ + return ""; + } + + //@RolesAllowed("login") + public void doClientLogout() { + try { + /* + Query q2 = xtesManager.getQuery("FlowUserSession.getLastestByUserName"); + q2.setQueryParameter("username", session.getCallerPrincipal().getName()); + q2.setProperty("limit", 1); + FlowUserSession userSession = (FlowUserSession)xtesManager.executeObject(q2); + userSession.setLogoutDate(new Date()); + entityManager.merge(userSession); + */ + } catch (Exception e) { + e.printStackTrace(); + } + } + + + private int hashUserName(String userName) { + int result = 0; + for (char c:userName.toCharArray()) { + result+=c; + } + return result; + } + + /** + * Gets the currenly auth user + */ + //@RolesAllowed("login") + public LogUser getUser() throws Exception { + + if (session.getCallerPrincipal()==null) { + return null; + } + Query q = xtesManager.getQuery("LogUser.getByUsername"); + q.setQueryParameter("username", session.getCallerPrincipal().getName()); + return (LogUser)xtesManager.executeObject(q); + } + + + /** + * Fetched the roles for the logged in client + * @return + */ + //@RolesAllowed("login") + public List getClientRoles() throws Exception { + List result = new ArrayList(5); + Query q = xtesManager.getQuery("LogRightRole.getAllByUsername"); + q.setQueryParameter("username", session.getCallerPrincipal().getName()); + List list = xtesManager.execute(q); + for (Object o:list) { + LogRightRole rr = ((LogRightRole)o); + result.add(rr); + } + return result; + } +} diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/services/LoginManagerRemote.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/services/LoginManagerRemote.java new file mode 100644 index 0000000..2779818 --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/services/LoginManagerRemote.java @@ -0,0 +1,49 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.services; + +import java.util.List; + +import javax.ejb.Remote; + +import net.forwardfire.logstats.ejb.models.LogRightRole; +import net.forwardfire.logstats.ejb.models.LogUser; + + +/** + * Remote exported method to force clients to login. + * + * @author Willem Cazander + * @version 1.0 16 Jul 2007 + */ +@Remote +public interface LoginManagerRemote { + + public String doClientLogin(); + + public void doClientLogout(); + + public LogUser getUser() throws Exception; + + public List getClientRoles() throws Exception; +} diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/services/ServerManager.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/services/ServerManager.java new file mode 100644 index 0000000..80e2fea --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/services/ServerManager.java @@ -0,0 +1,82 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.services; + + +import java.util.ArrayList; +import java.util.List; + +import javax.ejb.EJB; +import javax.ejb.Stateless; +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; + +import net.forwardfire.logstats.ejb.jobs.UpdateIndexJob; +import net.forwardfire.logstats.ejb.models.LogData; + +import net.forwardfire.vasc.xpql.ejb3.XpqlQueryManager; + + +/** + * An simple ejb bean to get wiki pages + * + * @author Willem Cazander + * @version 1.0 9 Nov 2009 + */ +@Stateless(name="ejb/serverManager") +public class ServerManager implements ServerManagerRemote { + + @EJB(beanInterface=XpqlQueryManager.ILocal.class) + private XpqlQueryManager xtesManager; + + @PersistenceContext + private EntityManager entityManager; + + public List getRealTimeLogData() { + List result = new ArrayList(200); + result.addAll(UpdateIndexJob.logDataRealtime); + return result; + } + + + /* + public ServerWikiPage getWikiPage(String name) { + Map para = new HashMap(1); + para.put("name_url", name); + ServerWikiPage result = null; + try { + result = (ServerWikiPage)xtesManager.executeObject("ServerWikiPage.getByNameUrl", para); + } catch (NoResultException ee) { + } catch (Exception e) { + e.printStackTrace();//TODO Auto-generated catch block + } + return result; + } + + public List getWikiPageHistory(Integer serverWikiPageId) { + List result = new ArrayList(1); + return result; + } + + */ +} diff --git a/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/services/ServerManagerRemote.java b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/services/ServerManagerRemote.java new file mode 100644 index 0000000..e811e2c --- /dev/null +++ b/logstats-ejb/src/main/java/net/forwardfire/logstats/ejb/services/ServerManagerRemote.java @@ -0,0 +1,52 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.ejb.services; + +import java.util.Date; +import java.util.List; + +import javax.ejb.Remote; + +import net.forwardfire.logstats.ejb.models.LogData; + + + +/** + * Remote exported method to get wiki pages + * + * @author Willem Cazander + * @version 1.0 09 Nov 2009 + */ +@Remote +public interface ServerManagerRemote { + + //public void updateIndex(Date startDate); + + public List getRealTimeLogData(); + + /* + public ServerWikiPage getWikiPage(String name); + + public List getWikiPageHistory(Integer serverWikiPageId); + */ +} diff --git a/logstats-ejb/src/main/resources/META-INF/ejb-jar.xml b/logstats-ejb/src/main/resources/META-INF/ejb-jar.xml new file mode 100644 index 0000000..4cab75b --- /dev/null +++ b/logstats-ejb/src/main/resources/META-INF/ejb-jar.xml @@ -0,0 +1,5 @@ + + + logstats-ejb + logstats-ejb + \ No newline at end of file diff --git a/logstats-ejb/src/main/resources/META-INF/jboss.xml b/logstats-ejb/src/main/resources/META-INF/jboss.xml new file mode 100644 index 0000000..9f4725f --- /dev/null +++ b/logstats-ejb/src/main/resources/META-INF/jboss.xml @@ -0,0 +1,26 @@ + + + + + UpdateIndexJob + quartz-ra.rar + + + + \ No newline at end of file diff --git a/logstats-ejb/src/main/resources/META-INF/persistence.xml b/logstats-ejb/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000..f0a7065 --- /dev/null +++ b/logstats-ejb/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,23 @@ + + + + + + java:logstats_dba + + + + + + + + + + + + + + \ No newline at end of file diff --git a/logstats-ejb/src/main/resources/META-INF/vasc-ejb3.xml b/logstats-ejb/src/main/resources/META-INF/vasc-ejb3.xml new file mode 100644 index 0000000..a76f41a --- /dev/null +++ b/logstats-ejb/src/main/resources/META-INF/vasc-ejb3.xml @@ -0,0 +1,11 @@ + + + + + Files to load + + net/forwardfire/logstats/resources/vasc/logstats.xml + java:/logstats_pu + logstats-jboss/ejb/xpqlQueryManager/local + net/forwardfire/logstats/resources/i18n/LogstatsBundleEJB + \ No newline at end of file diff --git a/logstats-ejb/src/main/resources/META-INF/xtes-xpql-ejb3.xml b/logstats-ejb/src/main/resources/META-INF/xtes-xpql-ejb3.xml new file mode 100644 index 0000000..8d262d7 --- /dev/null +++ b/logstats-ejb/src/main/resources/META-INF/xtes-xpql-ejb3.xml @@ -0,0 +1,9 @@ + + + + + Files to load + + net/forwardfire/logstats/resources/xpql/logstats.xml + java:/logstats_pu + \ No newline at end of file diff --git a/logstats-ejb/src/main/resources/net/forwardfire/logstats/resources/i18n/LogstatsBundleEJB_en.properties b/logstats-ejb/src/main/resources/net/forwardfire/logstats/resources/i18n/LogstatsBundleEJB_en.properties new file mode 100644 index 0000000..f26668f --- /dev/null +++ b/logstats-ejb/src/main/resources/net/forwardfire/logstats/resources/i18n/LogstatsBundleEJB_en.properties @@ -0,0 +1,173 @@ + +generic.active.labelText = active +generic.active.toolTipText = active +generic.createdDate.labelText = createdDate +generic.createdDate.toolTipText = createdDate +generic.description.labelText = description +generic.description.toolTipText = description +generic.id.labelText = id +generic.id.toolTipText = id +generic.modifiedDate.labelText = modifiedDate +generic.modifiedDate.toolTipText = modifiedDate +generic.name.labelText = name +generic.name.toolTipText = name +generic.orderNumber.labelText = orderNumber +generic.orderNumber.toolTipText = orderNumber + +# hibernate validators +validator.assertFalse=assertion failed +validator.assertTrue=assertion failed +validator.future=Date must lie in the future +validator.length=Field must contain between {min} and {max} characters. +validator.max=Value must be equal to or lower than {value} +validator.min=Value must be equal to or higher than {value} +validator.notNull=A value must be entered +validator.past=Date must lie in the future +validator.pattern=Value must conform to "{regex}" +validator.range=Value must lie between {min} and {max} +validator.size=There must be between {min} and {max} characters +validator.email=The value must be a valid e-mail address + +# vasc validators +vasc.validator.VascDateFutureValidator=The date must lie in the future. +vasc.validator.VascDatePastValidator=The date must lie in the past. +vasc.validator.VascIntSizeValidator=Value must lie between {0} and {1} +vasc.validator.VascLongSizeValidator=Value must lie between {0} and {1} +vasc.validator.VascObjectNotNullValidator=A value must be entered +vasc.validator.VascObjectNullValidator=No value may be entered +vasc.validator.VascStringEmailValidator=The value must be a valid e-mail address +vasc.validator.VascStringLengthValidator=There must be at least {0} and at most {1} items +vasc.validator.VascStringRegexValidator=Value must conform to "{0}" +vasc.validator.VascStringZipCodeValidator=Value must be a valid post code. + +# Vasc actions labels +vasc.action.addRowAction.description = add a new record +vasc.action.addRowAction.name = Add +vasc.action.csvExportAction.description = CSV +vasc.action.csvExportAction.name = CSV +vasc.action.xmlExportAction.description = XML +vasc.action.xmlExportAction.name = XML +vasc.action.deleteRowAction.description = delete +vasc.action.deleteRowAction.name = delete +vasc.action.downloadAction.description = Select this record. +vasc.action.downloadAction.name = Select +vasc.action.editRowAction.description = edit +vasc.action.editRowAction.name = Edit + +vasc.entry.logDataLastDay.listDescription = View logDataLastDay +vasc.entry.logDataLastDay.name = logDataLastDay +vasc.entry.logHostAdmin.listDescription = View logHostAdmin +vasc.entry.logHostAdmin.name = logHostAdmin +vasc.entry.logHostGroupAdmin.listDescription = View logHostGroupAdmin +vasc.entry.logHostGroupAdmin.name = logHostGroupAdmin +vasc.entry.logLevelAdmin.listDescription = View logLevelAdmin +vasc.entry.logLevelAdmin.name = logLevelAdmin +vasc.entry.logRightRoleAdmin.listDescription = View logRightRoleAdmin +vasc.entry.logRightRoleAdmin.name = logRightRoleAdmin +vasc.entry.logSourceAdmin.listDescription = View logSourceAdmin +vasc.entry.logSourceAdmin.name = logSourceAdmin +vasc.entry.logUserAdmin.listDescription = View logUserAdmin +vasc.entry.logUserAdmin.name = logUserAdmin +vasc.entry.logUserRightRoleLink.listDescription = View logUserRightRoleLink +vasc.entry.logUserRightRoleLink.name = logUserRightRoleLink +vasc.entry.logUserSettingLink.listDescription = View logUserSettingLink +vasc.entry.logUserSettingLink.name = logUserSettingLink +vasc.entry.logValueAdmin.listDescription = View logValueAdmin +vasc.entry.logValueAdmin.name = logValueAdmin +vasc.entry.logValueLineLink.listDescription = View logValueLineLink +vasc.entry.logValueLineLink.name = logValueLineLink +vasc.entry.logValueTypeAdmin.listDescription = View logValueTypeAdmin +vasc.entry.logValueTypeAdmin.name = logValueTypeAdmin + +net.forwardfire.logstats.ejb.models.LogData.VascI18n.description = LogData +net.forwardfire.logstats.ejb.models.LogData.VascI18n.name = LogData +net.forwardfire.logstats.ejb.models.LogData.hostname.VascI18n.description = hostname +net.forwardfire.logstats.ejb.models.LogData.hostname.VascI18n.name = hostname +net.forwardfire.logstats.ejb.models.LogData.logDate.VascI18n.description = logDate +net.forwardfire.logstats.ejb.models.LogData.logDate.VascI18n.name = logDate +net.forwardfire.logstats.ejb.models.LogData.logLevel.VascI18n.description = logLevel +net.forwardfire.logstats.ejb.models.LogData.logLevel.VascI18n.name = logLevel +net.forwardfire.logstats.ejb.models.LogData.message.VascI18n.description = message +net.forwardfire.logstats.ejb.models.LogData.message.VascI18n.name = message +net.forwardfire.logstats.ejb.models.LogData.source.VascI18n.description = source +net.forwardfire.logstats.ejb.models.LogData.source.VascI18n.name = source +net.forwardfire.logstats.ejb.models.LogHost.VascI18n.description = LogHost +net.forwardfire.logstats.ejb.models.LogHost.VascI18n.name = LogHost +net.forwardfire.logstats.ejb.models.LogHost.hostname.VascI18n.description = hostname +net.forwardfire.logstats.ejb.models.LogHost.hostname.VascI18n.name = hostname +net.forwardfire.logstats.ejb.models.LogHostGroup.VascI18n.description = logHostGroup +net.forwardfire.logstats.ejb.models.LogHostGroup.VascI18n.name = logHostGroup +net.forwardfire.logstats.ejb.models.LogLevel.VascI18n.description = LogLevel +net.forwardfire.logstats.ejb.models.LogLevel.VascI18n.name = LogLevel +net.forwardfire.logstats.ejb.models.LogLevel.levelNumber.VascI18n.description = levelNumber +net.forwardfire.logstats.ejb.models.LogLevel.levelNumber.VascI18n.name = levelNumber +net.forwardfire.logstats.ejb.models.LogLevel.levelType.VascI18n.description = levelType +net.forwardfire.logstats.ejb.models.LogLevel.levelType.VascI18n.name = levelType +net.forwardfire.logstats.ejb.models.LogRightRole.VascI18n.description = LogRightRole +net.forwardfire.logstats.ejb.models.LogRightRole.VascI18n.name = LogRightRole +net.forwardfire.logstats.ejb.models.LogRightRole.roleKey.VascI18n.description = roleKey +net.forwardfire.logstats.ejb.models.LogRightRole.roleKey.VascI18n.name = roleKey +net.forwardfire.logstats.ejb.models.LogSource.VascI18n.description = LogSource +net.forwardfire.logstats.ejb.models.LogSource.VascI18n.name = LogSource +net.forwardfire.logstats.ejb.models.LogSource.source.VascI18n.description = source +net.forwardfire.logstats.ejb.models.LogSource.source.VascI18n.name = source +net.forwardfire.logstats.ejb.models.LogStats.VascI18n.description = LogStats +net.forwardfire.logstats.ejb.models.LogStats.VascI18n.name = LogStats +net.forwardfire.logstats.ejb.models.LogStats.logDay.VascI18n.description = logDay +net.forwardfire.logstats.ejb.models.LogStats.logDay.VascI18n.name = logDay +net.forwardfire.logstats.ejb.models.LogStats.logHost.VascI18n.description = logHost +net.forwardfire.logstats.ejb.models.LogStats.logHost.VascI18n.name = logHost +net.forwardfire.logstats.ejb.models.LogStats.logHostId.VascI18n.description = logHostId +net.forwardfire.logstats.ejb.models.LogStats.logHostId.VascI18n.name = logHostId +net.forwardfire.logstats.ejb.models.LogStats.logSource.VascI18n.description = logSource +net.forwardfire.logstats.ejb.models.LogStats.logSource.VascI18n.name = logSource +net.forwardfire.logstats.ejb.models.LogStats.logSourceId.VascI18n.description = logSourceId +net.forwardfire.logstats.ejb.models.LogStats.logSourceId.VascI18n.name = logSourceId +net.forwardfire.logstats.ejb.models.LogStats.logValue.VascI18n.description = logValue +net.forwardfire.logstats.ejb.models.LogStats.logValue.VascI18n.name = logValue +net.forwardfire.logstats.ejb.models.LogStats.logValueId.VascI18n.description = logValueId +net.forwardfire.logstats.ejb.models.LogStats.logValueId.VascI18n.name = logValueId +net.forwardfire.logstats.ejb.models.LogStats.timeAvg.VascI18n.description = timeAvg +net.forwardfire.logstats.ejb.models.LogStats.timeAvg.VascI18n.name = timeAvg +net.forwardfire.logstats.ejb.models.LogStats.timeMax.VascI18n.description = timeMax +net.forwardfire.logstats.ejb.models.LogStats.timeMax.VascI18n.name = timeMax +net.forwardfire.logstats.ejb.models.LogStats.timeMin.VascI18n.description = timeMin +net.forwardfire.logstats.ejb.models.LogStats.timeMin.VascI18n.name = timeMin +net.forwardfire.logstats.ejb.models.LogStats.valueCount.VascI18n.description = valueCount +net.forwardfire.logstats.ejb.models.LogStats.valueCount.VascI18n.name = valueCount +net.forwardfire.logstats.ejb.models.LogStats.valueText.VascI18n.description = valueText +net.forwardfire.logstats.ejb.models.LogStats.valueText.VascI18n.name = valueText +net.forwardfire.logstats.ejb.models.LogUser.VascI18n.description = LogUser +net.forwardfire.logstats.ejb.models.LogUser.VascI18n.name = LogUser +net.forwardfire.logstats.ejb.models.LogUser.i18nLocale.VascI18n.description = i18nLocale +net.forwardfire.logstats.ejb.models.LogUser.i18nLocale.VascI18n.name = i18nLocale +net.forwardfire.logstats.ejb.models.LogUser.password.VascI18n.description = password +net.forwardfire.logstats.ejb.models.LogUser.password.VascI18n.name = password +net.forwardfire.logstats.ejb.models.LogUser.username.VascI18n.description = username +net.forwardfire.logstats.ejb.models.LogUser.username.VascI18n.name = username +net.forwardfire.logstats.ejb.models.LogUserRightRole.VascI18n.description = LogUserRightRole +net.forwardfire.logstats.ejb.models.LogUserRightRole.VascI18n.name = LogUserRightRole +net.forwardfire.logstats.ejb.models.LogUserSetting.VascI18n.description = LogUserSetting +net.forwardfire.logstats.ejb.models.LogUserSetting.VascI18n.name = LogUserSetting +net.forwardfire.logstats.ejb.models.LogUserSetting.value.VascI18n.description = value +net.forwardfire.logstats.ejb.models.LogUserSetting.value.VascI18n.name = value +net.forwardfire.logstats.ejb.models.LogValue.VascI18n.description = LogValue +net.forwardfire.logstats.ejb.models.LogValue.VascI18n.name = LogValue +net.forwardfire.logstats.ejb.models.LogValueLine.VascI18n.description = LogValueLine +net.forwardfire.logstats.ejb.models.LogValueLine.VascI18n.name = LogValueLine +net.forwardfire.logstats.ejb.models.LogValueLine.splitRegex.VascI18n.description = splitRegex +net.forwardfire.logstats.ejb.models.LogValueLine.splitRegex.VascI18n.name = splitRegex +net.forwardfire.logstats.ejb.models.LogValueLine.startDate.VascI18n.description = startDate +net.forwardfire.logstats.ejb.models.LogValueLine.startDate.VascI18n.name = startDate +net.forwardfire.logstats.ejb.models.LogValueLine.stopDate.VascI18n.description = stopDate +net.forwardfire.logstats.ejb.models.LogValueLine.stopDate.VascI18n.name = stopDate +net.forwardfire.logstats.ejb.models.LogValueLine.timeIndexNumber.VascI18n.description = timeIndexNumber +net.forwardfire.logstats.ejb.models.LogValueLine.timeIndexNumber.VascI18n.name = timeIndexNumber +net.forwardfire.logstats.ejb.models.LogValueLine.valueIndexNumber.VascI18n.description = valueIndexNumber +net.forwardfire.logstats.ejb.models.LogValueLine.valueIndexNumber.VascI18n.name = valueIndexNumber +net.forwardfire.logstats.ejb.models.LogValueLine.valueMinimal.VascI18n.description = valueMinimal +net.forwardfire.logstats.ejb.models.LogValueLine.valueMinimal.VascI18n.name = valueMinimal +net.forwardfire.logstats.ejb.models.LogValueType.VascI18n.description = logValueType +net.forwardfire.logstats.ejb.models.LogValueType.VascI18n.name = logValueType +net.forwardfire.logstats.ejb.models.LogValueType.valueType.VascI18n.description = valueType +net.forwardfire.logstats.ejb.models.LogValueType.valueType.VascI18n.name = valueType diff --git a/logstats-ejb/src/main/resources/net/forwardfire/logstats/resources/i18n/LogstatsBundleEJB_nl.properties b/logstats-ejb/src/main/resources/net/forwardfire/logstats/resources/i18n/LogstatsBundleEJB_nl.properties new file mode 100644 index 0000000..dd65487 --- /dev/null +++ b/logstats-ejb/src/main/resources/net/forwardfire/logstats/resources/i18n/LogstatsBundleEJB_nl.properties @@ -0,0 +1,174 @@ + +generic.active.labelText = active +generic.active.toolTipText = active +generic.createdDate.labelText = createdDate +generic.createdDate.toolTipText = createdDate +generic.description.labelText = description +generic.description.toolTipText = description +generic.id.labelText = id +generic.id.toolTipText = id +generic.modifiedDate.labelText = modifiedDate +generic.modifiedDate.toolTipText = modifiedDate +generic.name.labelText = name +generic.name.toolTipText = name +generic.orderNumber.labelText = orderNumber +generic.orderNumber.toolTipText = orderNumber + +# hibernate validators +validator.assertFalse=assertion failed +validator.assertTrue=assertion failed +validator.future=Date must lie in the future +validator.length=Field must contain between {min} and {max} characters. +validator.max=Value must be equal to or lower than {value} +validator.min=Value must be equal to or higher than {value} +validator.notNull=A value must be entered +validator.past=Date must lie in the future +validator.pattern=Value must conform to "{regex}" +validator.range=Value must lie between {min} and {max} +validator.size=There must be between {min} and {max} characters +validator.email=The value must be a valid e-mail address + +# vasc validators +vasc.validator.VascDateFutureValidator=The date must lie in the future. +vasc.validator.VascDatePastValidator=The date must lie in the past. +vasc.validator.VascIntSizeValidator=Value must lie between {0} and {1} +vasc.validator.VascLongSizeValidator=Value must lie between {0} and {1} +vasc.validator.VascObjectNotNullValidator=A value must be entered +vasc.validator.VascObjectNullValidator=No value may be entered +vasc.validator.VascStringEmailValidator=The value must be a valid e-mail address +vasc.validator.VascStringLengthValidator=There must be at least {0} and at most {1} items +vasc.validator.VascStringRegexValidator=Value must conform to "{0}" +vasc.validator.VascStringZipCodeValidator=Value must be a valid post code. + +# Vasc actions labels +vasc.action.addRowAction.description = add a new record +vasc.action.addRowAction.name = Add +vasc.action.csvExportAction.description = CSV +vasc.action.csvExportAction.name = CSV +vasc.action.xmlExportAction.description = XML +vasc.action.xmlExportAction.name = XML +vasc.action.deleteRowAction.description = delete +vasc.action.deleteRowAction.name = delete +vasc.action.downloadAction.description = Select this record. +vasc.action.downloadAction.name = Select +vasc.action.editRowAction.description = edit +vasc.action.editRowAction.name = Edit + + +vasc.entry.logDataLastDay.listDescription = View logDataLastDay +vasc.entry.logDataLastDay.name = logDataLastDay +vasc.entry.logHostAdmin.listDescription = View logHostAdmin +vasc.entry.logHostAdmin.name = logHostAdmin +vasc.entry.logHostGroupAdmin.listDescription = View logHostGroupAdmin +vasc.entry.logHostGroupAdmin.name = logHostGroupAdmin +vasc.entry.logLevelAdmin.listDescription = View logLevelAdmin +vasc.entry.logLevelAdmin.name = logLevelAdmin +vasc.entry.logRightRoleAdmin.listDescription = View logRightRoleAdmin +vasc.entry.logRightRoleAdmin.name = logRightRoleAdmin +vasc.entry.logSourceAdmin.listDescription = View logSourceAdmin +vasc.entry.logSourceAdmin.name = logSourceAdmin +vasc.entry.logUserAdmin.listDescription = View logUserAdmin +vasc.entry.logUserAdmin.name = logUserAdmin +vasc.entry.logUserRightRoleLink.listDescription = View logUserRightRoleLink +vasc.entry.logUserRightRoleLink.name = logUserRightRoleLink +vasc.entry.logUserSettingLink.listDescription = View logUserSettingLink +vasc.entry.logUserSettingLink.name = logUserSettingLink +vasc.entry.logValueAdmin.listDescription = View logValueAdmin +vasc.entry.logValueAdmin.name = logValueAdmin +vasc.entry.logValueLineLink.listDescription = View logValueLineLink +vasc.entry.logValueLineLink.name = logValueLineLink +vasc.entry.logValueTypeAdmin.listDescription = View logValueTypeAdmin +vasc.entry.logValueTypeAdmin.name = logValueTypeAdmin + +net.forwardfire.logstats.ejb.models.LogData.VascI18n.description = LogData +net.forwardfire.logstats.ejb.models.LogData.VascI18n.name = LogData +net.forwardfire.logstats.ejb.models.LogData.hostname.VascI18n.description = hostname +net.forwardfire.logstats.ejb.models.LogData.hostname.VascI18n.name = hostname +net.forwardfire.logstats.ejb.models.LogData.logDate.VascI18n.description = logDate +net.forwardfire.logstats.ejb.models.LogData.logDate.VascI18n.name = logDate +net.forwardfire.logstats.ejb.models.LogData.logLevel.VascI18n.description = logLevel +net.forwardfire.logstats.ejb.models.LogData.logLevel.VascI18n.name = logLevel +net.forwardfire.logstats.ejb.models.LogData.message.VascI18n.description = message +net.forwardfire.logstats.ejb.models.LogData.message.VascI18n.name = message +net.forwardfire.logstats.ejb.models.LogData.source.VascI18n.description = source +net.forwardfire.logstats.ejb.models.LogData.source.VascI18n.name = source +net.forwardfire.logstats.ejb.models.LogHost.VascI18n.description = LogHost +net.forwardfire.logstats.ejb.models.LogHost.VascI18n.name = LogHost +net.forwardfire.logstats.ejb.models.LogHost.hostname.VascI18n.description = hostname +net.forwardfire.logstats.ejb.models.LogHost.hostname.VascI18n.name = hostname +net.forwardfire.logstats.ejb.models.LogHostGroup.VascI18n.description = logHostGroup +net.forwardfire.logstats.ejb.models.LogHostGroup.VascI18n.name = logHostGroup +net.forwardfire.logstats.ejb.models.LogLevel.VascI18n.description = LogLevel +net.forwardfire.logstats.ejb.models.LogLevel.VascI18n.name = LogLevel +net.forwardfire.logstats.ejb.models.LogLevel.levelNumber.VascI18n.description = levelNumber +net.forwardfire.logstats.ejb.models.LogLevel.levelNumber.VascI18n.name = levelNumber +net.forwardfire.logstats.ejb.models.LogLevel.levelType.VascI18n.description = levelType +net.forwardfire.logstats.ejb.models.LogLevel.levelType.VascI18n.name = levelType +net.forwardfire.logstats.ejb.models.LogRightRole.VascI18n.description = LogRightRole +net.forwardfire.logstats.ejb.models.LogRightRole.VascI18n.name = LogRightRole +net.forwardfire.logstats.ejb.models.LogRightRole.roleKey.VascI18n.description = roleKey +net.forwardfire.logstats.ejb.models.LogRightRole.roleKey.VascI18n.name = roleKey +net.forwardfire.logstats.ejb.models.LogSource.VascI18n.description = LogSource +net.forwardfire.logstats.ejb.models.LogSource.VascI18n.name = LogSource +net.forwardfire.logstats.ejb.models.LogSource.source.VascI18n.description = source +net.forwardfire.logstats.ejb.models.LogSource.source.VascI18n.name = source +net.forwardfire.logstats.ejb.models.LogStats.VascI18n.description = LogStats +net.forwardfire.logstats.ejb.models.LogStats.VascI18n.name = LogStats +net.forwardfire.logstats.ejb.models.LogStats.logDay.VascI18n.description = logDay +net.forwardfire.logstats.ejb.models.LogStats.logDay.VascI18n.name = logDay +net.forwardfire.logstats.ejb.models.LogStats.logHost.VascI18n.description = logHost +net.forwardfire.logstats.ejb.models.LogStats.logHost.VascI18n.name = logHost +net.forwardfire.logstats.ejb.models.LogStats.logHostId.VascI18n.description = logHostId +net.forwardfire.logstats.ejb.models.LogStats.logHostId.VascI18n.name = logHostId +net.forwardfire.logstats.ejb.models.LogStats.logSource.VascI18n.description = logSource +net.forwardfire.logstats.ejb.models.LogStats.logSource.VascI18n.name = logSource +net.forwardfire.logstats.ejb.models.LogStats.logSourceId.VascI18n.description = logSourceId +net.forwardfire.logstats.ejb.models.LogStats.logSourceId.VascI18n.name = logSourceId +net.forwardfire.logstats.ejb.models.LogStats.logValue.VascI18n.description = logValue +net.forwardfire.logstats.ejb.models.LogStats.logValue.VascI18n.name = logValue +net.forwardfire.logstats.ejb.models.LogStats.logValueId.VascI18n.description = logValueId +net.forwardfire.logstats.ejb.models.LogStats.logValueId.VascI18n.name = logValueId +net.forwardfire.logstats.ejb.models.LogStats.timeAvg.VascI18n.description = timeAvg +net.forwardfire.logstats.ejb.models.LogStats.timeAvg.VascI18n.name = timeAvg +net.forwardfire.logstats.ejb.models.LogStats.timeMax.VascI18n.description = timeMax +net.forwardfire.logstats.ejb.models.LogStats.timeMax.VascI18n.name = timeMax +net.forwardfire.logstats.ejb.models.LogStats.timeMin.VascI18n.description = timeMin +net.forwardfire.logstats.ejb.models.LogStats.timeMin.VascI18n.name = timeMin +net.forwardfire.logstats.ejb.models.LogStats.valueCount.VascI18n.description = valueCount +net.forwardfire.logstats.ejb.models.LogStats.valueCount.VascI18n.name = valueCount +net.forwardfire.logstats.ejb.models.LogStats.valueText.VascI18n.description = valueText +net.forwardfire.logstats.ejb.models.LogStats.valueText.VascI18n.name = valueText +net.forwardfire.logstats.ejb.models.LogUser.VascI18n.description = LogUser +net.forwardfire.logstats.ejb.models.LogUser.VascI18n.name = LogUser +net.forwardfire.logstats.ejb.models.LogUser.i18nLocale.VascI18n.description = i18nLocale +net.forwardfire.logstats.ejb.models.LogUser.i18nLocale.VascI18n.name = i18nLocale +net.forwardfire.logstats.ejb.models.LogUser.password.VascI18n.description = password +net.forwardfire.logstats.ejb.models.LogUser.password.VascI18n.name = password +net.forwardfire.logstats.ejb.models.LogUser.username.VascI18n.description = username +net.forwardfire.logstats.ejb.models.LogUser.username.VascI18n.name = username +net.forwardfire.logstats.ejb.models.LogUserRightRole.VascI18n.description = LogUserRightRole +net.forwardfire.logstats.ejb.models.LogUserRightRole.VascI18n.name = LogUserRightRole +net.forwardfire.logstats.ejb.models.LogUserSetting.VascI18n.description = LogUserSetting +net.forwardfire.logstats.ejb.models.LogUserSetting.VascI18n.name = LogUserSetting +net.forwardfire.logstats.ejb.models.LogUserSetting.value.VascI18n.description = value +net.forwardfire.logstats.ejb.models.LogUserSetting.value.VascI18n.name = value +net.forwardfire.logstats.ejb.models.LogValue.VascI18n.description = LogValue +net.forwardfire.logstats.ejb.models.LogValue.VascI18n.name = LogValue +net.forwardfire.logstats.ejb.models.LogValueLine.VascI18n.description = LogValueLine +net.forwardfire.logstats.ejb.models.LogValueLine.VascI18n.name = LogValueLine +net.forwardfire.logstats.ejb.models.LogValueLine.splitRegex.VascI18n.description = splitRegex +net.forwardfire.logstats.ejb.models.LogValueLine.splitRegex.VascI18n.name = splitRegex +net.forwardfire.logstats.ejb.models.LogValueLine.startDate.VascI18n.description = startDate +net.forwardfire.logstats.ejb.models.LogValueLine.startDate.VascI18n.name = startDate +net.forwardfire.logstats.ejb.models.LogValueLine.stopDate.VascI18n.description = stopDate +net.forwardfire.logstats.ejb.models.LogValueLine.stopDate.VascI18n.name = stopDate +net.forwardfire.logstats.ejb.models.LogValueLine.timeIndexNumber.VascI18n.description = timeIndexNumber +net.forwardfire.logstats.ejb.models.LogValueLine.timeIndexNumber.VascI18n.name = timeIndexNumber +net.forwardfire.logstats.ejb.models.LogValueLine.valueIndexNumber.VascI18n.description = valueIndexNumber +net.forwardfire.logstats.ejb.models.LogValueLine.valueIndexNumber.VascI18n.name = valueIndexNumber +net.forwardfire.logstats.ejb.models.LogValueLine.valueMinimal.VascI18n.description = valueMinimal +net.forwardfire.logstats.ejb.models.LogValueLine.valueMinimal.VascI18n.name = valueMinimal +net.forwardfire.logstats.ejb.models.LogValueType.VascI18n.description = logValueType +net.forwardfire.logstats.ejb.models.LogValueType.VascI18n.name = logValueType +net.forwardfire.logstats.ejb.models.LogValueType.valueType.VascI18n.description = valueType +net.forwardfire.logstats.ejb.models.LogValueType.valueType.VascI18n.name = valueType diff --git a/logstats-ejb/src/main/resources/net/forwardfire/logstats/resources/vasc/logstats.xml b/logstats-ejb/src/main/resources/net/forwardfire/logstats/resources/vasc/logstats.xml new file mode 100644 index 0000000..ca80e08 --- /dev/null +++ b/logstats-ejb/src/main/resources/net/forwardfire/logstats/resources/vasc/logstats.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/logstats-ejb/src/main/resources/net/forwardfire/logstats/resources/xpql/logstats.xml b/logstats-ejb/src/main/resources/net/forwardfire/logstats/resources/xpql/logstats.xml new file mode 100644 index 0000000..df44cca --- /dev/null +++ b/logstats-ejb/src/main/resources/net/forwardfire/logstats/resources/xpql/logstats.xml @@ -0,0 +1,117 @@ + + + + + SELECT lu FROM LogUser AS lu + + + + SELECT lu FROM LogUser AS lu + WHERE lu.username= + + + + + + SELECT lrr FROM LogRightRole AS lrr + + + + SELECT lrr FROM LogRightRole AS lrr + WHERE lrr.id IN (SELECT lurr.logRightRole.id FROM LogUserRightRole AS lurr WHERE lurr.logUser.username=) + + + + + + + SELECT lus FROM LogUserSetting AS lus + WHERE lus.logUser.id= + + + + + + + SELECT lurr FROM LogUserRightRole AS lurr + WHERE lurr.logUser.id= + + + + + + SELECT lhg FROM LogHostGroup AS lhg + + + + SELECT lh FROM LogHost AS lh INNER JOIN FETCH lh.logHostGroup + + + + SELECT ls FROM LogSource AS ls + + + + SELECT lvt FROM LogValueType AS lvt + + + + SELECT ll FROM LogLevel AS ll + + + + SELECT lsr FROM LogServerRun AS lsr WHERE (extract(doy FROM now()) - extract(doy FROM lsr.startDate)) < 1 ORDER BY lsr.startDate + + + + SELECT lsr FROM LogServerRun AS lsr WHERE lsr.id = (SELECT MAX(lsr2.id) FROM LogServerRun AS lsr2) + + + + SELECT lv FROM LogValue AS lv INNER JOIN FETCH lv.logValueType AS lvt + + + + + SELECT lvl FROM LogValueLine AS lvl + INNER JOIN FETCH lvl.logLevel + LEFT JOIN FETCH lvl.logHost + LEFT JOIN FETCH lvl.logSource + LEFT JOIN FETCH lvl.logValue AS lv + LEFT JOIN FETCH lv.logValueType + WHERE lvl.active=true + + + + + + SELECT lvl FROM LogValueLine AS lvl + INNER JOIN FETCH lvl.logLevel + LEFT JOIN FETCH lvl.logHost + LEFT JOIN FETCH lvl.logSource + LEFT JOIN FETCH lvl.logValue + WHERE lvl.logValue.id= + + + + + + SELECT ld FROM LogData AS ld WHERE (extract(doy FROM now()) - extract(doy FROM ld.logDate)) < 1 ORDER BY ld.logDate + + + + SELECT ld FROM LogData AS ld WHERE ld.id > AND (extract(doy FROM now()) - extract(doy FROM ld.logDate)) = 0 + + + + + SELECT count(ld.id) FROM LogData AS ld WHERE (extract(doy FROM now()) - extract(doy FROM ld.logDate)) < 1 + + + + SELECT ls FROM LogStats AS ls WHERE (extract(doy FROM now()) - extract(doy FROM ls.logDay)) = 0 + + + \ No newline at end of file diff --git a/logstats-ejb/src/test/java/net/forwardfire/logstats/ejb/models/I18nTests.java b/logstats-ejb/src/test/java/net/forwardfire/logstats/ejb/models/I18nTests.java new file mode 100644 index 0000000..426dd46 --- /dev/null +++ b/logstats-ejb/src/test/java/net/forwardfire/logstats/ejb/models/I18nTests.java @@ -0,0 +1,222 @@ +package net.forwardfire.logstats.ejb.models; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.ResourceBundle; + +import net.forwardfire.logstats.ejb.models.LogData; +import net.forwardfire.logstats.ejb.models.LogHost; +import net.forwardfire.logstats.ejb.models.LogHostGroup; +import net.forwardfire.logstats.ejb.models.LogLevel; +import net.forwardfire.logstats.ejb.models.LogRightRole; +import net.forwardfire.logstats.ejb.models.LogSource; +import net.forwardfire.logstats.ejb.models.LogStats; +import net.forwardfire.logstats.ejb.models.LogUser; +import net.forwardfire.logstats.ejb.models.LogUserRightRole; +import net.forwardfire.logstats.ejb.models.LogUserSetting; +import net.forwardfire.logstats.ejb.models.LogValue; +import net.forwardfire.logstats.ejb.models.LogValueLine; +import net.forwardfire.logstats.ejb.models.LogValueType; +import net.forwardfire.vasc.annotations.VascBundleKeyGenerator; +import net.forwardfire.vasc.core.VascEntry; +import net.forwardfire.vasc.core.VascEntryField; +import net.forwardfire.vasc.core.actions.VascAction; + +import junit.framework.TestCase; + + +public class I18nTests extends TestCase { + + public void testI18nKeys() throws Exception { + VascBundleKeyGenerator gen = new VascBundleKeyGenerator(); + gen.setGenerateImage(false); + gen.setGenerateHelpId(false); + + gen.addModelClass(LogData.class); + gen.addModelClass(LogHost.class); + gen.addModelClass(LogHostGroup.class); + gen.addModelClass(LogLevel.class); + gen.addModelClass(LogRightRole.class); + gen.addModelClass(LogSource.class); + gen.addModelClass(LogStats.class); + gen.addModelClass(LogUser.class); + gen.addModelClass(LogUserRightRole.class); + gen.addModelClass(LogUserSetting.class); + gen.addModelClass(LogValue.class); + gen.addModelClass(LogValueLine.class); + gen.addModelClass(LogValueType.class); + + // print stuff + StringBuffer buf = new StringBuffer(2000); + + int totalModels = gen.getModelClasses().size(); + buf.append("\n===Model classes: "+totalModels); + + //buf.append("\n======== START ALL =========\n"); + //gen.generateKeys(buf); + //buf.append("\n======== END ALL =========\n"); + + buf.append("\n======== START MISSING =========\n"); + gen.generateMissingKeys(buf, ResourceBundle.getBundle("net/forwardfire/logstats/resources/i18n/LogstatsBundleEJB")); + buf.append("\n======== END MISSING =========\n"); + + buf.append("\n======== START REMOVE =========\n"); + gen.generateRemoveKeys(buf, ResourceBundle.getBundle("net/forwardfire/logstats/resources/i18n/LogstatsBundleEJB"),"vasc(.*)|validator(.*)|generic(.*)"); + buf.append("\n======== END REMOVE =========\n"); + + buf.append("\n======== START DUPS =========\n"); + for (String dup:gen.getDubIdNameKeys()) { + buf.append(dup); + buf.append('\n'); + } + buf.append("\n======== END DUPS =========\n"); + + System.out.println(buf); + + } + + + + private Map keys = new HashMap(300); + + public void testVascI18nKeys() throws Exception { + + // load sql + //XtesManager xtes = new XtesManager(); + //xtes.loadAll(); + + // load vasc xml + /* + VascManager vasc = new VascManager(); + vasc.xtesManager = xtes; + VascController controller = vasc.getVascController(); + + StringBuffer buf = new StringBuffer(2000); + + if (keys.isEmpty()==false) { + keys.clear(); + } + + + for (String id:controller.getVascEntryController().getVascEntryIds()) { + VascEntry entry = controller.getVascEntryController().getVascEntryById(id); + generateKeys(entry); + } + + //buf.append("\n======== START ALL =========\n"); + //printKeys(buf); + //buf.append("\n======== END ALL =========\n"); + + buf.append("\n======== START MISSING =========\n"); + generateMissingKeys(buf, ResourceBundle.getBundle("net/forwardfire/logstats/resources/i18n/LogstatsBundleEJB")); + buf.append("\n======== END MISSING =========\n"); + + buf.append("\n======== START REMOVE =========\n"); + generateRemoveKeys(buf, ResourceBundle.getBundle("net/forwardfire/logstats/resources/i18n/LogstatsBundleEJB"),"vasc.validator(.*)|validator(.*)|generic(.*)"); + buf.append("\n======== END REMOVE =========\n"); + + // So stats + buf.append("Total entries: "+controller.getVascEntryController().getVascEntryIds().size()+"\n"); + int lists = 0; + int edits = 0; + int links = 0; + int fields = 0; + int rowActions = 0; + for (String id:controller.getVascEntryController().getVascEntryIds()) { + VascEntry entry = controller.getVascEntryController().getVascEntryById(id); + if (entry.isVascAdminList()) { + lists++; + } + if (entry.isVascAdminEdit()) { + edits++; + } + links+=entry.getVascLinkEntries().size(); + fields+=entry.getVascEntryFields().size(); + rowActions+=entry.getRowActions().size(); + } + buf.append("Total lists: "+lists+"\n"); + buf.append("Total edits: "+edits+"\n"); + buf.append("Total links: "+links+"\n"); + buf.append("Total fields: "+fields+"\n"); + buf.append("Total rowActions: "+rowActions+"\n"); + + System.out.println(buf); + */ + } + + public void generateKeys(VascEntry entry) { + appendKey(entry.getName(),entry.getId()); + appendKey(entry.getListDescription(),"View "+entry.getId()); + appendKey(entry.getEditDescription(),"Edit "+entry.getId()); + appendKey(entry.getDeleteDescription(),"Delete "+entry.getId()); + + for (VascAction action:entry.getGlobalActions()) { + appendKey(action.getName(),action.getId()); + appendKey(action.getDescription(),action.getId()); + } + for (VascAction action:entry.getRowActions()) { + appendKey(action.getName(),action.getId()); + appendKey(action.getDescription(),action.getId()); + } + for (VascAction action:entry.getColumnActions()) { + appendKey(action.getName(),action.getId()); + appendKey(action.getDescription(),action.getId()); + } + for (VascEntryField option:entry.getListOptions()) { + appendKey(option.getName(),option.getId()); + } + } + + public void printKeys(StringBuffer buffer) { + List keys2 = new ArrayList(keys.keySet()); + Collections.sort(keys2); + for (String key:keys2) { + String value = keys.get(key); + buffer.append(key); + buffer.append(" = "); + buffer.append(value); + buffer.append('\n'); + } + } + + public void generateMissingKeys(StringBuffer buffer,ResourceBundle bundle) { + List keys2 = new ArrayList(keys.keySet()); + keys2.removeAll(bundle.keySet()); + Collections.sort(keys2); + for (String key:keys2) { + String value = keys.get(key); + buffer.append(key); + buffer.append(" = "); + buffer.append(value); + buffer.append('\n'); + } + } + + public void generateRemoveKeys(StringBuffer buffer,ResourceBundle bundle,String excludeRegex) { + List keys2 = new ArrayList(bundle.keySet()); + keys2.removeAll(keys.keySet()); + Collections.sort(keys2); + for (String key:keys2) { + // exlude code and user keys + if (excludeRegex!=null && key.matches(excludeRegex)) { + continue; + } + buffer.append(key); + buffer.append('\n'); + } + } + + + private void appendKey(String key,String value) { + if (key==null) { + return; // hackje untill we have x4o templating + } + if (keys.containsKey(key)) { + return; + } + keys.put(key, value); + } +} diff --git a/logstats-jboss-sar/.classpath b/logstats-jboss-sar/.classpath new file mode 100644 index 0000000..7106942 --- /dev/null +++ b/logstats-jboss-sar/.classpath @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/logstats-jboss-sar/.project b/logstats-jboss-sar/.project new file mode 100644 index 0000000..1e5c745 --- /dev/null +++ b/logstats-jboss-sar/.project @@ -0,0 +1,23 @@ + + + logstats-jboss-sar + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + org.eclipse.jdt.core.javanature + + diff --git a/logstats-jboss-sar/.settings/org.eclipse.core.resources.prefs b/logstats-jboss-sar/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..36025ca --- /dev/null +++ b/logstats-jboss-sar/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,7 @@ +#Mon Jan 02 23:18:49 CET 2012 +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding//src/test/resources=UTF-8 +encoding/=UTF-8 diff --git a/logstats-jboss-sar/.settings/org.eclipse.jdt.core.prefs b/logstats-jboss-sar/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..9b09027 --- /dev/null +++ b/logstats-jboss-sar/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,6 @@ +#Sat Jun 12 01:12:26 CEST 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/logstats-jboss-sar/.settings/org.eclipse.m2e.core.prefs b/logstats-jboss-sar/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..bf4333d --- /dev/null +++ b/logstats-jboss-sar/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,5 @@ +#Mon Jan 02 23:18:47 CET 2012 +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/logstats-jboss-sar/.settings/org.maven.ide.eclipse.prefs b/logstats-jboss-sar/.settings/org.maven.ide.eclipse.prefs new file mode 100644 index 0000000..0cef1b3 --- /dev/null +++ b/logstats-jboss-sar/.settings/org.maven.ide.eclipse.prefs @@ -0,0 +1,9 @@ +#Sat Jun 12 01:12:25 CEST 2010 +activeProfiles= +eclipse.preferences.version=1 +fullBuildGoals=process-test-resources +includeModules=false +resolveWorkspaceProjects=true +resourceFilterGoals=process-resources resources\:testResources +skipCompilerPlugin=true +version=1 diff --git a/logstats-jboss-sar/pom.xml b/logstats-jboss-sar/pom.xml new file mode 100644 index 0000000..74b7920 --- /dev/null +++ b/logstats-jboss-sar/pom.xml @@ -0,0 +1,27 @@ + + 4.0.0 + + logstats + net.forwardfire.logstats + 0.0.1-SNAPSHOT + + logstats-jboss-sar + jboss-sar + logstats-jboss-sar + logstats-jboss-sar + + + + org.jboss.jbossas + jboss-as-system-jmx + 5.1.0.GA + provided + + + \ No newline at end of file diff --git a/logstats-jboss-sar/src/main/java/net/forwardfire/logstats/jboss/log4j/DataSourceLog4jAppender.java b/logstats-jboss-sar/src/main/java/net/forwardfire/logstats/jboss/log4j/DataSourceLog4jAppender.java new file mode 100644 index 0000000..a4489af --- /dev/null +++ b/logstats-jboss-sar/src/main/java/net/forwardfire/logstats/jboss/log4j/DataSourceLog4jAppender.java @@ -0,0 +1,67 @@ +package net.forwardfire.logstats.jboss.log4j; + +import org.apache.log4j.AppenderSkeleton; +import org.apache.log4j.spi.LoggingEvent; +import org.jboss.logging.Logger; + +/** + * Appends log4j messages to the logService MBean + * + * @author Willem Cazander + * @version 1.0 Jun 09, 2010 + */ +public class DataSourceLog4jAppender extends AppenderSkeleton { + + private DataSourceLogService logService = null; + private Logger logger = Logger.getLogger(DataSourceLog4jAppender.class.getName()); + + /** + * constructor + * @throws Exception + */ + public DataSourceLog4jAppender(DataSourceLogService logService) { + super(); + if (logService==null) { + throw new NullPointerException("Can't start with null logService."); + } + this.logService=logService; + setName(logService.getLog4jAppenderName()); + logger.info("Created DataSourceLog4jAppender with name: "+getName()); + } + + + /** + * Closes this appender privately. + */ + public void shutdown() { + logService = null; + logger.info("Closed DataSourceLog4jAppender with name: "+getName()); + } + + /** + * Closes this appender but is left empty because of fake call. + */ + public void close() { + } + + /** + * Put LoggingEvent in queue for processing. + */ + public void append(LoggingEvent event) { + if (logService==null) { + return; + } + try { + logService.putLoggingEvent(event); + } catch (InterruptedException e) { + // we don't log in appender, in case of loop. + } + } + + /** + * DataSourceLog4jAppender don't require a layout. + */ + public boolean requiresLayout() { + return false; + } +} \ No newline at end of file diff --git a/logstats-jboss-sar/src/main/java/net/forwardfire/logstats/jboss/log4j/DataSourceLogPersistThread.java b/logstats-jboss-sar/src/main/java/net/forwardfire/logstats/jboss/log4j/DataSourceLogPersistThread.java new file mode 100644 index 0000000..5f871c8 --- /dev/null +++ b/logstats-jboss-sar/src/main/java/net/forwardfire/logstats/jboss/log4j/DataSourceLogPersistThread.java @@ -0,0 +1,222 @@ + + +package net.forwardfire.logstats.jboss.log4j; + +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.sql.Timestamp; + +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.NamingException; +import javax.sql.DataSource; + +import org.apache.log4j.Level; +import org.apache.log4j.spi.LoggingEvent; +import org.jboss.logging.Logger; + +/** + * Perists the messages of the queue + * + * @author Willem Cazander + * @version 1.0 Jun 09, 2010 + */ +public class DataSourceLogPersistThread extends Thread { + + private DataSourceLogService logService = null; + private Logger logger = Logger.getLogger(DataSourceLogPersistThread.class.getName()); + + /** + * Constructor with the LogService + * @param logService + */ + public DataSourceLogPersistThread(DataSourceLogService logService) { + this.logService = logService; + } + + /** + * Perists the messages of the queue + * + * @see java.lang.Thread#run() + */ + @Override + public void run() { + long idleTimer = System.currentTimeMillis(); + + // setup DB connection from datasource + Connection conn = null; + try { + conn = getConnection(); + } catch (SQLException e) { + logger.error("init getConnection failed, error: "+e.getMessage(),e); + return; + } catch (NamingException e) { + logger.error("init getConnection datasource lookup failed, error: "+e.getMessage(),e); + return; + } + + // Get hostname setup + String hostname = null; + try { + hostname = InetAddress.getLocalHost().getHostName(); + } catch (UnknownHostException e) { + logger.error("init getLocalHost failed, error: "+e.getMessage(),e); + try { + conn.close(); + } catch (SQLException se) { + logger.warn("init connection close failed, SQLException: "+se.getMessage(),e); + } + return; + } + if (logService.getBackendHostname()!=null && logService.getBackendHostname().isEmpty()==false) { + hostname = logService.getBackendHostname(); + } + + // Test and record out one thread + try { + storeLogData(conn,hostname,System.currentTimeMillis(),Level.DEBUG.toInt(),this.getClass().getName(),"Startup and connection of thread: "+getName()); + } catch (SQLException e) { + logger.error("test connection message error: "+e.getMessage(),e); + try { + if (conn!=null && conn.isClosed()==false) { + conn.close(); + } + } catch (SQLException se) { + logger.warn("test connection close failed, SQLException: "+se.getMessage(),se); + } + return; + } + + // main loop + int errorCount = 0; + while (isInterrupted()==false) { + LoggingEvent logMessage = null; + try { + logMessage = logService.pollLoggingEvent(); + } catch (InterruptedException e) { + break; + } + if (logMessage!=null) { + try { + // convert + String message = convertMessage(logMessage.getMessage()); + + // persist message + storeLogData( conn,hostname,logMessage.timeStamp,logMessage.getLevel().toInt(),logMessage.getLoggerName(),message ); + + } catch (SQLException se) { + if (errorCount==0) { + logger.error("storeLogData() failed, error: "+se.getMessage()); + } + errorCount++; + if (errorCount>1000) { + logger.error("storeLogData() failed 1000 times, last error: "+se.getMessage()); + errorCount=0; + } + } + } else { + if (checkConnection(conn) == false) { + try { + if (conn!=null && conn.isClosed()==false) { + conn.close(); + } + } catch (SQLException se) { + logger.warn("connection close failed, SQLException: "+se.getMessage(),se); + } + try { + conn = getConnection(); + } catch (Exception ee) { + logger.error("failure in getConnection() error:"+ee.getMessage(),ee); + break; + } + } else { + if (logService.getBackendIdleMarkerTime()>0) { + // check for update of idle timer + if ((System.currentTimeMillis()-idleTimer) > logService.getBackendIdleMarkerTime()*1000) { + idleTimer = System.currentTimeMillis(); + logger.info(logService.getBackendIdleMarkerMessage()+" thread: "+getName()); + } + } + } + } + } + + // exit thread + logger.info("shutdown thread: "+getName()); + try { + if (conn!=null && conn.isClosed()==false) { + conn.close(); + } + } catch (SQLException e) { + logger.warn("connection close failed, SQLException: "+e.getMessage()); + } + } + + private Connection getConnection() throws SQLException,NamingException { + String dataSourceName = logService.getBackendDataSource(); + logger.debug("Getting connection from datasource: "+dataSourceName+" for thread: "+getName()); + Context naming = new InitialContext(); + DataSource dataSource = (DataSource) naming.lookup(dataSourceName); + return dataSource.getConnection(); + } + + public boolean checkConnection(Connection connection) { + if (connection==null) { + return false; + } + try { + return connection.prepareStatement(logService.getBackendKeepAliveQuery()).execute(); + } catch (SQLException e) { + logger.error("checkConnection: SQLException: "+e.getMessage(),e); + return false; + } + } + + /** + * Message is not always a string so check for some types we can handle. + * + * @param messageObj + * @return + */ + private String convertMessage(Object messageObj) { + String message = null; + if (messageObj == null ) { + message = "NULL"; + } else if (messageObj instanceof String) { + message = (String)messageObj; + } else if (messageObj instanceof Exception) { + message = ((Exception)messageObj).getMessage(); + } else { + message = messageObj.toString(); + } + return message; + } + + private void storeLogData(Connection connection,String host,long time, int level, String source, String message) throws SQLException { + PreparedStatement stmt = null; + Timestamp timeStamp = new Timestamp(time); + stmt = connection.prepareStatement(logService.getBackendLogQuery()); + String para = logService.getBackendLogQueryParameters(); + String[] paras = para.split(","); + for (int i=1;i<=paras.length;i++) { + String col = paras[i-1]; + if ("time".equals(col)) { + stmt.setTimestamp(i, timeStamp); + } else if ("level".equals(col)) { + stmt.setInt(i, level); + } else if ("host".equals(col)) { + stmt.setString(i, host); + } else if ("source".equals(col)) { + stmt.setString(i, source); + } else if ("message".equals(col)) { + stmt.setString(i, message); + } else { + throw new IllegalArgumentException("Unknow column: "+col+" on index: "+i); + } + } + stmt.execute(); + } +} \ No newline at end of file diff --git a/logstats-jboss-sar/src/main/java/net/forwardfire/logstats/jboss/log4j/DataSourceLogService.java b/logstats-jboss-sar/src/main/java/net/forwardfire/logstats/jboss/log4j/DataSourceLogService.java new file mode 100644 index 0000000..3db1740 --- /dev/null +++ b/logstats-jboss-sar/src/main/java/net/forwardfire/logstats/jboss/log4j/DataSourceLogService.java @@ -0,0 +1,433 @@ +package net.forwardfire.logstats.jboss.log4j; + +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.TimeUnit; + +import javax.xml.parsers.FactoryConfigurationError; + +import org.apache.log4j.LogManager; +import org.apache.log4j.Logger; +import org.apache.log4j.spi.LoggingEvent; +import org.apache.log4j.xml.DOMConfigurator; + +import org.jboss.logging.util.OnlyOnceErrorHandler; +import org.jboss.system.ServiceMBeanSupport; + +/** + * Jboss MBean which hooks DB logger to log4j and depends on a datasource for db access. + * + * Orginal idea was made by Edward Pilipczuk + * + * @author Willem Cazander + * @version 1.0 Jun 09, 2010 + */ +public class DataSourceLogService extends ServiceMBeanSupport implements DataSourceLogServiceMBean { + + // backend config options + private String backendDataSource = null; + private String backendLogQuery = "INSERT INTO log_data (log_date, log_level,hostname, source, message) VALUES (?,?,?,?,?)"; + private String backendLogQueryParameters = "time,level,host,source,message"; + private String backendHostname = null; + private int backendThreads = 3; + private int backendMaxQueueSize = 1500; + private int backendKeepAliveTimeout = 300; + private String backendKeepAliveQuery = "SELECT 1"; + private int backendIdleMarkerTime = 3600; + private String backendIdleMarkerMessage = "--- Mark ---"; + private boolean backendStatisticsLog = true; + private int backendStatisticsLogTime = 300; + + // log4j config options + private String log4jParseConfigResource = "META-INF/logstats-log4j.xml"; + private String log4jAppenderName = "LOGSTATS"; + private boolean log4jAppenderAutoAdd = true; + private boolean log4jAppenderAutoAddOnlyOnceError = true; + private boolean log4jAppenderToRoot = true; + + // stats counters + private int statsMessagesTotal = 0; + private int statsMessagesDropped = 0; + + // Internal state objects + volatile private boolean running = false; + private BlockingQueue messageQueue = null; + private DataSourceLog4jAppender appender = null; + private List persistThreads = null; + + // ===== Override ServiceMBeanSupport methods + + @Override + protected void startService() throws Exception { + messageQueue = new LinkedBlockingQueue(backendMaxQueueSize); + startLog4j(); + startBackend(); + running = true; + log.info("DataSourceLogService started; queueSize: "+backendMaxQueueSize+" threads: "+backendThreads); + } + + @Override + protected void stopService() throws Exception { + running = false; + try { + stopLog4j(); + } catch (Exception e) { + log.warn("Error in stopLog4j: "+e.getMessage()); + } finally { + try { + stopBackend(); + } catch (Exception e) { + log.warn("Error in stopBackend: "+e.getMessage()); + } finally { + log.info("DataSourceLogService stopped."); + } + } + } + + // =========== Private methods + + private void startBackend() { + persistThreads = new ArrayList(backendThreads); + for (int i=0;i0) { + messageQueue.put(event); + } else { + statsMessagesDropped++; + } + } + + protected LoggingEvent pollLoggingEvent() throws InterruptedException { + if (messageQueue==null) { + throw new IllegalStateException("LogService is not started"); + } + return messageQueue.poll(backendKeepAliveTimeout, TimeUnit.SECONDS); + } + + // ============== MBean methods + + /** + * Resets the stats counters + */ + public void resetStatsCounters() { + statsMessagesTotal = 0; + statsMessagesDropped = 0; + } + + /** + * @return the statsMessagesTotal + */ + public int getStatsMessagesTotal() { + return statsMessagesTotal; + } + + /** + * @return the statsMessagesDropped + */ + public int getStatsMessagesDropped() { + return statsMessagesDropped; + } + + /** + * @return the backendDataSource + */ + public String getBackendDataSource() { + return backendDataSource; + } + + /** + * @param backendDataSource the backendDataSource to set + */ + public void setBackendDataSource(String backendDataSource) { + this.backendDataSource = backendDataSource; + } + + /** + * @return the backendLogQuery + */ + public String getBackendLogQuery() { + return backendLogQuery; + } + + /** + * @param backendLogQuery the backendLogQuery to set + */ + public void setBackendLogQuery(String backendLogQuery) { + this.backendLogQuery = backendLogQuery; + } + + /** + * @return the backendLogQueryParameters + */ + public String getBackendLogQueryParameters() { + return backendLogQueryParameters; + } + + /** + * @param backendLogQueryParameters the backendLogQueryParameters to set + */ + public void setBackendLogQueryParameters(String backendLogQueryParameters) { + this.backendLogQueryParameters = backendLogQueryParameters; + } + + /** + * @return the backendHostname + */ + public String getBackendHostname() { + return backendHostname; + } + + /** + * @param backendHostname the backendHostname to set + */ + public void setBackendHostname(String backendHostname) { + this.backendHostname = backendHostname; + } + + /** + * @return the backendKeepAliveTimeout + */ + public int getBackendKeepAliveTimeout() { + return backendKeepAliveTimeout; + } + + /** + * @param backendKeepAliveTimeout the backendKeepAliveTimeout to set + */ + public void setBackendKeepAliveTimeout(int backendKeepAliveTimeout) { + this.backendKeepAliveTimeout = backendKeepAliveTimeout; + } + + /** + * @return the backendKeepAliveQuery + */ + public String getBackendKeepAliveQuery() { + return backendKeepAliveQuery; + } + + /** + * @param backendKeepAliveQuery the backendKeepAliveQuery to set + */ + public void setBackendKeepAliveQuery(String backendKeepAliveQuery) { + this.backendKeepAliveQuery = backendKeepAliveQuery; + } + + /** + * @return the backendThreads + */ + public int getBackendThreads() { + return backendThreads; + } + + /** + * @param backendThreads the backendThreads to set + */ + public void setBackendThreads(int backendThreads) { + this.backendThreads = backendThreads; + } + + /** + * @return the backendMaxQueueSize + */ + public int getBackendMaxQueueSize() { + return backendMaxQueueSize; + } + + /** + * @param backendMaxQueueSize the backendMaxQueueSize to set + */ + public void setBackendMaxQueueSize(int backendMaxQueueSize) { + this.backendMaxQueueSize = backendMaxQueueSize; + } + + /** + * @return the backendIdleMarkerTime + */ + public int getBackendIdleMarkerTime() { + return backendIdleMarkerTime; + } + + /** + * @param backendIdleMarkerTime the backendIdleMarkerTime to set + */ + public void setBackendIdleMarkerTime(int backendIdleMarkerTime) { + this.backendIdleMarkerTime = backendIdleMarkerTime; + } + + /** + * @return the backendIdleMarkerMessage + */ + public String getBackendIdleMarkerMessage() { + return backendIdleMarkerMessage; + } + + /** + * @param backendIdleMarkerMessage the backendIdleMarkerMessage to set + */ + public void setBackendIdleMarkerMessage(String backendIdleMarkerMessage) { + this.backendIdleMarkerMessage = backendIdleMarkerMessage; + } + + /** + * @return the backendStatisticsLog + */ + public boolean isBackendStatisticsLog() { + return backendStatisticsLog; + } + + /** + * @param backendStatisticsLog the backendStatisticsLog to set + */ + public void setBackendStatisticsLog(boolean backendStatisticsLog) { + this.backendStatisticsLog = backendStatisticsLog; + } + + /** + * @return the backendStatisticsLogTime + */ + public int getBackendStatisticsLogTime() { + return backendStatisticsLogTime; + } + + /** + * @param backendStatisticsLogTime the backendStatisticsLogTime to set + */ + public void setBackendStatisticsLogTime(int backendStatisticsLogTime) { + this.backendStatisticsLogTime = backendStatisticsLogTime; + } + + /** + * @return the log4jParseConfigResource + */ + public String getLog4jParseConfigResource() { + return log4jParseConfigResource; + } + + /** + * @param log4jParseConfigResource the log4jParseConfigResource to set + */ + public void setLog4jParseConfigResource(String log4jParseConfigResource) { + this.log4jParseConfigResource = log4jParseConfigResource; + } + + /** + * @return the log4jAppenderName + */ + public String getLog4jAppenderName() { + return log4jAppenderName; + } + + /** + * @param log4jAppenderName the log4jAppenderName to set + */ + public void setLog4jAppenderName(String log4jAppenderName) { + this.log4jAppenderName = log4jAppenderName; + } + + /** + * @return the log4jAppenderAutoAdd + */ + public boolean isLog4jAppenderAutoAdd() { + return log4jAppenderAutoAdd; + } + + /** + * @param log4jAppenderAutoAdd the log4jAppenderAutoAdd to set + */ + public void setLog4jAppenderAutoAdd(boolean log4jAppenderAutoAdd) { + this.log4jAppenderAutoAdd = log4jAppenderAutoAdd; + } + + /** + * @return the log4jAppenderAutoAddOnlyOnceError + */ + public boolean isLog4jAppenderAutoAddOnlyOnceError() { + return log4jAppenderAutoAddOnlyOnceError; + } + + /** + * @param log4jAppenderAutoAddOnlyOnceError the log4jAppenderAutoAddOnlyOnceError to set + */ + public void setLog4jAppenderAutoAddOnlyOnceError( + boolean log4jAppenderAutoAddOnlyOnceError) { + this.log4jAppenderAutoAddOnlyOnceError = log4jAppenderAutoAddOnlyOnceError; + } + + /** + * @return the log4jAppenderToRoot + */ + public boolean isLog4jAppenderToRoot() { + return log4jAppenderToRoot; + } + + /** + * @param log4jAppenderToRoot the log4jAppenderToRoot to set + */ + public void setLog4jAppenderToRoot(boolean log4jAppenderToRoot) { + this.log4jAppenderToRoot = log4jAppenderToRoot; + } +} \ No newline at end of file diff --git a/logstats-jboss-sar/src/main/java/net/forwardfire/logstats/jboss/log4j/DataSourceLogServiceMBean.java b/logstats-jboss-sar/src/main/java/net/forwardfire/logstats/jboss/log4j/DataSourceLogServiceMBean.java new file mode 100644 index 0000000..afeaf4b --- /dev/null +++ b/logstats-jboss-sar/src/main/java/net/forwardfire/logstats/jboss/log4j/DataSourceLogServiceMBean.java @@ -0,0 +1,198 @@ + +package net.forwardfire.logstats.jboss.log4j; + +import org.jboss.system.ServiceMBean; + +/** + * Defines all configable options of the log service MBean + * + * @author Willem Cazander + * @version 1.0 Jun 09, 2010 + */ +public interface DataSourceLogServiceMBean extends ServiceMBean { + + /** + * Resets the stats counters + */ + public void resetStatsCounters(); + + /** + * @return the statsMessagesTotal + */ + public int getStatsMessagesTotal(); + + /** + * @return the statsMessagesDropped + */ + public int getStatsMessagesDropped(); + + /** + * @return the backendDataSource + */ + public String getBackendDataSource(); + + /** + * @param backendDataSource the backendDataSource to set + */ + public void setBackendDataSource(String backendDataSource); + + /** + * @return the backendLogQuery + */ + public String getBackendLogQuery(); + + /** + * @param backendLogQuery the backendLogQuery to set + */ + public void setBackendLogQuery(String backendLogQuery); + + /** + * @return the backendLogQueryParameters + */ + public String getBackendLogQueryParameters(); + + /** + * @param backendLogQueryParameters the backendLogQueryParameters to set + */ + public void setBackendLogQueryParameters(String backendLogQueryParameters); + + /** + * @return the backendHostname + */ + public String getBackendHostname(); + + /** + * @param backendHostname the backendHostname to set + */ + public void setBackendHostname(String backendHostname); + + /** + * @return the backendKeepAliveTimeout + */ + public int getBackendKeepAliveTimeout(); + + /** + * @param backendKeepAliveTimeout the backendKeepAliveTimeout to set + */ + public void setBackendKeepAliveTimeout(int backendKeepAliveTimeout); + + /** + * @return the backendKeepAliveQuery + */ + public String getBackendKeepAliveQuery(); + + /** + * @param backendKeepAliveQuery the backendKeepAliveQuery to set + */ + public void setBackendKeepAliveQuery(String backendKeepAliveQuery); + + /** + * @return the backendThreads + */ + public int getBackendThreads(); + + /** + * @param backendThreads the backendThreads to set + */ + public void setBackendThreads(int backendThreads); + + /** + * @return the backendMaxQueueSize + */ + public int getBackendMaxQueueSize(); + + /** + * @param backendMaxQueueSize the backendMaxQueueSize to set + */ + public void setBackendMaxQueueSize(int backendMaxQueueSize); + + /** + * @return the backendIdleMarkerTime + */ + public int getBackendIdleMarkerTime(); + + /** + * @param backendIdleMarkerTime the backendIdleMarkerTime to set + */ + public void setBackendIdleMarkerTime(int backendIdleMarkerTime); + + /** + * @return the backendIdleMarkerMessage + */ + public String getBackendIdleMarkerMessage(); + + /** + * @param backendIdleMarkerMessage the backendIdleMarkerMessage to set + */ + public void setBackendIdleMarkerMessage(String backendIdleMarkerMessage); + + /** + * @return the backendStatisticsLog + */ + public boolean isBackendStatisticsLog(); + + /** + * @param backendStatisticsLog the backendStatisticsLog to set + */ + public void setBackendStatisticsLog(boolean backendStatisticsLog); + + /** + * @return the backendStatisticsLogTime + */ + public int getBackendStatisticsLogTime(); + + /** + * @param backendStatisticsLogTime the backendStatisticsLogTime to set + */ + public void setBackendStatisticsLogTime(int backendStatisticsLogTime); + + /** + * @return the log4jParseConfigResource + */ + public String getLog4jParseConfigResource(); + + /** + * @param log4jParseConfigResource the log4jParseConfigResource to set + */ + public void setLog4jParseConfigResource(String log4jParseConfigResource); + + /** + * @return the log4jAppenderName + */ + public String getLog4jAppenderName(); + + /** + * @param log4jAppenderName the log4jAppenderName to set + */ + public void setLog4jAppenderName(String log4jAppenderName); + + /** + * @return the log4jAppenderAutoAdd + */ + public boolean isLog4jAppenderAutoAdd(); + + /** + * @param log4jAppenderAutoAdd the log4jAppenderAutoAdd to set + */ + public void setLog4jAppenderAutoAdd(boolean log4jAppenderAutoAdd); + + /** + * @return the log4jAppenderAutoAddOnlyOnceError + */ + public boolean isLog4jAppenderAutoAddOnlyOnceError(); + + /** + * @param log4jAppenderAutoAddOnlyOnceError the log4jAppenderAutoAddOnlyOnceError to set + */ + public void setLog4jAppenderAutoAddOnlyOnceError(boolean log4jAppenderAutoAddOnlyOnceError); + + /** + * @return the log4jAppenderToRoot + */ + public boolean isLog4jAppenderToRoot(); + + /** + * @param log4jAppenderToRoot the log4jAppenderToRoot to set + */ + public void setLog4jAppenderToRoot(boolean log4jAppenderToRoot); +} diff --git a/logstats-jboss-sar/src/main/resources/META-INF/jboss-service.xml b/logstats-jboss-sar/src/main/resources/META-INF/jboss-service.xml new file mode 100644 index 0000000..403174d --- /dev/null +++ b/logstats-jboss-sar/src/main/resources/META-INF/jboss-service.xml @@ -0,0 +1,54 @@ + + + + + java:DataSourceLogServiceDS + + jboss.jca:service=DataSourceBinding,name=DataSourceLogServiceDS + + + + + + + \ No newline at end of file diff --git a/logstats-jboss-sar/src/main/resources/META-INF/log4j.dtd b/logstats-jboss-sar/src/main/resources/META-INF/log4j.dtd new file mode 100644 index 0000000..cfc8a5d --- /dev/null +++ b/logstats-jboss-sar/src/main/resources/META-INF/log4j.dtd @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/logstats-jboss-sar/src/main/resources/META-INF/logstats-log4j.xml b/logstats-jboss-sar/src/main/resources/META-INF/logstats-log4j.xml new file mode 100644 index 0000000..ac057b5 --- /dev/null +++ b/logstats-jboss-sar/src/main/resources/META-INF/logstats-log4j.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/logstats-war/.classpath b/logstats-war/.classpath new file mode 100644 index 0000000..ada8f32 --- /dev/null +++ b/logstats-war/.classpath @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/logstats-war/.project b/logstats-war/.project new file mode 100644 index 0000000..4fba2a8 --- /dev/null +++ b/logstats-war/.project @@ -0,0 +1,42 @@ + + + logstats-war + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.m2e.core.maven2Nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/logstats-war/.settings/.jsdtscope b/logstats-war/.settings/.jsdtscope new file mode 100644 index 0000000..b46b920 --- /dev/null +++ b/logstats-war/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/logstats-war/.settings/org.eclipse.core.resources.prefs b/logstats-war/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..d74830a --- /dev/null +++ b/logstats-war/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,8 @@ +#Mon Jan 02 23:18:50 CET 2012 +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/main/webapp=UTF-8 +encoding//src/test/java=UTF-8 +encoding//src/test/resources=UTF-8 +encoding/=UTF-8 diff --git a/logstats-war/.settings/org.eclipse.jdt.core.prefs b/logstats-war/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..8702f72 --- /dev/null +++ b/logstats-war/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,13 @@ +#Mon Jan 02 23:18:50 CET 2012 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/logstats-war/.settings/org.eclipse.m2e.core.prefs b/logstats-war/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..bf4333d --- /dev/null +++ b/logstats-war/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,5 @@ +#Mon Jan 02 23:18:47 CET 2012 +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/logstats-war/.settings/org.eclipse.wst.jsdt.ui.superType.container b/logstats-war/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/logstats-war/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/logstats-war/.settings/org.eclipse.wst.jsdt.ui.superType.name b/logstats-war/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/logstats-war/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/logstats-war/.settings/org.maven.ide.eclipse.prefs b/logstats-war/.settings/org.maven.ide.eclipse.prefs new file mode 100644 index 0000000..fcb3b16 --- /dev/null +++ b/logstats-war/.settings/org.maven.ide.eclipse.prefs @@ -0,0 +1,9 @@ +#Wed Jun 09 21:37:03 CEST 2010 +activeProfiles= +eclipse.preferences.version=1 +fullBuildGoals=process-test-resources +includeModules=false +resolveWorkspaceProjects=true +resourceFilterGoals=process-resources resources\:testResources +skipCompilerPlugin=true +version=1 diff --git a/logstats-war/pom.xml b/logstats-war/pom.xml new file mode 100644 index 0000000..e7c570e --- /dev/null +++ b/logstats-war/pom.xml @@ -0,0 +1,158 @@ + + 4.0.0 + + logstats + net.forwardfire.logstats + 0.0.1-SNAPSHOT + + logstats-war + war + logstats-war + logstats-war + + + + src/main/resources + + + src/main/java + + **/*.xml + + + + + + src/test/resources + + + src/main/webapp + + **/*.xml + + + + + + + javax.servlet + servlet-api + 2.4 + provided + + + javax.servlet + jstl + 1.2 + provided + + + javax.servlet.jsp + jsp-api + 2.1 + provided + + + taglibs + standard + 1.1.2 + provided + + + javax.ejb + ejb-api + 3.0 + provided + + + javax.persistence + persistence-api + 1.0 + provided + + + + javax.faces + jsf-api + 1.2_12 + provided + + + javax.faces + jsf-impl + 1.2_12 + provided + + + + + net.forwardfire.vasc + vasc-frontend-web-jsf + ${vasc.version} + + + net.forwardfire.vasc + vasc-ejb3 + ${vasc.version} + + + + javax.el + el-ri + 1.2 + provided + + + + javax.el + el-api + 1.2 + provided + + + + com.sun.facelets + jsf-facelets + 1.1.15.B1 + + + + + org.richfaces.framework + richfaces-api + 3.3.3-SNAPSHOT + + + + org.richfaces.framework + richfaces-impl + 3.3.3-SNAPSHOT + + + + org.richfaces.ui + richfaces-ui + 3.3.3-SNAPSHOT + + + + info.bliki.wiki + bliki-core + 3.0.13 + + + net.forwardfire.logstats + logstats-ejb + ${project.version} + ejb + + + org.hibernate + hibernate-annotations + 3.4.0.GA + provided + + + + + \ No newline at end of file diff --git a/logstats-war/src/main/java/net/forwardfire/logstats/web/beans/RealTimeController.java b/logstats-war/src/main/java/net/forwardfire/logstats/web/beans/RealTimeController.java new file mode 100644 index 0000000..16292c2 --- /dev/null +++ b/logstats-war/src/main/java/net/forwardfire/logstats/web/beans/RealTimeController.java @@ -0,0 +1,235 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.web.beans; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.regex.Pattern; +import java.util.regex.PatternSyntaxException; + +import javax.ejb.EJB; +import javax.faces.model.SelectItem; + +import net.forwardfire.logstats.ejb.models.LogData; +import net.forwardfire.logstats.ejb.services.LoginManagerRemote; +import net.forwardfire.logstats.ejb.services.ServerManagerRemote; + +/** + * + * @author Willem Cazander + * @version 1.0 Jul 06, 2010 + */ +public class RealTimeController implements Serializable { + + private static final long serialVersionUID = 1L; + + private boolean pollEnabled = true; + private boolean reversedTail = false; + private String filterHostname = null; + private Integer filterLevel = null; + private String filterRegex = null; + private Pattern filterRegexPattern = null; + private int messageRows = 40; + private int messageCols = 260; + + @EJB() + LoginManagerRemote loginManager; + + @EJB() + ServerManagerRemote serverManager; + + private StringBuilder getStartBuffer(List data) { + StringBuilder buf = new StringBuilder(); + int size = data.size(); + for (int i=0;i data = serverManager.getRealTimeLogData(); + if (reversedTail) { + Collections.reverse(data); + } + StringBuilder buf = getStartBuffer(data); + return buf.toString(); + } + + public void setMessageLogData(String voidData) { + // method so jsf is oke. + } + + /** + * @return the pollEnabled + */ + public boolean isPollEnabled() { + return pollEnabled; + } + + /** + * @param pollEnabled the pollEnabled to set + */ + public void setPollEnabled(boolean pollEnabled) { + this.pollEnabled = pollEnabled; + } + + /** + * @return the reversedTail + */ + public boolean isReversedTail() { + return reversedTail; + } + + /** + * @param reversedTail the reversedTail to set + */ + public void setReversedTail(boolean reversedTail) { + this.reversedTail = reversedTail; + } + + /** + * @return the filterHostname + */ + public String getFilterHostname() { + return filterHostname; + } + + /** + * @param filterHostname the filterHostname to set + */ + public void setFilterHostname(String filterHostname) { + this.filterHostname = filterHostname; + } + + /** + * @return the filterLevel + */ + public Integer getFilterLevel() { + return filterLevel; + } + + /** + * @param filterLevel the filterLevel to set + */ + public void setFilterLevel(Integer filterLevel) { + this.filterLevel = filterLevel; + } + + /** + * @return the filterRegex + */ + public String getFilterRegex() { + return filterRegex; + } + + /** + * @param filterRegex the filterRegex to set + */ + public void setFilterRegex(String filterRegex) { + this.filterRegex = filterRegex; + if (filterRegex!=null && filterRegex.isEmpty()==false) { + try { + filterRegexPattern = Pattern.compile(filterRegex); + } catch (PatternSyntaxException pse) { + filterRegexPattern = null; // remove old regex + pse.printStackTrace(); + } + } else { + filterRegexPattern = null; + } + } + + /** + * @return the messageRows + */ + public int getMessageRows() { + return messageRows; + } + + /** + * @param messageRows the messageRows to set + */ + public void setMessageRows(int messageRows) { + this.messageRows = messageRows; + } + + /** + * @return the messageCols + */ + public int getMessageCols() { + return messageCols; + } + + /** + * @param messageCols the messageCols to set + */ + public void setMessageCols(int messageCols) { + this.messageCols = messageCols; + } + + public List getMessageRowsSelectItems() { + List result = new ArrayList(5); + result.add(new SelectItem(10, "10")); + result.add(new SelectItem(20, "20")); + result.add(new SelectItem(40, "40")); + result.add(new SelectItem(60, "60")); + result.add(new SelectItem(80, "80")); + result.add(new SelectItem(102, "100")); // to remove scroll bar 102, buf is 100 + return result; + } + + public List getMessageColsSelectItems() { + List result = new ArrayList(5); + result.add(new SelectItem(80, "80")); + result.add(new SelectItem(120, "120")); + result.add(new SelectItem(150, "150")); + result.add(new SelectItem(200, "200")); + result.add(new SelectItem(240, "240")); + result.add(new SelectItem(260, "260")); + result.add(new SelectItem(280, "280")); + result.add(new SelectItem(300, "300")); + return result; + } +} \ No newline at end of file diff --git a/logstats-war/src/main/java/net/forwardfire/logstats/web/beans/UserController.java b/logstats-war/src/main/java/net/forwardfire/logstats/web/beans/UserController.java new file mode 100644 index 0000000..92bdbd9 --- /dev/null +++ b/logstats-war/src/main/java/net/forwardfire/logstats/web/beans/UserController.java @@ -0,0 +1,76 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.web.beans; + +import java.io.Serializable; +import java.util.List; + +import javax.ejb.EJB; + +import net.forwardfire.logstats.ejb.models.LogRightRole; +import net.forwardfire.logstats.ejb.models.LogUser; +import net.forwardfire.logstats.ejb.services.LoginManagerRemote; + +/** + * + * @author Willem Cazander + * @version 1.0 Nov 1, 2009 + */ +public class UserController implements Serializable { + + private static final long serialVersionUID = 1L; + private LogUser logUser = null; + private List logRightRoles = null; + + @EJB() + LoginManagerRemote loginManager; + + public void loginFilter() { + try { + logUser = loginManager.getUser(); + logRightRoles = loginManager.getClientRoles(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + public void logoutFilter() { + logUser = null; + logRightRoles = null; + } + + public boolean isUserLoggedin() { + if (logUser==null) { + return false; + } + return true; + } + + public LogUser getUser() { + return logUser; + } + + public List getRightRoles() { + return logRightRoles; + } +} \ No newline at end of file diff --git a/logstats-war/src/main/java/net/forwardfire/logstats/web/beans/VascFacesController.java b/logstats-war/src/main/java/net/forwardfire/logstats/web/beans/VascFacesController.java new file mode 100644 index 0000000..6901fa7 --- /dev/null +++ b/logstats-war/src/main/java/net/forwardfire/logstats/web/beans/VascFacesController.java @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.web.beans; + +import java.util.ArrayList; +import java.util.List; + +import net.forwardfire.vasc.core.VascController; +import net.forwardfire.vasc.frontends.web.jsf.AbstractJSFVascFacesController; + + +/** + * + * @author Willem Cazander + * @version 1.0 Nov 1, 2009 + */ +public class VascFacesController extends AbstractJSFVascFacesController { + + public String getVascSericeManagerJNDI() { + return "logstats-jboss/ejb/vascSericeManager/remote"; + } + public String getResourceBundleWEB() { + return "net/forwardfire/logstats/resources/i18n/LogstatsBundleWAR"; + } + public boolean getDisableI18N() { + return false; + } + public VascUserInfo getVascUserInfo() { + VascUserInfo vui = new VascUserInfo(new Long(34l),"s", new String[] {"rol1"}); + return vui; + } + public List getVascAdminEntries() { + List result = new ArrayList(50); + VascController v = getVascController(); + for (String e:v.getVascEntryController().getVascEntryIds()) { + if (e.endsWith("Link")==false) { + result.add(e); + } + } + return result; + } +} \ No newline at end of file diff --git a/logstats-war/src/main/java/net/forwardfire/logstats/web/filters/UserFilter.java b/logstats-war/src/main/java/net/forwardfire/logstats/web/filters/UserFilter.java new file mode 100644 index 0000000..c4609ab --- /dev/null +++ b/logstats-war/src/main/java/net/forwardfire/logstats/web/filters/UserFilter.java @@ -0,0 +1,104 @@ +/* + * Copyright 2009-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.logstats.web.filters; + +import java.io.IOException; +import java.util.logging.Logger; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import net.forwardfire.logstats.web.beans.UserController; + + + +/** + * Filter in and out logs of users. + * + * @author Willem Cazander + * @version 1.0 Nov 12, 2009 + */ +public class UserFilter implements Filter { + + private static final long serialVersionUID = 10l; + private Logger logger = null; + + /** + * @see javax.servlet.Filter#destroy() + */ + public void destroy() { + logger = null; + } + + /** + * @see javax.servlet.Filter#init(javax.servlet.FilterConfig) + */ + public void init(FilterConfig config) throws ServletException { + logger = Logger.getLogger(UserFilter.class.getName()); + } + + /** + * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) + */ + public void doFilter(ServletRequest servletRequest,ServletResponse servletResponse,FilterChain chain) throws IOException, ServletException { + + HttpServletRequest request = (HttpServletRequest)servletRequest; + HttpServletResponse response = (HttpServletResponse)servletResponse; + + // Let all anymous user to next filter + if (request.getUserPrincipal()==null) { + chain.doFilter(request, response); + return; + } + + UserController userController = (UserController)request.getSession().getAttribute("userController"); + if (userController==null) { + logger.info("Can't create userController for first request auth: "+request.getUserPrincipal()); + chain.doFilter(request, response); + return; + } + if (userController.isUserLoggedin()==false) { + userController.loginFilter(); + + // size session time to 20min + request.getSession().setMaxInactiveInterval(20*60*1000); + } + + // Check for logout + String path = request.getRequestURI(); + if (path.endsWith("login/logout.jsf")) { + userController.logoutFilter(); + request.getSession().invalidate(); + } + + // do rest of chain. + chain.doFilter(request, response); + } + +} \ No newline at end of file diff --git a/logstats-war/src/main/resources/META-INF/skins/logstats.skin.properties b/logstats-war/src/main/resources/META-INF/skins/logstats.skin.properties new file mode 100644 index 0000000..c993f8a --- /dev/null +++ b/logstats-war/src/main/resources/META-INF/skins/logstats.skin.properties @@ -0,0 +1,73 @@ +#Colors +headerBackgroundColor=\#EAEAEA +headerGradientColor=\#E0E0E0 +headerTextColor=#282828 +headerWeightFont=bold + +generalBackgroundColor=#FFFFFF +generalTextColor=#282828 +generalSizeFont=11px +generalFamilyFont=Arial, Helvetica, sans-serif + +controlTextColor=#282828 +controlBackgroundColor=#ffffff +additionalBackgroundColor=#ffffff + +shadowBackgroundColor=#000000 +shadowOpacity=1 + +panelBorderColor=#BED6F8 +subBorderColor=#ffffff + +tabBackgroundColor=#C6DEFF +tabDisabledTextColor=#ffffff + +trimColor=#D6E6FB + +tipBackgroundColor=\#FAE6B0 +tipBorderColor=\#E5973E + +selectControlColor=#E79A00 + + +generalLinkColor=#004DEB +hoverLinkColor=#004DEB +visitedLinkColor=#004DEB + +# Fonts +headerSizeFont=11px +headerFamilyFont=Arial, Helvetica, sans-serif + +tabSizeFont=11 +tabFamilyFont=Arial, Helvetica, sans-serif + +buttonSizeFont=11 +buttonFamilyFont=Arial, Verdana, sans-serif + + +tableBackgroundColor=#FFFFFF +tableFooterBackgroundColor=#FFFFFF +tableSubfooterBackgroundColor=#FFFFFF + + +#Calendar colors +calendarWeekBackgroundColor=#F5F5F5 + +calendarHolidaysBackgroundColor=#FFEBDA +calendarHolidaysTextColor=#FF7800 + +calendarCurrentBackgroundColor=#FF7800 +calendarCurrentTextColor=#FFEBDA + +calendarSpecBackgroundColor=#E4F5E2 +calendarSpecTextColor=#000000 + + +warningColor=#282828 +warningBackgroundColor=##EE0000 + +editorBackgroundColor=#F1F1F1 +editBackgroundColor=#FEFFDA + +#Gradients +gradientType=plain diff --git a/logstats-war/src/main/resources/net/forwardfire/logstats/resources/i18n/LogstatsBundleWAR_en.properties b/logstats-war/src/main/resources/net/forwardfire/logstats/resources/i18n/LogstatsBundleWAR_en.properties new file mode 100644 index 0000000..0111f23 --- /dev/null +++ b/logstats-war/src/main/resources/net/forwardfire/logstats/resources/i18n/LogstatsBundleWAR_en.properties @@ -0,0 +1,82 @@ + +generic.active.labelText = active +generic.active.toolTipText = active +generic.createdDate.labelText = createdDate +generic.createdDate.toolTipText = createdDate +generic.description.labelText = description +generic.description.toolTipText = description +generic.id.labelText = id +generic.id.toolTipText = id +generic.modifiedDate.labelText = modifiedDate +generic.modifiedDate.toolTipText = modifiedDate +generic.name.labelText = name +generic.name.toolTipText = name + +# hibernate validators +validator.assertFalse=assertion failed +validator.assertTrue=assertion failed +validator.future=Date must lie in the future +validator.length=Field must contain between {min} and {max} characters. +validator.max=Value must be equal to or lower than {value} +validator.min=Value must be equal to or higher than {value} +validator.notNull=A value must be entered +validator.past=Date must lie in the future +validator.pattern=Value must conform to "{regex}" +validator.range=Value must lie between {min} and {max} +validator.size=There must be between {min} and {max} characters +validator.email=The value must be a valid e-mail address + +# vasc validators +vasc.validator.VascDateFutureValidator=The date must lie in the future. +vasc.validator.VascDatePastValidator=The date must lie in the past. +vasc.validator.VascIntSizeValidator=Value must lie between {0} and {1} +vasc.validator.VascLongSizeValidator=Value must lie between {0} and {1} +vasc.validator.VascObjectNotNullValidator=A value must be entered +vasc.validator.VascObjectNullValidator=No value may be entered +vasc.validator.VascStringEmailValidator=The value must be a valid e-mail address +vasc.validator.VascStringLengthValidator=There must be at least {0} and at most {1} items +vasc.validator.VascStringRegexValidator=Value must conform to "{0}" +vasc.validator.VascStringZipCodeValidator=Value must be a valid post code. + +# Vasc actions labels +vasc.action.addRowAction.description = add a new record +vasc.action.addRowAction.name = Add +vasc.action.csvExportAction.description = CSV +vasc.action.csvExportAction.name = CSV +vasc.action.xmlExportAction.description = XML +vasc.action.xmlExportAction.name = XML +vasc.action.deleteRowAction.description = delete +vasc.action.deleteRowAction.name = delete +vasc.action.downloadAction.description = Select this record. +vasc.action.downloadAction.name = Select +vasc.action.editRowAction.description = edit +vasc.action.editRowAction.name = Edit + +# Temp jsf +generic.vasc.jsf.listOption.header = Searchoptions +generic.vasc.jsf.listOption.search = Searh\: +generic.vasc.jsf.listOption.sumbit = Search +generic.vasc.jsf.pager.previous = Previous +generic.vasc.jsf.pager.next = Next +generic.vasc.jsf.table.rows = Row Numbers\: +generic.vasc.jsf.table.pagerDirect = Go to\: +generic.vasc.jsf.table.downloadDirect = Download\: +generic.vasc.jsf.table.resultText = Results {0}-{1} from {2} rows +generic.vasc.jsf.table.download.img = Save table data. +generic.vasc.jsf.table.printer.img = Shows the table in printer friendly format. +generic.vasc.jsf.table.export.select = ... +generic.vasc.jsf.table.export.select.alt = Select Export +generic.vasc.jsf.table.page.select = ... +generic.vasc.jsf.table.page.select.alt = Select Page +generic.vasc.jsf.table.page.name = Page: +generic.vasc.jsf.table.page.description = Goto page: +generic.vasc.jsf.tableHeader.fields = Fields +generic.vasc.jsf.tableHeader.links = Links +generic.vasc.jsf.tableHeader.actions = Actions +generic.vasc.jsf.multiAction.selectAll = Select all: +generic.vasc.jsf.multiAction.name = ... +generic.vasc.jsf.multiAction.description = Select Action +generic.vasc.jsf.action.save = Save +generic.vasc.jsf.action.cancel = Cancel +generic.vasc.jsf.action.back = Back +generic.vasc.jsf.parentSelected = Selected: \ No newline at end of file diff --git a/logstats-war/src/main/resources/net/forwardfire/logstats/resources/i18n/LogstatsBundleWAR_nl.properties b/logstats-war/src/main/resources/net/forwardfire/logstats/resources/i18n/LogstatsBundleWAR_nl.properties new file mode 100644 index 0000000..0111f23 --- /dev/null +++ b/logstats-war/src/main/resources/net/forwardfire/logstats/resources/i18n/LogstatsBundleWAR_nl.properties @@ -0,0 +1,82 @@ + +generic.active.labelText = active +generic.active.toolTipText = active +generic.createdDate.labelText = createdDate +generic.createdDate.toolTipText = createdDate +generic.description.labelText = description +generic.description.toolTipText = description +generic.id.labelText = id +generic.id.toolTipText = id +generic.modifiedDate.labelText = modifiedDate +generic.modifiedDate.toolTipText = modifiedDate +generic.name.labelText = name +generic.name.toolTipText = name + +# hibernate validators +validator.assertFalse=assertion failed +validator.assertTrue=assertion failed +validator.future=Date must lie in the future +validator.length=Field must contain between {min} and {max} characters. +validator.max=Value must be equal to or lower than {value} +validator.min=Value must be equal to or higher than {value} +validator.notNull=A value must be entered +validator.past=Date must lie in the future +validator.pattern=Value must conform to "{regex}" +validator.range=Value must lie between {min} and {max} +validator.size=There must be between {min} and {max} characters +validator.email=The value must be a valid e-mail address + +# vasc validators +vasc.validator.VascDateFutureValidator=The date must lie in the future. +vasc.validator.VascDatePastValidator=The date must lie in the past. +vasc.validator.VascIntSizeValidator=Value must lie between {0} and {1} +vasc.validator.VascLongSizeValidator=Value must lie between {0} and {1} +vasc.validator.VascObjectNotNullValidator=A value must be entered +vasc.validator.VascObjectNullValidator=No value may be entered +vasc.validator.VascStringEmailValidator=The value must be a valid e-mail address +vasc.validator.VascStringLengthValidator=There must be at least {0} and at most {1} items +vasc.validator.VascStringRegexValidator=Value must conform to "{0}" +vasc.validator.VascStringZipCodeValidator=Value must be a valid post code. + +# Vasc actions labels +vasc.action.addRowAction.description = add a new record +vasc.action.addRowAction.name = Add +vasc.action.csvExportAction.description = CSV +vasc.action.csvExportAction.name = CSV +vasc.action.xmlExportAction.description = XML +vasc.action.xmlExportAction.name = XML +vasc.action.deleteRowAction.description = delete +vasc.action.deleteRowAction.name = delete +vasc.action.downloadAction.description = Select this record. +vasc.action.downloadAction.name = Select +vasc.action.editRowAction.description = edit +vasc.action.editRowAction.name = Edit + +# Temp jsf +generic.vasc.jsf.listOption.header = Searchoptions +generic.vasc.jsf.listOption.search = Searh\: +generic.vasc.jsf.listOption.sumbit = Search +generic.vasc.jsf.pager.previous = Previous +generic.vasc.jsf.pager.next = Next +generic.vasc.jsf.table.rows = Row Numbers\: +generic.vasc.jsf.table.pagerDirect = Go to\: +generic.vasc.jsf.table.downloadDirect = Download\: +generic.vasc.jsf.table.resultText = Results {0}-{1} from {2} rows +generic.vasc.jsf.table.download.img = Save table data. +generic.vasc.jsf.table.printer.img = Shows the table in printer friendly format. +generic.vasc.jsf.table.export.select = ... +generic.vasc.jsf.table.export.select.alt = Select Export +generic.vasc.jsf.table.page.select = ... +generic.vasc.jsf.table.page.select.alt = Select Page +generic.vasc.jsf.table.page.name = Page: +generic.vasc.jsf.table.page.description = Goto page: +generic.vasc.jsf.tableHeader.fields = Fields +generic.vasc.jsf.tableHeader.links = Links +generic.vasc.jsf.tableHeader.actions = Actions +generic.vasc.jsf.multiAction.selectAll = Select all: +generic.vasc.jsf.multiAction.name = ... +generic.vasc.jsf.multiAction.description = Select Action +generic.vasc.jsf.action.save = Save +generic.vasc.jsf.action.cancel = Cancel +generic.vasc.jsf.action.back = Back +generic.vasc.jsf.parentSelected = Selected: \ No newline at end of file diff --git a/logstats-war/src/main/webapp/WEB-INF/faces.xml b/logstats-war/src/main/webapp/WEB-INF/faces.xml new file mode 100644 index 0000000..6080691 --- /dev/null +++ b/logstats-war/src/main/webapp/WEB-INF/faces.xml @@ -0,0 +1,47 @@ + + + + + + + en + + com.sun.facelets.FaceletViewHandler + + + + Controls the Users + realTimeController + net.forwardfire.logstats.web.beans.RealTimeController + session + + + + Controls the Users + userController + net.forwardfire.logstats.web.beans.UserController + session + + + + + + + Controls Vasc Faces + vascFacesController + net.forwardfire.logstats.web.beans.VascFacesController + session + + + \ No newline at end of file diff --git a/logstats-war/src/main/webapp/WEB-INF/jboss-web.xml b/logstats-war/src/main/webapp/WEB-INF/jboss-web.xml new file mode 100644 index 0000000..63f7a81 --- /dev/null +++ b/logstats-war/src/main/webapp/WEB-INF/jboss-web.xml @@ -0,0 +1,9 @@ + + + + net.forwardfire.logstats:archive=logstats-war + + + \ No newline at end of file diff --git a/logstats-war/src/main/webapp/WEB-INF/web.xml b/logstats-war/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..a4cd6a4 --- /dev/null +++ b/logstats-war/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,203 @@ + + + + Logstats Web Application + + /jsp/index_jsp.jsp + + + 4 + + + + + + XHTML + *.xhtml + + + Include files + No direct access to include files. + /jsp/includes/* + POST + GET + + + No direct browser access to include files. + inaccessible + + + NONE + + + + + + + FORM + LogstatsSecurity + + /jsp/login/login.jsf + /jsp/login/login-error.jsf + + + + + user + + + admin-company + + + admin-system + + + inaccessible + + + + + User Filter + userFilter + net.forwardfire.logstats.web.filters.UserFilter + + + + userFilter + facesServlet + REQUEST + + + + + + + Comma separated list of URIs of (additional) faces + config files.(e.g./WEB-INF/my-config.xml) See JSF1.0 PRD 2,10.3.2 + + javax.faces.CONFIG_FILES + /WEB-INF/faces.xml + + + javax.faces.STATE_SAVING_METHOD + server + + + javax.faces.DEFAULT_SUFFIX + .xhtml + + + facelets.REFRESH_PERIOD + 2 + + + facelets.DEVELOPMENT + true + + + + + com.sun.faces.config.ConfigureListener + + + + The JSF Servlet + facesServlet + javax.faces.webapp.FacesServlet + 1 + + + facesServlet + *.jsf + + + + + org.richfaces.SKIN + logstats + + + + + org.richfaces.CONTROL_SKINNING + enable + + + + + RichFaces Filter + richfaces + org.ajax4jsf.Filter + + + + richfaces + facesServlet + REQUEST + FORWARD + INCLUDE + + + + + VASC Filter + vascFilter + net.forwardfire.vasc.frontends.web.jsf.VascRequestFacesFilter + + templateFile + /jsp/includes/vasc-template.jsf + + + resourceBundle + /net/forwardfire/logstats/resources/i18n/LogstatsBundleEJB + + + + + vascFilter + /vasc/* + REQUEST + + + diff --git a/logstats-war/src/main/webapp/css/ie6_fixes.css b/logstats-war/src/main/webapp/css/ie6_fixes.css new file mode 100644 index 0000000..4d7a0af --- /dev/null +++ b/logstats-war/src/main/webapp/css/ie6_fixes.css @@ -0,0 +1,8 @@ + +/* CSS fixes for IE6 */ + +/* +#page_menu_left { + overflow: visible; +} +*/ \ No newline at end of file diff --git a/logstats-war/src/main/webapp/css/ie7_fixes.css b/logstats-war/src/main/webapp/css/ie7_fixes.css new file mode 100644 index 0000000..9001952 --- /dev/null +++ b/logstats-war/src/main/webapp/css/ie7_fixes.css @@ -0,0 +1,8 @@ + +/* CSS fixes for IE7 */ + +/* +#page_menu_left { + overflow: visible; +} +*/ \ No newline at end of file diff --git a/logstats-war/src/main/webapp/css/ie8_fixes.css b/logstats-war/src/main/webapp/css/ie8_fixes.css new file mode 100644 index 0000000..1acb363 --- /dev/null +++ b/logstats-war/src/main/webapp/css/ie8_fixes.css @@ -0,0 +1,4 @@ + +/* CSS fixes for IE8 */ + +/* Yet to come */ \ No newline at end of file diff --git a/logstats-war/src/main/webapp/css/site.css b/logstats-war/src/main/webapp/css/site.css new file mode 100644 index 0000000..2da186b --- /dev/null +++ b/logstats-war/src/main/webapp/css/site.css @@ -0,0 +1,538 @@ + +/* HTML STYLES */ + +* { + margin:0px; + padding:0px; +} + +body { + font-family: Arial, Helvetica, sans-serif; + font-size: 15px; + color: #000000; + margin: 0px; + padding: 0px; + background-color:white; +} + +h1 { + font-size:1.2em; + font-weight:bold; + padding-bottom:10px; +} + +h2 { + -moz-border-radius:3px; + -webkit-border-radius:3px; + -khtml-border-radius:3px; + display:block; + font-size:1.0em; + font-weight:bold; + padding:10px 10px 10px 10px; +} + +a { + color:#004DEB; + text-decoration:underline; +} + +p { + margin:10px 10px 10px 10px; +} + +img { + border: none; + vertical-align: middle; +} + +ul { + margin-left:10px; +} + +/* DIVS */ + +#page_wrap{ + margin:10px; + margin-top:0px; + float:none; +} + +#page_header{ + height:80px; + font-size:18px; + border-bottom:1px solid #DDCCCC; + position:relative; +} + +#page_header a img{ + border:none; + padding-right:10px; + vertical-align:middle; +} + +#page_content { + margin-top:5px; +} + +#page_footer { + margin-top:35px; + padding: 5px; + font-size: 12px; + border-color:#e5e5e5; + border-style:solid; + border-width:1px 1px 1px 1px; + -moz-border-radius:3px; + -webkit-border-radius:3px; + -khtml-border-radius:3px; +} + +/* MENU */ + +#page_menu_left,#page_menu_right { + border-color:#DDCCCC; + border-style:solid; + border-width:0 0 1px 0; + vertical-align:bottom; + display:inline; +} + +#page_menu_right { + position:absolute; + bottom:0; + right:0; +} + +#page_menu_left a,#page_menu_right a { + border:1px solid #e0e0e0; + background-color:#DDCCCC; + border-bottom-width:0px; + text-align:center; + -moz-border-radius-topleft:3xp; + -moz-border-radius-topright:3xp; + -webkit-border-top-left-radius:3px; + -webkit-border-top-right-radius:3px; + -khtml-border-radius-topleft:3px; + -khtml-border-radius-topright:3px; + color:#000; + margin:0px 5px 0px 0px; + padding:3px 15px 2px 15px; + text-decoration:none; +} + +#page_menu_left a:hover,#page_menu_right a:hover { + text-decoration:none; + background-color:#fff; + border-color:#e0e0e0; +} + +#page_menu_left a.active,#page_menu_left a.active { + background-color:#fff; + font-weight:700; +} + +#page_user_info { + padding:5px; + position:absolute; + right:0; + top:0; + font-size:11px; +} + + +.actionbox{ + background-color:#DDCCCC; + -moz-border-radius:3px; + -webkit-border-radius:3px; + -khtml-border-radius:3px; + border:none; + -moz-border-radius-topleft:0; + -webkit-border-top-left-radius:0; + -khtml-border-radius-topleft:0; + clear:both; + padding:3px 0 3px 3px; + display:block; +} +.actionbox label{display:inline;} +ul.actionboxtab{margin:0;padding:0;} +ul.actionboxtab li{list-style-type:none;float:left;margin:0;padding:0;} +ul.actionboxtab li a { + border:solid 1px #ddd; + border-bottom-width:0; + -moz-border-radius-topleft:3px; + -moz-border-radius-topright:3px; + -khtml-border-radius-topright:3px; + -webkit-border-top-left-radius:3px; + -webkit-border-top-right-radius:3px; + -khtml-border-radius-topleft:3px; + font-weight:700; + display:block; + margin-right:5px;color:#000; + padding:3px 15px; +} +ul.actionboxtab li a.active{background-color:#DDCCCC;border:solid 1px #DDCCCC;text-decoration:none;} +ul.actionboxtab li a:hover{background-color:#DDCCCC;border:solid 1px #DDCCCC;text-decoration:none;} +td.tableactions{border-bottom-color:#bbb;text-align:left;} + + +ul.paging{ + clear:both; + margin-bottom:5px; + margin-top:5px; + display:block; + float:left; + padding-top:3px; + padding-bottom:3px; + width:100%; + list-style:none; +} +ul.paging li,ul.paging span{float:left;margin:0 2px 0 2px;} +.paging_thispage{font-weight:700;padding:0 6px;} +ul.paging .paging_atstart{margin-right:10px;}ul.paging .paging_atend{margin-left:10px;} +ul.paging .paging_atstart a,ul.paging .nolink.paging_atstart{ + padding-left:15px; +} +ul.paging .paging_atend a,ul.paging .nolink.paging_atend{ + padding-right:15px; +} +ul.paging .paging_next{ + margin-left:20px; + border:1px solid #DDD; + -moz-border-radius:3px; + -webkit-border-radius:3px; + -khtml-border-radius:3px; + padding:2px 6px; +} + +ul.paging .paging_prev{ + margin-right:20px; + border:1px solid #DDD; + -moz-border-radius:3px; + -webkit-border-radius:3px; + -khtml-border-radius:3px; + padding:2px 6px; +} +ul.paging a,ul.paging .paging_link{ + border:1px solid #DDD; + -moz-border-radius:3px; + -webkit-border-radius:3px; + -khtml-border-radius:3px; + padding:2px 6px; +} +ul.paging .paging_break{ + font-weight:700;padding:2px 6px; +} + + + +/* TABLES */ +/* +#m_content table { + text-align: left; +} +*/ + +table.table5, table.rating_table { + border-collapse:collapse; + font-size:11px; + width:100%; + margin-bottom: 30px; +} + +table.table5 th, table.rating_table th { + padding-top:5px; + padding-bottom:5px; + font-weight:700; + text-align:left; + vertical-align:top; + padding-left: 3px; +} + +table.table5 td, table.rating_table td { + vertical-align:top; + padding-top:5px; + padding-bottom:5px; + padding-left: 3px; +} + +.dataTableHeaderRow { + border:1px solid #e0e0e0; + background-color:#e4e4e4; + border-bottom-width:0; +} + +.dataTableHeaderRow th, td { + padding-right: 5px; +} + +table input,table select { + font-size: 11px; + margin-left:6px; + margin-right:6px; +} + +table.table5 tr:nth-child(even) { + background-color:#f0f0f0; +} + +.table_options_top { + -moz-border-radius-topleft:3px; + -moz-border-radius-topright:3px; + background-color:#DDCCCC; + font-size:12px; + font-weight:700; + padding:6px 15px; + display: block; +} + +.table_options_bottom { + -moz-border-radius-bottomleft:3px; + -moz-border-radius-bottomright:3px; + background-color:#DDCCCC; + font-size:12px; + font-weight:700; + padding:6px 15px; + display: block; + + margin-top:5px; +} + + +.table_sub_header { + -moz-border-radius-topleft:5px; + -moz-border-radius-topright:5px; + background-color:#EEEEEE; + border:1px solid #BBBBBB; + display:block; + font-size:14px; + font-weight:700; + margin:0 2px; + padding:3px 6px; + text-align:center; +} + + +.rich-table-subheader { + background-color:#DDCCCC; + border-top: 1px solid #C0C0C0; + border-left: 1px solid #C0C0C0; +} + +.rich-table { + border-top: none; + border-left: none; +} + +.rich-table-row { + border-left: 1px solid #C0C0C0; +} + +.rich-table-headercell,.rich-table-footercell { + background-color: #FFF; + border: none; + padding-left: 0px; + padding-right: 0px; + font-weight: none; +} + +.rich-table-thead { + border: none; +} + +.rich-table-header { + background: none; +} + +.homepage_stats { + margin-top:10px; + margin-bottom:10px; +} + + .homepage_stats_big { + color:#004DEB; + margin-top:5px; + margin-bottom:5px; + font-size: 20px; + display:block; + font-weight: normal; + } + +/* MESSAGES */ + +.message_info, +.message_1 { + display:block; + font-size: 14px; + font-weight: bold; + border:solid 1px #a0ff7d; + -moz-border-radius:3px; + -webkit-border-radius:3px; + -khtml-border-radius:3px; + background-color: #a0ff7d; + padding: 15px 15px; + margin-bottom: 15px; +} + +.message_warning, +.message_2 { + display:block; + font-size: 14px; + font-weight: bold; + border:solid 1px #ffae4c; + -moz-border-radius:3px; + -webkit-border-radius:3px; + -khtml-border-radius:3px; + background-color: #ffae4c; + padding: 15px 15px; + margin-bottom: 15px; +} + +.message_error, +.message_3 { + display:block; + font-size: 14px; + font-weight: bold; + border:solid 1px #ff5b43; + -moz-border-radius:3px; + -webkit-border-radius:3px; + -khtml-border-radius:3px; + background-color: #ff5b43; + padding: 15px 15px; + margin-bottom: 15px; +} + +.message_4 { + display:block; + font-size: 14px; + font-weight: bold; + border:solid 1px #fc9200; + background-color: #fc9200; + -moz-border-radius-topleft:3px; + -webkit-border-top-left-radius:3px; + -khtml-border-radius-topleft:3px; + -moz-border-radius-topright:3px; + -webkit-border-top-right-radius:3px; + -khtml-border-radius-topright:3px; + padding: 5px; + margin-bottom: 10px; +} + +.message_1 input, .message_1 button, .message_2 input, .message_2 button, .message_3 input, .message_3 button { + margin:0px; +} + +.message_4 h2 { + margin: 0px; + padding:5px; +} + +.message_4 input { + margin: 0px; + font-weight: bold; + font-size: 14px; + padding: 2px 5px; + margin-right: 5px; +} + +/* LOGINBOX */ + + +/* Text styles */ + +.text_justify { + text-align:justify; +} + +.text_left { + text-align:left; +} + +.text_right { + text-align:right; +} + +.text_center { + text-align:center; +} + +.text_middle { + vertical-align:middle!important; +} + +.text_top { + vertical-align:top; +} + +/* OTHER STYLES */ + +.no_wrap { + white-space: nowrap; +} + +.no_border { + border:none; +} + + +/* +** WIKI styles +*/ + +#toc, +.toc, +.mw-warning { + border: 1px solid #aaa; + background-color: #f9f9f9; + padding: 5px; + font-size: 95%; +} +#toc h2, +.toc h2 { + display: inline; + border: none; + padding: 0; + font-size: 100%; + font-weight: bold; +} +#toc #toctitle, +.toc #toctitle, +#toc .toctitle, +.toc .toctitle { + text-align: center; +} +#toc ul, +.toc ul { + list-style-type: none; + list-style-image: none; + margin-left: 0; + padding-left: 0; + text-align: left; +} +#toc ul ul, +.toc ul ul { + margin: 0 0 0 2em; +} +#toc .toctoggle, +.toc .toctoggle { + font-size: 94%; +} + +.thumbcaption { + border: none; + text-align: left; + line-height: 1.4em; + padding: 3px !important; + font-size: 94%; +} + +.location-right { + clear: right; + float: right; + border-width: .5em 0 .8em 1.4em; +} +.location-left { + float: left; + clear: left; + margin-right: .5em; + border-width: .5em 1.4em .8em 0; +} + diff --git a/logstats-war/src/main/webapp/img/icon_download.png b/logstats-war/src/main/webapp/img/icon_download.png new file mode 100644 index 0000000000000000000000000000000000000000..bbbb02f4ad706e5850e0102e42130cbace5843fe GIT binary patch literal 175 zcmeAS@N?(olHy`uVBq!ia0vp^{23R?$?8AvRsjW>OM?7@|Nm#Weu~!-$kp|9 zaSW-rm6YJb$|KM@+FIK2P> literal 0 HcmV?d00001 diff --git a/logstats-war/src/main/webapp/img/icon_print.png b/logstats-war/src/main/webapp/img/icon_print.png new file mode 100644 index 0000000000000000000000000000000000000000..27b4ac621f9a27de5b979c183874b7c518bb4fe8 GIT binary patch literal 172 zcmeAS@N?(olHy`uVBq!ia0vp^{23R?$?8AvRsjW>OM?7@|Nm#Weu~!-$kp<6 zaSW-rm6YJb%CqFNq#(ng^ae%=d9Bk9eKyKk2@WTkLIs{JW@=zyW|-8$@FB3;?;}tb NgQu&X%Q~loCID_hHemn& literal 0 HcmV?d00001 diff --git a/logstats-war/src/main/webapp/img/logstats-logo.png b/logstats-war/src/main/webapp/img/logstats-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..0c6ee4293a9ad2a6d9f3b20bdee87303b8a5cb79 GIT binary patch literal 15551 zcmW-o1yCDZ7lyGy@Zc18m!weK-QC?OPH_qZX^;ZNic`F}6)&#E-6_SrxI6jt{hQgH z?9R?k_TFRfb5Fi#sL5kvkYOMoAYdyh$Y>!TAacOJYXFeoM~c5`vDb@f7! z_OP||vbCY{b@2K?Bd@5cp&yDvf`CASpeQ4$iuQB=rF%R-0i6r;Q!!Z&MTQ`BVW$E@?w%^6yUC8@!Ep}*z z%^eu=tDe8I*#3#o>+@c9up#-GgMI<3TW|gBFX^&On5On?DvIRFeP^nq?$@SoNk@#h zhM5kD(mnFHoBQPrCHP}{Tn#D zbJ)&0D)X(1`!3XlUoCJP8h1Hok4Dx9{fb!M?FX){bdO%Bz4&ol6&!)K|!q=ZyPG3)u)ssg)t%7Z4 z|LKx1n!rZbx!XSc#vI{0H`&?@my3`f`T5!Mxob*c35r2^6+Lw@B32uO3+wzi{_dS& zxPmK<>Mt!-VVjaAG0#=%RmkKb@OD;VK)~#jM4zrwaD!AZ8wdzczit zA7pp7NpSv>$_;sDJkn>xbMV8QvgrMS;)nMf*k=xLoXp>L-$#R8e_`jV%ryIviGjmg zyE@EStG%Otp%sLGsTm{6TS*|+V$BVM4F9p!mPrBmrwhIRTHD0v{I~7|H~5wuSERP1 z1yP~Ef)rIcmWB?1R5bUIVx{S=)$f8%*pQ;z;hRqvBfk^9vSD5ngWje}tWraD9E;wJ zigZv0hBd@%>sVF7(I++r3E;uwymB#DkP0RagQe1J1@Rjpm+Fgd3|@O1VzMGf^^P9-6HGG^qk46(j-6O)f@4*2iV`w{=Rs6=~OBki01( ztraZtDF$nu`@BsRbwC5DE;P_6RRHZTkDmLt)=R$OB+$u^qdZR!2n!r1`V3%>40U}0 zgCw7=`B0M14iNq~>mMmYPg0liri-E;m&Xs&AMcl^|I~djbMt&kOi+NX#LgjVSm9be zf7slMckPO_&ZC*a?Y#OL{92qgnsgBSE=_g6?$E!3hs&t;z;v;z*YbGyBp?{F{~6b1 z?XdMUI{eCcrO72r%aMS9)<(E^TOe-RdD%OJ-{T@0qRMS4CCg?Ni>+-Pt0^f{9r-mD zJX&YLl^oUN@>HZ9szepUml)Dnjg#;*MgfcZZPtA=>>m61M{?j3 zwYbN_Z}y|OZ}^uV17DB3S1#f}g9PON&3e_~Cf^Yd%P1T*5~ z%7?yM6$c~t@|F>gX3CBCz@AOJf}@SCUbn_;+K&r}up67KrrTG#Uhg7ocdq=?1fjrL zUdgn=WSsaoYT+Q9oMgt2<1=DXQLgD>E~9l$Mto9$Ytd03pa)A)Q=i}VE1JrvTq-93 zX@k!?7Kr4B$wVRk=e&`Uid;N!3#*}cXy(r@CVBXw+_oSA**`M;LdRiwu=uz0h8^qD z@PN%j2AgB4%lEd`ZMzvSV&U$FW4HZo%+!X4Jg5F%NA$)y%f351a6?-0@mRk8Yq*-V zz}5Cjq<=kepiZ3_s}btY%vITUyrwVC_S}R<$NEE z0kng7@^V*C@!5g_V!_vQ8((HWOBWJkT9QUEDq1Ne?oa$PYR~hX{r8)s=73+7AXz%} zQ)(87I>2#X3=+J08D1dq%{@t~_PLF@Nxac>Jx6+QZ~$}rx0X`kicww6-d(lPjPHE$ zd*!D+hW?E1(X!ra_HeDF{%FsG{tWKGD|_Qy zQH_dO6TYBr??tX0@u$ArC)B?!UaOa9L9d0ceCD^+S!k2-y^}6o4|WnnDt?D@56=%* zfP81ZilayS&eyBK=Chh7J-({fOLpp`<6{{BHZCqb)Q3vo0oHlB%^-R^p7Ai;6*yX1 zt*5AGWNd7!c`H32-*tWxK)q_zoM^(=@z7NBq+j^s&>S`??Ar0PS!dUOyLOe+-1*@zWN8EXo|!FN;;8!wJIY=SQTFg%1ru{Y9)Gif{`D8XAAQE8l!$Mg6@!PD z_17!Tzs5xV%S~5(D`%p9&tv@JSF~}FiE?BEf8AiuU0rt-uv!=9;+_ksLvry4Zdmr$ ziZm1-R~zRrm@tUWIx6_)U7Fha?Fw>*J_bVeB0OH9bJue9}Z8;O(zlO2LPTc$l^b>gCZz ziEr?YIOJr|2hyXy;`925x&F8?`6^6>OkV^4<&VbJu|>KWuz;tI_*PZZFqX#uZ^O|e zCV{RDxv^O{4ULWH1^wpYfgYd-lW5zQrYFA9Xbd}DvGnPS-VD#aFA46qSg#8`)+OsN z&9Lt%$m}yW?dP3Ok$6ju=}*s9=imNP6Zmo9qtmyQ-bf&L^&v+=Ma5#f*}odGBn`x& zas=c7Q5DpZXd>vD(blepYhp>1o+lo4W7aRrEA%)r#p~rRm6)mMGa3Vp?XWr&}D z6F%*_xLNe_ZHO2qx5!&BSxi#w*owa44jz6K6g4$H5$tQ2jNiMX7JS%=3+f7Xv|n3v z6Dr~`7vM(_8YLMIuxgWcf?S&8a(rKW`cuLGK6(WO&oC8FYKZYEo@v)E$TPskP>xFy z&~pTz3ogSp=Zmnl*A~%wd!O5hgCRSu@=Bvr(eIOILhi@Rz9I)DwpqT%CF!V57I&f6 z=x89f1uVbOrtGeVk~0;;Q6fRXn}2DpfxATHcH;*J&ZD$Yxl00hb?oD%fcqY19}1z5 zs3wJw2x4?1bk1*x#QQMz%7Q`6@7^%g5C1Bhrb8EzE4jZ6_6C5pn6Y>+PTFugPv~>6 zd@6hgI>eu~Bq*xFLtl$2B0FAc#Dh1M9PTp|D{^1Ezt*%{NgF)h*F5Fkw*|k@cENgl zJ2yq$g1r5pu-9DQK$yPoRaQ;MV^Wv@WNwq)Y~qov(d~ZMO}#MWPT;xSqpv*pX%3#K zp>L(4TB0nx&a7A5UT5xJ+&GN|?sVa?u*>mc>rDsbvwYzqGi*1~SNxdOE*S27?JwT? z>Z`2w%eSzH{;qQx0Zm}j>)txTL!a_vGc0fvCer?S2HxoOx@|e*^{Vy>$ChjS&*- z^>z2bi2nJYmp=cP{ONPpx~r(7yP3c4u_8)=tR4OQG8yb;2>Ux!Z5}*c6z>{vyC&b< zGg&oB1)!mo`mh*UDE{lj?Dc9JcE`!z`I<@E9M6E^Z*DR=Ft3dG61ZpXbz*x|ZP0Z& z?b7xz9u%p5DjbMU`-5$!?zN>NmBXOXrsrP~W(YGwSJP?v2p)N0kCk?djHKVqJh>qL zND|=34n|f7&&D-Xjrz zJw-r8B@5ghHSbM4UpnkLmkPW+65qWXeppm{n&ziy>k`z+!FGj0c=Fq9H~f&v z1#^DdzwxVgSF`}f=a7+BLxmcf?MTMYzS5pV#^qiZI@$5!1rQ=2FM1T%S&LkzZ3i3S`9Sc}(uyf!HP>I#}v?3ZG*7lb6dPdc$ z`p>V{g|OZ$Wsy3=+M(uE`P z8vzV66Fbs=Sl~1tYLBRJj*kzTw;ne{y&UE&<1{v_%%3Vp~LIr59vAV{ug1(E-lVW z#f06`Ztm%b2A~1gj(xnf4fD?J_f$yt#RyqDsw0fcv0J&Mo-Xm3RuRC*c=Po^*h_b= zX=K#Vug0oEF6nfU-9cyyW+FUGks6F2RWDz+R`83oSi`o}&z75>rfO&R9W5scSA5R? z`tCU8LSUJUS5Bh!HyOxc3?@5u16VDoC&%!LX6k|m9?Z}ph+0pY{K}ssJ1&J} zF1h>T7Cb6+(VFIf?Q+>6TW>6@YWS-u9!JI0fh&R!TZ_`FjWKXSg5=fUp6PhD`K=8% zn>6#-n$J#8PSW zPQ1=Gc6qi9cb-lHhbdVAp^(cHPfFjsZm*;(2>3d#PAGo+`)uskvCDD0ym9nNpWAS1 z)^zj1)jJaheq-EG;in;aEvF5v0n!$nJk-jR&%j<3>j)qnmm(Xx$91=E^v25LFz2s) z#$KqU9MWlPLI+K3Hww?j4&rWwrg24r%)8sjH8-Pr4(AAT4lqZk@2o8#pE4l+yt(?% zPc|uv%yyT!ZLIj%M+#hrQC@^z&;agZ*l6`y18O9GOdmn5i~W9Q;q$&M`{OrxWP0dK zc{^mc;D(*VzwTf;Uzqx@2Ry&0@y2Vx^R0$%!G&bSMTZ5VUX*DWLPVf?EEE6nQzp~i(f>KTHKJI{F!(laKehnsK5C}Q z!)vGeXZzi~(|#wtSRsrePOY)nK6B5^{QKb8gx)N#>ZlwS0gB~Q4x6cYTRZM0(N>LU zq35kWJs6hwN^7Iru*fK zbMTS0WAH@eOzx}BI=i{q$7YKKWr7!k1JsoH2;9X{>t0P3cZIwE{>YKz#+;Ky;aOx% zJUmoXDg4quT{U^SuhD5W{j8$&m1kHdSwb9@4yuN&^O^6_ZZeio^O+blu+&Lk637%O zHu*L>>I9S%69W8q;>eylfA#)(C z!H-&Hgw~ZhY>2vRTiO79&Kz7rH4#BzlTs4H)Qj48s^@c(PU@(VlMmxuCs}ZowD&!y zI>VH5l@gvklgkxq0?zF3zmagB`BI<($3U?jEgaDW42r3?F6-NcA((cON`$|vL?k}G zrLinC_{pKHJAWFtz#X^~0iR~^2HU$-Q?$sS>A+_pFRP7h^T%mU^ZTjqhCF%iSDL*0 z=0+GdWK(UIo3OvoBwGwY=DaCslhsPF`+idHwN|@iWESH|*%iF zDE73%LI;(SWLO(rR^ayKv+*F6@9wivxh;^O`Yx5)lY%*I6g(I~L@Ybq~Ii+&AQ^>QYNhDqLq5O8O1tBt+>*^Y&(zbAcdX0`tH8H(6{`@RA%9Toz$Uxiau%zOT5S!Bw9tvic~vEW9xW77r3M_Y+x(E83k>VP`N!RwUxBLY z$F8w>MZDQ+eH7@lPjTOO)a|rJ>RtsC#&=p>TTGfb*i)2P9Y?%J1LAY4-;H$|hMpip zp@_(TepRyr!f2Gp7de)He!A%I@6Ygr7x?nH6yi_!w?X?66_4(n8jn3EcfpUyX9&{+ zO)jSFS;gpdwZ-H{Ehs>BR$bi`@IY>Zi}5UPb1$@o!!eV|0$&(^4JlC%eSF2Pol%xqUN^wI*vXN!m?MPW6{)29hP%{9mQaeO;YrhAqi(d+GH}d zTyJqrGTp^lo|9m;6DcZ`P)iA3#%L3LUa5-?@iyg78;!6mEsqAysA~Uok=4ZN^Yc48 z-L{|foP1(l_kG!FS&gs+?E$5*`tp*If~5hX9c_-sh70@^I&7@b1uPin(zuB%f`N_+ z#u{yZjEw48sZL2#YZw$gC`wGYgyZNH@fqJWEG%al{^h@WukY4+NLd3p7^Yl*n19)4 z_j13QKn^6}T$%Q!^h-SXsa2bIBoy1E!zLIb=UVs;i5PUesNwqnm=DW@48i z2XUUOt4z+60(^~)OK%dbZzCUY5S&;#h~gMsPNe|ts4yW1CV`pIk)#gBrUWJKJ*D>t z1_t1hz*4lmy&cA4TgNH!4rGPrN9yDzkFI6>&EUhoyfeT2U$6sKs@#v$(XwD4%PtYh z?SzcdU-?#20m08%X!ln&U3>VlnlxN3NPp)obKg=#?4o+Ag&_Ae9(8{_E%-jax;8s6 zX4-iv%{=j_Lhnhr*vMIL!j)CbI_e>m4Y{2fF25J5nElC-Hx&yuOtm!}AQi60^!T%9 zs@wi)wvn9MXl+ngL^4{`W;xRT30^&6_YLh|!2_v|k8P}RdYNe^eWAhky^?Za4N~k;^ZikZ~1qFIKODHHNAvC{N z{hS@P5TY|&hcz^ye2nnt^AC(U3Ikqij%+pidc#>>=7B4T4V!|hEpy*;PR`~G8JKXiK;oo{S_TIk? zpaQ5rHwr4#_siDG;$nk*sld;*QVX2JlzG*`gA}3MplD*;x;WBH=yD>#G~< z2*@`ybrHE0S7Co^J!DHWf7EKmL2SA>Zu1Tb{4fr}>aKlLU-8!Lq$M^OqdiCpz?|7m zsJoOwp{4<7i|ek$s6wphCnb*nzZ248A(Z%r!k!!nBZ|h_LI9ZoRg65VB+htM*$FYA z3Dwor$>j`{fALWMV2JNv*gk(mR`uv*_C5Zh1F$~%jYnwJ^F8DFiSo`3C(FmL9*$|A zSG)9h4Bh-zQ(Rg&nismic?JkQAj4jsPV6VXrWd1QGV`zh4ZyDZVAo5t0p!2C&0i)9;Y?Wz!jz&koaA?`G9S_Z4NF#2 z2H=oc>_Fz}oKS0PNX4BT6jlw`gOvUmIMM?RI1fI&R^2%gu{PJgUs+4K)c=Jr`lI@& zNb68Wwo?{>7v?g6(1Q^!Ri^V!br$#Fw-sIkM~L-LZ^X6*-YOF=WO2dw2C5&81bppk z4LFEnc0Dr44-kzR6njaJT5%XXZ4CFyNd`#memIb^c)y}BQXQFO*SR=l^1b8Z6A>CA zgj@ai)pxc^bN*v)jP{@ z_quJ5BmpuS50V;#p|4O}H~-tXC;qO@KgzwCoAk!M!J8{xYq0|PPZ55HHtf~Ks0A{FKOO=h9fMl&F0TE-$$ z$Y066E|m3X$|j*mhSZT*)LL-i146T2iBR%wicgQ`i`!-hH`p_nvt$m>oEO(-uf z)4{Njy+;w|V@XJ&=}vDUnZ_le!8AxMN>PR;EG#U%UFDfM^s<*{PC);uUo?AoT78;0 zohVgH!|uqIf-j3_!IU=IQe9DA&Ju0ZVnd25Ra#L|VQ&{-S?c|udszv)2R13h6AlPW z7zRTa;Gh`+=D$7Incn_Xef!sR{RvI%da>QB@6N4bv7E)u{PDC(_?D{WG*g*)GM7<# zYwF-0UeiIIy0wjiSYtRd=1SIJdb$^3i!z!h1a$emA(L9r@*@dw6PcK9Wa+5PrHAuYinz9KzzoGHe;DYp$K`W+_iw?o~oyswT5UbK0TJR zrC_Too=CCRYW-0Jj-&-xy z!^uoj6Q6}i$e6|qDux6)lDCQ*!pbd0kl)j01%K6;-3PNmM1jLEAN?mE(=ZU zqZ1K^XTZxC^aNyAN+Q{5OV@w^;T=(AHl)cNE`m}5*3mi^4RKa9dv$$#eXcYD6xtLe zM7+a)|B!~iX=N%E!7;b6urMt&udV(YFlpEZD5XryjrbWmFzlEO5LQs^=wOgYI(?lO zesZC z(4bAV5PV*_>tIxTNwIzLoGGuX!f$AV)JXvr>&2?jy@ud1GQeZ7lVO(d%_BeT?or>g zk!lD9gxzKCcRM!G$6O9QerjHYy{w$x8NLtDj!sf5c_W!1vzgSW92~Sx@VzeZFrZo9 zr}g8_7M!tdA@$mlaH5@Gy0sLroOgfE$c|LkLvtTJxm)*mdV!#Epfz?xs(Xk9-xaQ$ zK^oK$FEg@Tf?=V)2yItc>~LXlV7Jk9Q=y0?mBeyyvj0u#{-E_VBiMFwdXiI)lamvW zZ^E^>urS~xgtYZ0gxqTnVG@zkB`qVjKg9|9_hS*~2^F?}KxLNisS_ExK1U{r zduG>}OAVadUTaTMls=t?E%Usd)~pGUa5J_bAW+c!*9+jLmu6|ij|> zA0zgl@Ai^L{an0Yh{q#j44b^+4mg=7U%&ZMbDot}6*B|_K&ctJ9`|npAB&qGX2VoQ zQ5Qkf=kw(H4~Za=S!X^>RMI|Bb?^h@oyaAxuY=5pY_QMjyi+RIlGd=A2`E5LiMU6H z^sV&sj4Jz!0_iWi$pc1nS>o9ftr14F+XW1z4t1k$TDfPDkh65wr_Xr`#|M) z8QRQKEtgypO|Iz$5+v+28z5u(DE?cRg#aR`RT5tF6I{p1&f1hP8$i;7x zNQn%e`vcY}O5cWqA-{=8Og)#$q=pnAbi;?rfc$XJ0N2)wM(URsexJtu=PbwNCfiJl z9fVEC;jlG0)WOD)Ps{LMwsi_!K|V^5wVV!HgPUk`A=1U;{@C-}6YRQ(T>tM~KTjKu z-`}Uq(S=IGca!VZ8}-2xv2X{*$%&sBZrz*FWhWj-#^Nq^liT_ zkAGf1GJ40hjtOI4lI@8-?3#>U00j5)tfo{;G%X*6YZ_A2Ne)%b~El}DLz zkn{o~ap?iUU-HOaFNqtiGPlP^dN$sV8L;@w!Nv}IHifDG)ZHw9hF1IEO1Q+5Sh!jl+LAncp+V&H}KS+w~sTq)(O z1>Fyoh5iR&}4mPdd-NU_ef>#+U_>2GL1eGJ#V{;ZYtHywmfZR1m!N0AgBqXB;AXYe z>Ga-TiGHL%&r!n^`btTy&9iSuKQ0N2J=*4^z*Z-NKAhBbV*c6o^x+uxqKt&*^vz;w zZp%mTivGcD#={#+pr@4^Vgv^YbQ67RW%;+DhE1p$r}B#Sd!t1h>!q!$JMAPzt|)(^e2(W@T-tD7_d1zTgC6|&O?=1y*}jkf87asq(kE#H)$HQ~pKTuVvfl${HmfrN zBvFY4b)t-wT-Rb75~a?KBtWq>^Vx*xeI-n?sE9IpVpaRh`IdDgx@V9X1)o#VPY|!? z9QmfztDz=_irczT?$;yV4hO9ZBngObCaHB%Dq0VqkW9W3Maz`UFpYuF`KR3>?anz> zqVlug_bD1~3!+&_%FjomtN51VygfU|u_c~;?7nUi^ zQ9;#nObzJ1_HXVfI{XsR`(X!op9w061xFet&kVisHeIwNhJKI)p)e&2@=Zz*$tL3C z(KcAGZ|=|sUa@n*HgY>A8od0nY3(vl<9P^C5L3rKQVuqi(p+LJV1f7G-8&R<$e1JM zJ)L!*xje9DL0I%DO6WShq-{gs*ngDJgp+i$Iq{-HFC#r2S6!#2%YKtl4ibzv@HP!O z5$owbu*!F|1jZ)R87zjDlpfvI3UOVnePpmz6zV8c}?tgAOWi z=A4?XqIXp#xgFm(;x~ed=>{H_NoOR4EqP%IcpdH@&eFH}t+K#yXlgoix4&J1fd zi;*`UK7amP_z<`r)){xpHz;e=!V3a{_{7%ugCX+rk=p{+*48DHIh@2yEJdrPtM&Gi zdOJFv8(T{Y=jZ3s*7CGG0xL;JCx@)WG5e8|caX=7u< z08;5DX)Yf?f)HPw5>F|dN|VUHuDx48#1Bznr4;0((hlG0Z5GV0;U7$ zCm=;Vlz-tcdMK~zX9V$4UN6%~iGJ?j;{nR2IGk8QweN!B?hr3t^C|3a!0%cq&PJvp zUB2Tpum3e>iPm%GPFly>$~JNmAU)7J(4tR^cdI~SxN;w5XPb@)AASPUYjiiBOFNz zupysp!_8*|1Q4ZLUquVk5U5I_rb%Qsml=P25mdbht1#CmOe%bzNuhyhfJS9j`oIcA zr2Ro|nJXa^j44 z)6gY)7eq6ruUZ5iNVS!W$bp*%iK%qmaYwi)TY0&ox_UfIw1gKxu1>3^Fr{S(Bd^fO zHivkMca@RUG8TJQMA%)AO1n*1xUH?NK7*oHWtJDJ;Z!{@d|2j+n|^+g6%hxPf}=+=B!7Q3f8T%FD}(cL%Q?E<~hCs~S1sG;4-a;wEp<#3_pbBZ;A>5?wAtw$)+J zXoW1MqaUTkj7*F$=`)$0#NW_5@HzP7`yR=-1wb6Od7Kg5P zPPfx2o-x-#hE3Z;ITi*K89MCcc9%P%PHo?Y|E zSsTORq=Q;3C0*U!FFPU7ItC;UDF!&5>HY;rEkx-iNVY#%i&=GblIdhb=+XcvC9{WC zwL>v9VfP72_N_ufN<}m02OpHHbyMetfI9+ZCOnV6U+;$wgC7-}ZD z%zjT#w}|!j_J+&(p#`Sje=Wj*1u`mS1?8zMMY_4=%35V}m4@}80oy8P(uiFF(`-`^ zx7k>)&zMy$Ky=TjE_p_)3?=L{GZYthCG`vX8@xZfs@2YmneVtsh?lbAH;G{D_L7G> z(nD$R2tBg39NgGh%l49iY^Bjy)!E$`7X4%%M0#kk=;a@aReO~cHWUE=YA#Yp!2=p$ zI0W3yDZ>6DolsVFs#z~&o##{zA9S!P!KGxr9<>ezBAAsTXb?=`oMK|KgByZ?90qpR z>F(BHD{{ybuOJ&hZBf`{vE-5ojqB+sM0ClKZ+(P$zoqSzVhW?NspF({ammikh9+3G zP;i;#?oe>=NEJDf)SXFiljf2(b80V+zyWb)vF*DI6D~BST>*()5r_f5-;7<8!$I{M^HB0kPd@Ev9dCyY3n6@k#jYMM1(TzOWJNsiKh<&)Bs6KTV8vri zei!6X`9xPdOy3K*IODL!imnSiMH3v?Juf8eRsljCX;q{$tc{Bi?T}R5-9^a-8H@LZ z3Nh{%zvAQJ<8Oe<_B{8((epYn2S^JQhq`qgp%u#L5;ZK*N5#Kfv8_aDq52WfYj;qv zC#2W@O=%H1ymK`5L_=~%;0rjSi`2T<7BdV1ZE6K))_b*%vYS7GG}-00hESe?<@aEs zBR&gIDN0+iUvVxJ!zx6-k5WK{H*Gw#SWrl)+#!=~R0Fv{(-IXp0E*4er=3FfHdQZU z9avhfw~v&M&~{V;LaoX;07wGLR!!bB_vnl|2uO~)f6&Bb_`bn$YTnZRm46>d$I!>r z_rr$|eqOxT{zsXpIaCQD77NSHJ{Ma>sSdGmaXFL%E35O^DSP;81RH20Mawt@j2ZUi zS|(peX>(d}od0&&{uPldwODDgHsSP>S*8<> zK}YyT8sLA6l@@}JxrL2ooJ6D{kgtUCV@yjaKd(ys4|4yi3E!xb91U~>$7ZCg%*)<> zAD&yM&VO=5o0^(xa23%qTrWOp5Zc<<*zo4++qM)IN+<7V9a1C*usiLhI>*o{XEYG1 z>wYj=$tm$O@1?dD-ehZIh`Onl^kaH@TC0p9+REO(gh7#>p1wGLrO9-rAyq{# z=|^&AB12hY(HlEX3=jFN9Xd2peR+BLZgqpvFm<36AV5w{%6aA1r$ws^d4%PWm18bG z)TJPqEgGqD&3Vw>Ss93e@WWkxO_D5>Wy*+g-hGPx?2VdAs>ji#1g<8%`oF5*G5(}# zd0Q+bBrogvynw(9I&=`d!TGBPC0E)fqB)n(X^*J?Mos#c38(a5t0hp(v;oe7q}EC@ z@s}+)zX``g+8KDDpO@m$>7l5mI|6aYh9zq}ox%WG6&8=T0PiV|f%II2-;w>cI-|8J z(rGqt8m!>GJiZ)*Gb4<%b+V!5#%vmZcJK~-7E{q|G1!+3W*32 z>cAOj6oh4%%8F-sZUH7nk<`RsMwC$> z1F2z*`Xe3?nO+-%dDQ`cuIap6HpD$VX?nqoF;H6eHAi?}1G|!`S3m&x6mJtX$Mwwn z&YeO^nwYQ4n(v*|&r}&5b{f17j3iA?*-hkzm4bHuPF2!Xv~R-bEQ=)+->YhCJ18b( z{-j^P{fq3MlAE_D=eOd7f#;XR7A5td^!JGPYB|K47g#_k@O|1`b{2LRoU>jAp+jqd z(#iotJsCEK5Md=JI$b;@{_1pLpo#$@z0N0N)F!=(mkouyxPhG~vv_xB^-}XL12gv9 z0%FQ9Sbr20ObWD>odzuzexKYE(?w<`I5U<><0+Or7yBv6=*kjm=j@B#OiHxESKX`n z1M#UaV!)nG6JXSrgqlp5otN(GEcxD$ZODx84owb|Re z1~KrGc{5-`ZR2e)=5t$@Z?JhN?h|b)p8dv4Zq^VvJ&esER zu!p{CV@?7T!&rcg=5Oa2gD8GYmnp!IH;H%Adk`%rquK~@9HoCI)dGk))Y67Aa0{BfR+KpU*nZ<9R0E!F!r|I_e$Z$&?>M@DfCzP(F% z;W^Va1$+W3RQ_$#U#$#{W0&62)qNF4PU_a3bMn3Spi?6((Yikn&rjjGOX@;;e2C}2 zzk3|}dM~_xVPwc?ABX;~bkvMYw@0GcssR(EYnsZD)qhsqplv7D&H{7gYt zqPvM_0E(qR!x&`R_i)j_GMj=cap#roV|(fj88=!dc5 zT{nANHwW)O`uzPkR;Z=88!hAgsz>9#5PZ$R-z+sHS}ya5dSIR&#vmA(BEF5wA4wyZ zCzwx+#%So<1JAwfCrwfk)Q9>D64w1dvPUpC}qCG zYd8VS(~v?fO+rI0+E7fB!lcSlnJVQ&`q8}}6m0ET-tjt0MMC(}yi7P)Zy~za!OqyD zymG*a1F>jG+5zD2DGS51)gCNm&Dl!O;J%rCERI~I$gMewF1@LqLdgbD=O65={q>zx z7jMcKuSf?Tv+}&!ZfVGZiDY^(cRazpSapyW=c*(&uE*s{@viCIQ-z-r=zEdvQb4Ty z=rrqHa^yM8{dh#zfMM#JkYVwUnn~z#O)e{`=&F)obuJlj8B+E}DypEkH++~NdWwRU zwosl>R#$g3*+He$mQ16Z`P&#^$1N3%nwT;F_n}`dQRb}yww2Tm)AH1_WH&vVCF$5Q zZYB?!e7CY{T_#BJSJ|<-DsZ2m?hQ>qzscSbY2PW5Yo3xTZ5rsMME6hA*YD*6xS_1T z6;nmE9!Pis^$0q;Mri4qoB_>`qJCH)i8p}qz4pA}P{~lGHpt<`qzy|EDSOHe&8)X~ zbQwbcU4i0HOVTMaA{hg0ZtB(?Zsxjb!CyjYgkrwket zJ!dv7cQ$5;`}f&HMCaPUU1})LQ?PH+rkp&wg(j`3=SfrHe4@7J{{Il>|97vVYDAN(i z=y2i5I4a5{YD5KoNq+YF!SpXimZ?WIQE{Qp`a#yq^*!L3+@H*{m*AgufiVF_k)mB@ z>3t2g?z805If6ZF-oyDZ_uxm9mES1Vi`K$Rqd$uBH0GmIcg`vI1R?i;$!PhbH^;os zvej`&!{>#>SYyijWja$Ext7%E81rv8q*&GIx7>P06m&dH)7~k4VF4he6pJ(Zon9t-M-m(@Z8Ax3?doIt5KHh z%Wwd0QvMwD_$N(?SB`QXs6408?-TMa3@a8`N1<$?mIsiCE#i`pLk@ZUD^txo!r;US zS(?lU9ChSWlcGN-RF+a5RyT;zme&jWVv;72kFik;Z_QVKxLMJ3e1nQ|?I7-SnVYd$ za*Zfvu3TC5{>Z}cbfh*qP&H34BsVeaWg$0g>3}u`l9Iw>7R`E_U4E$lo_;l{5o5#S z9#g@WWJ?LB$1;nLk=YxlrGN}+UnMGA;l!R|6_TD8kVf)3?x&ZEV0Cx#ek44-T5~z!HO0k;8 zwIa%G3bus#FQHgr-S-F7klovpO;eI2a|D2$SP=5O*Q}ji`W>eRC1w(3B%eVgi@q?U z4}|B(aomG@fDZlv-Xq-g+oK+)+hCFx(P2dw%Ks(#mVaww!=?o zA>hs7qJ!P(9>D)~aFLI{H-hKrD6<3^Kai7Bh)F~AUD&nMpmBR1Lp2l4ua@xgl-|3* z3#cDfhFmJqFlm-+aJ1+5h``>T9_gS$k!N?Cj)*^zh=mL?w5T2CG*PP>8L6#NbI_iR zH)^Xn^`93?c6ra3wCuy>A`RHn1q4xK9{=J;zkZc6D9i}ew$UK5+9n9IDD?UlykdDb zxhU{0Hc)9{x{PBP)5Wl)03gcm^%#$3X5M~(14E301*-D*xB%gQE=Ew4Rg + + Vasc Admin + + + + + + + + + + + + + + diff --git a/logstats-war/src/main/webapp/jsp/help.xhtml b/logstats-war/src/main/webapp/jsp/help.xhtml new file mode 100644 index 0000000..8ed2f8f --- /dev/null +++ b/logstats-war/src/main/webapp/jsp/help.xhtml @@ -0,0 +1,10 @@ + + Help + + diff --git a/logstats-war/src/main/webapp/jsp/includes/index-pulic.xhtml b/logstats-war/src/main/webapp/jsp/includes/index-pulic.xhtml new file mode 100644 index 0000000..8026865 --- /dev/null +++ b/logstats-war/src/main/webapp/jsp/includes/index-pulic.xhtml @@ -0,0 +1,15 @@ + + +

+ + + + +
+
diff --git a/logstats-war/src/main/webapp/jsp/includes/index-user.xhtml b/logstats-war/src/main/webapp/jsp/includes/index-user.xhtml new file mode 100644 index 0000000..3368e39 --- /dev/null +++ b/logstats-war/src/main/webapp/jsp/includes/index-user.xhtml @@ -0,0 +1,16 @@ + + +

+ + + + + +
+
diff --git a/logstats-war/src/main/webapp/jsp/includes/layout.xhtml b/logstats-war/src/main/webapp/jsp/includes/layout.xhtml new file mode 100644 index 0000000..a575624 --- /dev/null +++ b/logstats-war/src/main/webapp/jsp/includes/layout.xhtml @@ -0,0 +1,71 @@ + + + + + + + + + <ui:insert name="title">Default title</ui:insert> + + + + + + + +
+ +
+

+ +
+
 
+ +
+
+ + \ No newline at end of file diff --git a/logstats-war/src/main/webapp/jsp/includes/vasc-template.xhtml b/logstats-war/src/main/webapp/jsp/includes/vasc-template.xhtml new file mode 100644 index 0000000..3fb7f9b --- /dev/null +++ b/logstats-war/src/main/webapp/jsp/includes/vasc-template.xhtml @@ -0,0 +1,318 @@ + + + + + + + + + + + +

+ + + +

+ + + + +
+
+ + + + +

+ + + +

+ + + +
+
+ + + + +

+ + + + + + +

+ +
    +
  • + +
  • +
    +
+ + + +
+
+ + +

+ + +

+
+
+
+ + + + +

+ + + +

+ +

+ + + +

+
+ + + + + +
    +
  • + + + + +
  • + +
  • +
    +
+ + + + + + + + +
+ +
    +
  • + + +
  • + +
  • + + +
  • +
    + + +
  • + + +
  • +
    + +
  • ...
  • + +
  • + + +
  • +
    +
    +
  • ...
  • + +
  • + + +
  • +
    +
    +
  • + + +
  • +
+
+ + + + + + + + + + + #{entrySupport.i18nMap['generic.vasc.jsf.table.download.img']} + + + + + + #{entrySupport.i18nMap['generic.vasc.jsf.table.printer.img']} + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + #{entrySupport.i18nMap['generic.vasc.jsf.table.download.img']} + + + + + + #{entrySupport.i18nMap['generic.vasc.jsf.table.printer.img']} + + + + + + + + +
    +
  • + + +
  • + +
  • + + +
  • +
    + + +
  • + + +
  • +
    + +
  • ...
  • + +
  • + + +
  • +
    +
    +
  • ...
  • + +
  • + + +
  • +
    +
    +
  • + + +
  • +
+
+
+
+
+
+ +

+ +

+
+
+
+
+ +
+
+ diff --git a/logstats-war/src/main/webapp/jsp/includes/wiki-template.xhtml b/logstats-war/src/main/webapp/jsp/includes/wiki-template.xhtml new file mode 100644 index 0000000..98c0209 --- /dev/null +++ b/logstats-war/src/main/webapp/jsp/includes/wiki-template.xhtml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/logstats-war/src/main/webapp/jsp/index.xhtml b/logstats-war/src/main/webapp/jsp/index.xhtml new file mode 100644 index 0000000..9559078 --- /dev/null +++ b/logstats-war/src/main/webapp/jsp/index.xhtml @@ -0,0 +1,20 @@ + + Index + + + + + diff --git a/logstats-war/src/main/webapp/jsp/index_jsp.jsp b/logstats-war/src/main/webapp/jsp/index_jsp.jsp new file mode 100644 index 0000000..3255ad0 --- /dev/null +++ b/logstats-war/src/main/webapp/jsp/index_jsp.jsp @@ -0,0 +1,2 @@ +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + diff --git a/logstats-war/src/main/webapp/jsp/login/login-error.xhtml b/logstats-war/src/main/webapp/jsp/login/login-error.xhtml new file mode 100644 index 0000000..be05e55 --- /dev/null +++ b/logstats-war/src/main/webapp/jsp/login/login-error.xhtml @@ -0,0 +1,11 @@ + + Error + + + + \ No newline at end of file diff --git a/logstats-war/src/main/webapp/jsp/login/login-forgot.xhtml b/logstats-war/src/main/webapp/jsp/login/login-forgot.xhtml new file mode 100644 index 0000000..fa5efcf --- /dev/null +++ b/logstats-war/src/main/webapp/jsp/login/login-forgot.xhtml @@ -0,0 +1,11 @@ + + Forgot + + + + diff --git a/logstats-war/src/main/webapp/jsp/login/login.xhtml b/logstats-war/src/main/webapp/jsp/login/login.xhtml new file mode 100644 index 0000000..6ac57df --- /dev/null +++ b/logstats-war/src/main/webapp/jsp/login/login.xhtml @@ -0,0 +1,23 @@ + + + Login + +
+ + + + + + + + +
+ + + +
+
+ \ No newline at end of file diff --git a/logstats-war/src/main/webapp/jsp/login/logout.xhtml b/logstats-war/src/main/webapp/jsp/login/logout.xhtml new file mode 100644 index 0000000..5ef22f0 --- /dev/null +++ b/logstats-war/src/main/webapp/jsp/login/logout.xhtml @@ -0,0 +1,11 @@ + + Logout + + + + diff --git a/logstats-war/src/main/webapp/jsp/realtime.xhtml b/logstats-war/src/main/webapp/jsp/realtime.xhtml new file mode 100644 index 0000000..a50e795 --- /dev/null +++ b/logstats-war/src/main/webapp/jsp/realtime.xhtml @@ -0,0 +1,56 @@ + + Realtime Logs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/logstats-war/src/main/webapp/jsp/reports.xhtml b/logstats-war/src/main/webapp/jsp/reports.xhtml new file mode 100644 index 0000000..4ebdd1f --- /dev/null +++ b/logstats-war/src/main/webapp/jsp/reports.xhtml @@ -0,0 +1,10 @@ + + Reports + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..7942e1b --- /dev/null +++ b/pom.xml @@ -0,0 +1,206 @@ + + 4.0.0 + net.forwardfire.logstats + logstats + 0.0.1-SNAPSHOT + pom + logstats-base + + logstats-ear + logstats-ejb + logstats-war + logstats-jboss-sar + + + UTF-8 + 5.8 + 0.8.2-SNAPSHOT + 0.3.5-SNAPSHOT + + + + + + ${project.groupId} + logstats-jboss-sar + ${project.version} + sar + + + + + + + + org.apache.maven.plugins + maven-ear-plugin + 2.3.1 + + + org.codehaus.mojo + jboss-packaging-maven-plugin + + + + + + maven-compiler-plugin + + UTF-8 + 1.5 + 1.5 + true + true + true + + + + org.codehaus.mojo + jboss-packaging-maven-plugin + + true + + + + maven-site-plugin + 2.1 + + UTF-8 + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.4 + + + + + + + + + local + http://localhost:8081/nexus/content/groups/public/ + true + true + + + + + + + local + http://localhost:8081/nexus/content/groups/public/ + true + true + + + + + + + releases + Internal Releases + http://localhost:8081/nexus/content/repositories/releases + + + snapshots + Internal Snapshots + http://localhost:8081/nexus/content/repositories/snapshots + + + + + + true + + + org.apache.maven.plugins + maven-surefire-report-plugin + + true + + + + maven-jxr-plugin + + true + + + + org.apache.maven.plugins + maven-pmd-plugin + 2.5 + + true + utf-8 + 100 + 1.5 + true + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.2 + + + org.codehaus.mojo + taglist-maven-plugin + + + TODO + @todo + @deprecated + FIXME + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + true + 128m + 1g + + + + + aggregate + test-aggregate + fix + test-fix + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + + org.codehaus.mojo + cobertura-maven-plugin + + + org.apache.maven.plugins + maven-checkstyle-plugin + + + + + + + + org.testng + testng + ${testng.version} + jdk15 + test + + + \ No newline at end of file