Echobase-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- 1820 discussions
Author: maven-release
Date: 2011-11-14 08:59:47 +0100 (Mon, 14 Nov 2011)
New Revision: 62
Url: http://forge.codelutin.com/repositories/revision/echobase/62
Log:
[maven-release-plugin] copy for tag echobase-0.1
Added:
tags/echobase-0.1/
1
0
r61 - in trunk: . echobase-entities echobase-services echobase-ui
by maven-release@users.forge.codelutin.com 14 Nov '11
by maven-release@users.forge.codelutin.com 14 Nov '11
14 Nov '11
Author: maven-release
Date: 2011-11-14 08:59:46 +0100 (Mon, 14 Nov 2011)
New Revision: 61
Url: http://forge.codelutin.com/repositories/revision/echobase/61
Log:
[maven-release-plugin] prepare release echobase-0.1
Modified:
trunk/echobase-entities/pom.xml
trunk/echobase-services/pom.xml
trunk/echobase-ui/pom.xml
trunk/pom.xml
Modified: trunk/echobase-entities/pom.xml
===================================================================
--- trunk/echobase-entities/pom.xml 2011-11-14 07:54:41 UTC (rev 60)
+++ trunk/echobase-entities/pom.xml 2011-11-14 07:59:46 UTC (rev 61)
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- ************************************************************* -->
@@ -11,7 +9,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>echobase</artifactId>
- <version>0.1-SNAPSHOT</version>
+ <version>0.1</version>
</parent>
<groupId>fr.ifremer.echobase</groupId>
Modified: trunk/echobase-services/pom.xml
===================================================================
--- trunk/echobase-services/pom.xml 2011-11-14 07:54:41 UTC (rev 60)
+++ trunk/echobase-services/pom.xml 2011-11-14 07:59:46 UTC (rev 61)
@@ -10,7 +10,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>echobase</artifactId>
- <version>0.1-SNAPSHOT</version>
+ <version>0.1</version>
</parent>
<groupId>fr.ifremer.echobase</groupId>
Modified: trunk/echobase-ui/pom.xml
===================================================================
--- trunk/echobase-ui/pom.xml 2011-11-14 07:54:41 UTC (rev 60)
+++ trunk/echobase-ui/pom.xml 2011-11-14 07:59:46 UTC (rev 61)
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -13,7 +11,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>echobase</artifactId>
- <version>0.1-SNAPSHOT</version>
+ <version>0.1</version>
</parent>
<groupId>fr.ifremer.echobase</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-11-14 07:54:41 UTC (rev 60)
+++ trunk/pom.xml 2011-11-14 07:59:46 UTC (rev 61)
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -17,7 +15,7 @@
<groupId>fr.ifremer</groupId>
<artifactId>echobase</artifactId>
- <version>0.1-SNAPSHOT</version>
+ <version>0.1</version>
<modules>
<module>echobase-entities</module>
@@ -81,11 +79,11 @@
<!-- ************************************************************* -->
<scm>
- <url>http://svn.forge.codelutin.com/svn/echobase/trunk</url>
- <connection>scm:svn:http://svn.forge.codelutin.com/svn/echobase/trunk
+ <url>http://svn.forge.codelutin.com/svn/echobase/tags/echobase-0.1</url>
+ <connection>scm:svn:http://svn.forge.codelutin.com/svn/echobase/tags/echobase-0.1
</connection>
<developerConnection>
- scm:svn:http://svn.forge.codelutin.com/svn/echobase
+ scm:svn:http://svn.forge.codelutin.com/svn/echobase/tags/echobase-0.1
</developerConnection>
</scm>
1
0
r60 - in trunk: . echobase-entities echobase-services echobase-ui echobase-ui/src/main/webapp
by tchemit@users.forge.codelutin.com 14 Nov '11
by tchemit@users.forge.codelutin.com 14 Nov '11
14 Nov '11
Author: tchemit
Date: 2011-11-14 08:54:41 +0100 (Mon, 14 Nov 2011)
New Revision: 60
Url: http://forge.codelutin.com/repositories/revision/echobase/60
Log:
mise ne place du war autoexecutable
optimize dependencies
Added:
trunk/echobase-ui/src/main/webapp/favicon.png
Modified:
trunk/echobase-entities/pom.xml
trunk/echobase-services/pom.xml
trunk/echobase-ui/pom.xml
trunk/pom.xml
Modified: trunk/echobase-entities/pom.xml
===================================================================
--- trunk/echobase-entities/pom.xml 2011-11-13 22:47:30 UTC (rev 59)
+++ trunk/echobase-entities/pom.xml 2011-11-14 07:54:41 UTC (rev 60)
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- ************************************************************* -->
@@ -24,26 +26,26 @@
<artifactId>nuiton-i18n</artifactId>
</dependency>
- <!--dependency>
+ <dependency>
<groupId>org.nuiton</groupId>
<artifactId>nuiton-utils</artifactId>
</dependency>
- <dependency>
+ <!--dependency>
<groupId>fr.ird</groupId>
<artifactId>msaccess-importer</artifactId>
</dependency-->
<!-- comons dependencies -->
- <!--dependency>
+ <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
</dependency>
<dependency>
@@ -51,6 +53,11 @@
<artifactId>commons-lang3</artifactId>
</dependency>
+ <!--dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ </dependency>
+
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
@@ -68,6 +75,11 @@
<artifactId>topia-persistence</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ </dependency>
+
<!-- test dependencies -->
<dependency>
Modified: trunk/echobase-services/pom.xml
===================================================================
--- trunk/echobase-services/pom.xml 2011-11-13 22:47:30 UTC (rev 59)
+++ trunk/echobase-services/pom.xml 2011-11-14 07:54:41 UTC (rev 60)
@@ -38,10 +38,10 @@
<artifactId>nuiton-utils</artifactId>
</dependency>
- <dependency>
+ <!--dependency>
<groupId>org.nuiton.i18n</groupId>
<artifactId>nuiton-i18n</artifactId>
- </dependency>
+ </dependency-->
<!-- comons dependencies -->
@@ -65,15 +65,15 @@
<artifactId>commons-logging</artifactId>
</dependency>
- <!--dependency>
+ <dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</dependency>
<dependency>
- <groupId>commons-jxpath</groupId>
- <artifactId>commons-jxpath</artifactId>
- </dependency-->
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
<dependency>
<groupId>com.google.guava</groupId>
Modified: trunk/echobase-ui/pom.xml
===================================================================
--- trunk/echobase-ui/pom.xml 2011-11-13 22:47:30 UTC (rev 59)
+++ trunk/echobase-ui/pom.xml 2011-11-14 07:54:41 UTC (rev 60)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -80,7 +82,6 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-json-plugin</artifactId>
- <scope>compile</scope>
</dependency>
<dependency>
@@ -90,6 +91,11 @@
</dependency>
<dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-runner</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
@@ -120,10 +126,10 @@
<artifactId>commons-collections</artifactId>
</dependency>
- <!--dependency>
+ <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
- </dependency-->
+ </dependency>
<dependency>
<groupId>commons-beanutils</groupId>
@@ -281,6 +287,32 @@
</webAppConfig>
</configuration>
</plugin>
+
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <mainClass>org.nuiton.web.war.JettyLauncher</mainClass>
+ </manifest>
+ </archive>
+ <overlays>
+ <overlay>
+ <groupId>org.nuiton.web</groupId>
+ <artifactId>nuiton-web</artifactId>
+ <type>jar</type>
+ <includes>
+ <include>**/war/Jetty*</include>
+ </includes>
+ </overlay>
+ <overlay>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-runner</artifactId>
+ <type>jar</type>
+ </overlay>
+ </overlays>
+ </configuration>
+ </plugin>
</plugins>
</pluginManagement>
</build>
Copied: trunk/echobase-ui/src/main/webapp/favicon.png (from rev 51, trunk/echobase-ui/src/main/webapp/images/logo_codelutin.png)
===================================================================
(Binary files differ)
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-11-13 22:47:30 UTC (rev 59)
+++ trunk/pom.xml 2011-11-14 07:54:41 UTC (rev 60)
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -80,7 +82,8 @@
<scm>
<url>http://svn.forge.codelutin.com/svn/echobase/trunk</url>
- <connection>scm:svn:http://svn.forge.codelutin.com/svn/echobase/trunk</connection>
+ <connection>scm:svn:http://svn.forge.codelutin.com/svn/echobase/trunk
+ </connection>
<developerConnection>
scm:svn:http://svn.forge.codelutin.com/svn/echobase
</developerConnection>
@@ -118,7 +121,11 @@
<h2Version>1.3.157</h2Version>
<postgresqlVersion>9.0-801.jdbc4</postgresqlVersion>
<slf4jVersion>1.6.1</slf4jVersion>
+ <jettyVersion>7.5.3.v20111011</jettyVersion>
+ <!-- This version does not work (missing javax.el api in overlay) -->
+ <!--<jettyVersion>8.0.1.v20110908</jettyVersion>-->
+ <hibernateVersion>3.6.8.Final</hibernateVersion>
<googleSearchEnabled>true</googleSearchEnabled>
<!-- license header configuration -->
@@ -214,6 +221,12 @@
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${hibernateVersion}</version>
+ </dependency>
+
<!-- base postgres -->
<dependency>
@@ -288,6 +301,13 @@
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-runner</artifactId>
+ <version>${jettyVersion}</version>
+ <scope>provided</scope>
+ </dependency>
+
<!-- loggin libraries -->
<dependency>
@@ -394,7 +414,7 @@
</reporting>
<profiles>
-
+
<profile>
<id>central-safe</id>
<activation>
1
0
r59 - trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/dbeditor
by tchemit@users.forge.codelutin.com 13 Nov '11
by tchemit@users.forge.codelutin.com 13 Nov '11
13 Nov '11
Author: tchemit
Date: 2011-11-13 23:47:30 +0100 (Sun, 13 Nov 2011)
New Revision: 59
Url: http://forge.codelutin.com/repositories/revision/echobase/59
Log:
let's be able de resize grid on dbeditor (otherwise can not reize editor)
Modified:
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/dbeditor/dbeditor.jsp
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/dbeditor/dbeditor.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/dbeditor/dbeditor.jsp 2011-11-13 22:46:30 UTC (rev 58)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/dbeditor/dbeditor.jsp 2011-11-13 22:47:30 UTC (rev 59)
@@ -69,7 +69,7 @@
pager="true" pagerButtons="true" pagerInput="true" navigator="true"
autowidth="true" rownumbers="false" viewrecords="true"
navigatorEdit="true" navigatorSearch="true"
- navigatorDelete="false" navigatorAdd="false"
+ navigatorDelete="false" navigatorAdd="false" resizable="true"
editurl="%{editUrl}" rowList="10,15,20, 50" rowNum="10"
navigatorSearchOptions="{multipleGroup:false,showQuery:true,multipleSearch:true,sopt:['eq','ne','cn','nc','bw','bn','ew','en','lt','le','gt','ge','nu','nn','in','ni']}">
1
0
r58 - trunk/echobase-services/src/main/java/fr/ifremer/echobase/services
by tchemit@users.forge.codelutin.com 13 Nov '11
by tchemit@users.forge.codelutin.com 13 Nov '11
13 Nov '11
Author: tchemit
Date: 2011-11-13 23:46:30 +0100 (Sun, 13 Nov 2011)
New Revision: 58
Url: http://forge.codelutin.com/repositories/revision/echobase/58
Log:
close h2 embedded db at creation time
Modified:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EmbeddedApplicationService.java
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EmbeddedApplicationService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EmbeddedApplicationService.java 2011-11-13 22:46:01 UTC (rev 57)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EmbeddedApplicationService.java 2011-11-13 22:46:30 UTC (rev 58)
@@ -193,7 +193,7 @@
getTransaction().replicateEntities(topiaContext, voyages);
}
} finally {
- topiaContext.closeContext();
+ rootContext.closeContext();
}
}
1
0
r57 - trunk/echobase-services/src/main/java/fr/ifremer/echobase/services
by tchemit@users.forge.codelutin.com 13 Nov '11
by tchemit@users.forge.codelutin.com 13 Nov '11
13 Nov '11
Author: tchemit
Date: 2011-11-13 23:46:01 +0100 (Sun, 13 Nov 2011)
New Revision: 57
Url: http://forge.codelutin.com/repositories/revision/echobase/57
Log:
use decorated entity in db editor
Modified:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java 2011-11-13 22:45:29 UTC (rev 56)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java 2011-11-13 22:46:01 UTC (rev 57)
@@ -205,10 +205,25 @@
}
for (int i = 0; i < length; i++) {
PropertyDiff diff = propertyDiffs[i];
+
+ Object sourceValue = diff.getSourceValue();
+ Object targetValue = diff.getTargetValue();
+
+ String propertyName = diff.getSourceProperty();
+
+ if (tableMeta.getColumns(propertyName).isFK()) {
+
+ // replace by the decorate value
+ sourceValue = getDecoratorService().decorate(
+ getLocale(), sourceValue, null);
+ targetValue = getDecoratorService().decorate(
+ getLocale(), targetValue, null);
+
+ }
buffer.append(String.format("\n Propriété '%s', ancienne valeur : %s, nouvelle valeur : %s",
- diff.getSourceProperty(),
- diff.getSourceValue(),
- diff.getTargetValue()
+ propertyName,
+ sourceValue,
+ targetValue
));
}
dao1.create(
1
0
13 Nov '11
Author: tchemit
Date: 2011-11-13 23:45:29 +0100 (Sun, 13 Nov 2011)
New Revision: 56
Url: http://forge.codelutin.com/repositories/revision/echobase/56
Log:
fix sitemesh exclude
Modified:
trunk/echobase-ui/src/main/webapp/WEB-INF/decorators.xml
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/decorators.xml
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/decorators.xml 2011-11-13 22:22:54 UTC (rev 55)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/decorators.xml 2011-11-13 22:45:29 UTC (rev 56)
@@ -30,8 +30,7 @@
<pattern>/user/login*</pattern>
<pattern>/index*</pattern>
<pattern>/dbeditor/getForeignEntities*</pattern>
- <pattern>/export/loadResult*</pattern>
- <!--<pattern>/json/*</pattern>-->
+ <pattern>/export/exportSqlResult*</pattern>
</excludes>
<decorator name="layout-default" page="layout-default.jsp">
1
0
r55 - in trunk/echobase-ui/src/main: java/fr/ifremer/echobase/ui java/fr/ifremer/echobase/ui/actions java/fr/ifremer/echobase/ui/actions/dbeditor java/fr/ifremer/echobase/ui/actions/export resources resources/config resources/i18n webapp/WEB-INF/includes webapp/WEB-INF/jsp/export
by tchemit@users.forge.codelutin.com 13 Nov '11
by tchemit@users.forge.codelutin.com 13 Nov '11
13 Nov '11
Author: tchemit
Date: 2011-11-13 23:22:54 +0100 (Sun, 13 Nov 2011)
New Revision: 55
Url: http://forge.codelutin.com/repositories/revision/echobase/55
Log:
reformat some codes
implements the CreateEmbeddedApplication actions + ui
rename some actions and action mappings
Added:
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/CreateEmbeddedApplication.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/DownloadEmbeddedApplication.java
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/createEmbeddedApplication.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportSql.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportSqlResult.jsp
Removed:
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/json/
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/export.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportGrid.jsp
Modified:
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/AbstractJSONPaginedAction.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EchoBaseActionSupport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/dbeditor/LoadEntities.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/dbeditor/SaveEntity.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/DownloadExportSqlResult.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/ExportSql.java
trunk/echobase-ui/src/main/resources/config/struts-export.xml
trunk/echobase-ui/src/main/resources/echobase.properties
trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties
trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java 2011-11-13 22:20:37 UTC (rev 54)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java 2011-11-13 22:22:54 UTC (rev 55)
@@ -30,8 +30,6 @@
import fr.ifremer.echobase.EchoBaseTopiaRootContextSupplierFactory;
import fr.ifremer.echobase.entities.EchoBaseEntityEnum;
import fr.ifremer.echobase.entities.EchoBaseUser;
-import fr.ifremer.echobase.entities.EchoBaseUserDTO;
-import fr.ifremer.echobase.entities.EchoBaseUserDTOImpl;
import fr.ifremer.echobase.entities.EchoBaseUserImpl;
import fr.ifremer.echobase.entities.meta.DbMeta;
import fr.ifremer.echobase.services.EchoBaseServiceContext;
@@ -204,7 +202,7 @@
TopiaContext transaction = rootContextSupplier.get().beginTransaction();
try {
- EchoBaseServiceContext serviceContext = new EchoBaseServiceContextImpl(
+ EchoBaseServiceContext serviceContext = EchoBaseServiceContextImpl.newContext(
Locale.getDefault(),
transaction,
configuration,
@@ -225,24 +223,7 @@
"admin user (password admin).");
}
- EchoBaseUserDTO userDTO;
- userDTO = new EchoBaseUserDTOImpl();
- userDTO.setEmail("admin");
- userDTO.setPassword("admin");
- userDTO.setAdmin(true);
- service.createOrUpdate(userDTO);
-
- if (configuration.getOptionAsBoolean("createAdmins")) {
- for (int i = 0; i < 1000; i++) {
- userDTO = new EchoBaseUserDTOImpl();
- userDTO.setEmail("admin" + i);
- userDTO.setPassword("admin");
- userDTO.setAdmin(i % 2 == 0);
- service.createOrUpdate(userDTO);
-
- }
- }
-
+ service.createDefaultAdminUser();
}
} finally {
transaction.closeContext();
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/AbstractJSONPaginedAction.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/AbstractJSONPaginedAction.java 2011-11-13 22:20:37 UTC (rev 54)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/AbstractJSONPaginedAction.java 2011-11-13 22:22:54 UTC (rev 55)
@@ -24,7 +24,7 @@
package fr.ifremer.echobase.ui.actions;
import fr.ifremer.echobase.services.Pager;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.json.JSONException;
import org.apache.struts2.json.JSONUtil;
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EchoBaseActionSupport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EchoBaseActionSupport.java 2011-11-13 22:20:37 UTC (rev 54)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EchoBaseActionSupport.java 2011-11-13 22:22:54 UTC (rev 55)
@@ -132,7 +132,7 @@
*/
protected EchoBaseServiceContext getServiceContext() {
if (serviceContext == null) {
- serviceContext = new EchoBaseServiceContextImpl(
+ serviceContext = EchoBaseServiceContextImpl.newContext(
getLocale(),
getTransaction(),
getConfiguration(),
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/dbeditor/LoadEntities.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/dbeditor/LoadEntities.java 2011-11-13 22:20:37 UTC (rev 54)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/dbeditor/LoadEntities.java 2011-11-13 22:22:54 UTC (rev 55)
@@ -29,7 +29,7 @@
import fr.ifremer.echobase.entities.meta.TableMeta;
import fr.ifremer.echobase.services.DbEditorService;
import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.nuiton.topia.persistence.TopiaEntity;
import java.util.List;
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/dbeditor/SaveEntity.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/dbeditor/SaveEntity.java 2011-11-13 22:20:37 UTC (rev 54)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/dbeditor/SaveEntity.java 2011-11-13 22:22:54 UTC (rev 55)
@@ -27,7 +27,7 @@
import fr.ifremer.echobase.entities.meta.TableMeta;
import fr.ifremer.echobase.services.DbEditorService;
import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.interceptor.ParameterAware;
import org.nuiton.util.beans.PropertyDiff;
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/CreateEmbeddedApplication.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/CreateEmbeddedApplication.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/CreateEmbeddedApplication.java 2011-11-13 22:22:54 UTC (rev 55)
@@ -0,0 +1,91 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.export;
+
+import fr.ifremer.echobase.EchoBaseConfiguration;
+import fr.ifremer.echobase.entities.Voyage;
+import fr.ifremer.echobase.services.VoyageService;
+import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
+import org.nuiton.util.Version;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * To create the embeddedApplication.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.1
+ */
+public class CreateEmbeddedApplication extends EchoBaseActionSupport {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Universe of voyages to export in db. */
+ protected Map<String, String> voyages;
+
+ /** Default file name to create. */
+ protected String fileName;
+
+ /** File name of the war used. */
+ protected String warFileName;
+
+ public Map<String, String> getVoyages() {
+ return voyages;
+ }
+
+ public Set<String> getVoyageIds() {
+ return voyages.keySet();
+ }
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public String getWarFileName() {
+ return warFileName;
+ }
+
+ @Override
+ public String execute() throws Exception {
+
+ VoyageService service = newService(VoyageService.class);
+ List<Voyage> allVoyages = service.getVoyages();
+ voyages = sortAndDecorate(allVoyages, null);
+
+ EchoBaseConfiguration configuration = getConfiguration();
+ Version version = configuration.getApplicationVersion();
+ fileName = "echobase-embedded-" + version.toString();
+ File warLocation = configuration.getWarLocation();
+ if (!warLocation.exists()) {
+ addActionError(_("echobase.error.warlocation.notFound",
+ warLocation));
+ }
+ warFileName = warLocation.getName();
+ return SUCCESS;
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/CreateEmbeddedApplication.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/DownloadEmbeddedApplication.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/DownloadEmbeddedApplication.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/DownloadEmbeddedApplication.java 2011-11-13 22:22:54 UTC (rev 55)
@@ -0,0 +1,94 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.export;
+
+import fr.ifremer.echobase.services.EmbeddedApplicationService;
+import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+
+/**
+ * Download the result of sql request in csv format.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.1
+ */
+public class DownloadEmbeddedApplication extends EchoBaseActionSupport {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Input stream of the file to download. */
+ protected transient InputStream inputStream;
+
+ /** File name of the download. */
+ protected String fileName;
+
+ /** Length of the file to download. */
+ protected long contentLength;
+
+ /** Content type of the file to download. */
+ protected String contentType;
+
+ /** Selected voyage ids to export. */
+ protected String[] voyageIds;
+
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+
+ public void setVoyageIds(String[] voyageIds) {
+ this.voyageIds = voyageIds;
+ }
+
+ public InputStream getInputStream() {
+ return inputStream;
+ }
+
+ public long getContentLength() {
+ return contentLength;
+ }
+
+ public String getContentType() {
+ return contentType;
+ }
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ @Override
+ public String execute() throws Exception {
+
+ EmbeddedApplicationService service =
+ newService(EmbeddedApplicationService.class);
+ contentType = "application/zip";
+ File zipFile = service.createEmbeddedApplication(fileName, voyageIds);
+ contentLength = zipFile.length();
+ fileName += ".zip";
+ inputStream = new FileInputStream(zipFile);
+ return SUCCESS;
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/DownloadEmbeddedApplication.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/DownloadExportSqlResult.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/DownloadExportSqlResult.java 2011-11-13 22:20:37 UTC (rev 54)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/DownloadExportSqlResult.java 2011-11-13 22:22:54 UTC (rev 55)
@@ -30,7 +30,7 @@
import java.io.InputStream;
/**
- * To export sql to a csv file.
+ * Download the result of sql request in csv format.
*
* @author tchemit <chemit(a)codelutin.com>
* @since 0.1
@@ -84,7 +84,7 @@
ExportSqlService service = newService(ExportSqlService.class);
contentType = "text/csv";
- String content = service.createCsvStream(
+ String content = service.createCsvFileContent(
sql,
getEchoBaseSession().getEchoBaseUser()
);
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/ExportSql.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/ExportSql.java 2011-11-13 22:20:37 UTC (rev 54)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/ExportSql.java 2011-11-13 22:22:54 UTC (rev 55)
@@ -27,7 +27,7 @@
import fr.ifremer.echobase.entities.ExportQueryImpl;
import fr.ifremer.echobase.services.ExportSqlService;
import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import java.util.Collection;
import java.util.Map;
@@ -84,7 +84,7 @@
} else {
// load query from database
- query = service.getQuery(selectedQueryId);
+ query = service.getQueryById(selectedQueryId);
}
return SUCCESS;
}
Modified: trunk/echobase-ui/src/main/resources/config/struts-export.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/config/struts-export.xml 2011-11-13 22:20:37 UTC (rev 54)
+++ trunk/echobase-ui/src/main/resources/config/struts-export.xml 2011-11-13 22:22:54 UTC (rev 55)
@@ -32,7 +32,7 @@
<package name="export" extends="loggued" namespace="/export">
<result-types>
- <result-type name="redirectToMainPage"
+ <result-type name="redirectExportSql"
class="org.apache.struts2.dispatcher.ServletActionRedirectResult">
<param name="actionName">exportSql</param>
<param name="namespace">export</param>
@@ -43,41 +43,47 @@
<!-- Display export sql main page -->
<action name="exportSql"
class="fr.ifremer.echobase.ui.actions.export.ExportSql">
- <result>/WEB-INF/jsp/export/export.jsp</result>
+ <result>/WEB-INF/jsp/export/exportSql.jsp</result>
</action>
<!-- Display the result of the sql query execution -->
- <action name="loadResult"
+ <action name="exportSqlResult"
class="fr.ifremer.echobase.ui.actions.export.ExportSqlResult">
- <result>/WEB-INF/jsp/export/exportGrid.jsp</result>
+ <result>/WEB-INF/jsp/export/exportSqlResult.jsp</result>
</action>
+ <!-- Display the create embedded application main page -->
+ <action name="createEmbeddedApplication"
+ class="fr.ifremer.echobase.ui.actions.export.CreateEmbeddedApplication">
+ <result>/WEB-INF/jsp/export/createEmbeddedApplication.jsp</result>
+ </action>
+
<!-- Get result of the sql query execution -->
- <action name="getExportSqlResult" method="execute"
+ <action name="getExportSqlResult"
class="fr.ifremer.echobase.ui.actions.export.GetSqlResult">
<result type="json"/>
</action>
<!-- Clone the sql query -->
- <action name="cloneQuery" method="cloneQuery"
+ <action name="cloneExportQuery" method="cloneQuery"
class="fr.ifremer.echobase.ui.actions.export.ManageExportQuery">
- <result type="redirectToMainPage"/>
+ <result type="redirectExportSql"/>
</action>
<!-- Save the sql query -->
- <action name="saveQuery" method="saveQuery"
+ <action name="saveExportQuery" method="saveQuery"
class="fr.ifremer.echobase.ui.actions.export.ManageExportQuery">
- <result type="redirectToMainPage"/>
+ <result type="redirectExportSql"/>
</action>
<!-- Delete the sql query -->
- <action name="deleteQuery" method="deleteQuery"
+ <action name="deleteExportQuery" method="deleteQuery"
class="fr.ifremer.echobase.ui.actions.export.ManageExportQuery">
- <result type="redirectToMainPage"/>
+ <result type="redirectExportSql"/>
</action>
- <!-- Download the sql query csb file -->
- <action name="downloadExport"
+ <!-- Download the sql query csv file -->
+ <action name="downloadExportSqlResult"
class="fr.ifremer.echobase.ui.actions.export.DownloadExportSqlResult">
<result type="stream">
<param name="contentType">${contentType}</param>
@@ -86,6 +92,16 @@
</result>
</action>
+ <!-- Download the embedded application zip file -->
+ <action name="downloadEmbeddedApplication"
+ class="fr.ifremer.echobase.ui.actions.export.DownloadEmbeddedApplication">
+ <result type="stream">
+ <param name="contentType">${contentType}</param>
+ <param name="contentLength">${contentLength}</param>
+ <param name="contentDisposition">filename="${fileName}"</param>
+ </result>
+ </action>
+
</package>
</struts>
Modified: trunk/echobase-ui/src/main/resources/echobase.properties
===================================================================
--- trunk/echobase-ui/src/main/resources/echobase.properties 2011-11-13 22:20:37 UTC (rev 54)
+++ trunk/echobase-ui/src/main/resources/echobase.properties 2011-11-13 22:22:54 UTC (rev 55)
@@ -22,14 +22,14 @@
# #L%
###
-application.version=${project.version}
-application.site.url=${project.url}
+project.version=${project.version}
+project.site.url=${project.url}
hibernate.hbm2ddl.auto=none
hibernate.show_sql=false
hibernate.dialect=org.hibernate.dialect.H2Dialect
hibernate.connection.driver_class=org.h2.Driver
-hibernate.connection.url=jdbc:h2:file:${data.directory}/db/h2data
+hibernate.connection.url=jdbc:h2:file:${data.directory}/db/echobase
hibernate.connection.username=sa
hibernate.connection.password=sa
\ No newline at end of file
Modified: trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties
===================================================================
--- trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties 2011-11-13 22:20:37 UTC (rev 54)
+++ trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties 2011-11-13 22:22:54 UTC (rev 55)
@@ -2,6 +2,7 @@
echobase.action.backToUserList=Retour à la liste des utilisateurs
echobase.action.cloneSqlQuery=Cloner la requête
echobase.action.create=Créer
+echobase.action.createEmbeddedApplication=Créer l'application
echobase.action.delete=Suppression
echobase.action.deleteSqlQuery=Supprimer la requête
echobase.action.exportSqlData=Exporter les données
@@ -16,6 +17,8 @@
echobase.common.admin=Administrateur
echobase.common.comment=Commentaire
echobase.common.email=Email
+echobase.common.embeddedApplicationFileName=Nom de l'archive à télécharger
+echobase.common.embeddedWarFileName=Nom du war à utiliser
echobase.common.exportFileName=Nom du fichier d'export
echobase.common.import=Import configuration
echobase.common.jdbcLogin=Login de connexion
@@ -29,12 +32,15 @@
echobase.common.tableName=Nom de la table
echobase.common.user=Utilisateur
echobase.common.voyage=Campagne
+echobase.common.voyagesToSelect=Campagnes à exporter
+echobase.embeddedApplication.configuration=Configuration de l'application embarquée
echobase.error.bad.password=Mot de passe incorrrect
echobase.error.email.already.used=
echobase.error.importArgument=
echobase.error.login.unknown=Utilisateur inconnu
echobase.error.required.email=L'email est obligatoire
echobase.error.required.password=Le mot de passe est obligatoire
+echobase.error.warlocation.notFound=L'application n'a pas été trouvé à l'emplacement suivant %s
echobase.export.queryDescription=Description
echobase.export.queryName=Nom
echobase.export.querySql=SQL
@@ -58,6 +64,7 @@
echobase.label.user.login=Utilisateur \: %s
echobase.label.welcome=Bienvenue dans EchoBase
echobase.menu.connectToDbInformations=Se connecter à la base
+echobase.menu.createEmbeddedApplication=Créer une application embarquée
echobase.menu.dbeditor=Modifier les données
echobase.menu.export=Exporter des données
echobase.menu.import=Importer des données
@@ -71,6 +78,7 @@
echobase.sqlQuery.result=Résultats de la requête
echobase.title.connectToDbInformations=Se connecter à la base de données
echobase.title.connectionToDb.detail=Détail de la connection à la base de données
+echobase.title.createEmbeddedApplication=Création de l'application embarquée
echobase.title.dbEditor=Modification de la base
echobase.title.entityModificationLogs=Journal des modifications
echobase.title.export=Export
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp 2011-11-13 22:20:37 UTC (rev 54)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp 2011-11-13 22:22:54 UTC (rev 55)
@@ -78,13 +78,17 @@
<s:text name="echobase.menu.connectToDbInformations"/>
</s:a>
</li>
- <s:if
- test="%{userIsAdmin}">
+ <s:if test="%{userIsAdmin}">
<li>
<s:a action="userList" namespace="/user">
<s:text name="echobase.menu.users"/>
</s:a>
</li>
+ <li>
+ <s:a action="createEmbeddedApplication" namespace="/export">
+ <s:text name="echobase.menu.createEmbeddedApplication"/>
+ </s:a>
+ </li>
</s:if>
</ul>
</div>
Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/createEmbeddedApplication.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/createEmbeddedApplication.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/createEmbeddedApplication.jsp 2011-11-13 22:22:54 UTC (rev 55)
@@ -0,0 +1,60 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
+
+<title><s:text name="echobase.title.createEmbeddedApplication"/></title>
+
+<s:form namespace="/export">
+
+ <br/>
+
+ <fieldset>
+ <legend><s:text name="echobase.embeddedApplication.configuration"/></legend>
+
+ <s:checkboxlist list="voyages" key="voyageIds"
+ label="%{getText('echobase.common.voyagesToSelect')}"/>
+
+ <s:textfield key="fileName" required="true" size="100"
+ label="%{getText('echobase.common.embeddedApplicationFileName')} (*)"/>
+
+ <s:label value="%{warFileName}" readonly="true"
+ label="%{getText('echobase.common.embeddedWarFileName')}"/>
+
+ <s:if test="!hasActionErrors()">
+
+ <br/>
+ <s:submit key="echobase.action.createEmbeddedApplication"
+ action="downloadEmbeddedApplication"
+ align="right"/>
+
+ </s:if>
+
+ </fieldset>
+ <div>(*) Il s'agit du nom de l'archvie et du répertoire contenu dans l'archive,
+ l'extension <strong>.zip</strong> sera automatiquement rajoutée.</div>
+</s:form>
+
+
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/createEmbeddedApplication.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/export.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/export.jsp 2011-11-13 22:20:37 UTC (rev 54)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/export.jsp 2011-11-13 22:22:54 UTC (rev 55)
@@ -1,136 +0,0 @@
-<%--
- #%L
- EchoBase :: UI
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2011 Ifremer, Codelutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- --%>
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
-
-<s:url id="loadUrl" action='exportSql' namespace='/export'/>
-<s:url id="loadGridUrl" action="loadResult" namespace="/export"/>
-<script type="text/javascript">
-
- function reloadQuery() {
- var queryId = $('[name="query.topiaId"]').val();
- var url = "${loadUrl}?" + $.param({ 'query.topiaId':queryId});
- window.location = url;
- return false;
- }
-
- function loadGridData() {
- // get sql query
- var sqlQuery = "${loadGridUrl}?" + $.param({ sql :$('[name="query.sqlQuery"]').val()});
-
- $.ajax(sqlQuery, {
- success: function(data, textStatus, jqXHR) {
- $('#resultGrid').html(data);
- }
- });
- return false;
- }
-
- jQuery(document).ready(function () {
-
- $('[name="query.topiaId"]').change(function(event) {
- var url = "${loadUrl}?" + $.param({ 'query.topiaId':this.value});
- window.location = url;
- });
-
- var queryId = $('[name="query.topiaId"]').val();
- if (queryId) {
- // auto launch query
- loadGridData();
- }
-
- });
-
-
-</script>
-
-<title><s:text name="echobase.title.export"/></title>
-
-
-<s:set var="queryExists" value="query.topiaId != null && query.topiaId != ''"/>
-
-<s:form id="exportQueryForm" namespace="/export">
-
- <s:select key="query.topiaId" label="%{getText('echobase.common.sqlQueries')}"
- list="queries" headerKey="" headerValue=""/>
-
- <br/>
-
- <fieldset>
- <legend><s:text name="echobase.sqlQuery.configuration"/></legend>
-
- <s:textarea key="query.name" required="true" cols="160" rows="1"
- label="%{getText('echobase.common.query.name')}"/>
-
- <s:textarea key="query.description" required="true" cols="160" rows="2"
- label="%{getText('echobase.common.query.description')}"/>
-
- <s:textarea key="query.sqlQuery" required="true" cols="160" rows="4"
- label="%{getText('echobase.common.sqlQuery')}"/>
-
- <s:if test="queryExists">
-
- <s:label value="%{query.lastModifiedDate}" readonly="true"
- label="%{getText('echobase.common.lastModifiedDate')}"/>
-
- <s:label value="%{decorate(query.lastModifiedUser, null)}" readonly="true"
- label="%{getText('echobase.common.lastModifiedUser')}"/>
-
- </s:if>
-
-
- <ul class="toolbar floatRight">
- <s:if test="queryExists">
- <li>
- <s:submit onclick="return reloadQuery();"
- key="echobase.action.reloadSqlQuery"
- theme="simple"/>
- </li>
- <li>
- <s:submit action="cloneQuery" key="echobase.action.cloneSqlQuery"
- theme="simple"/>
- </li>
- <li>
- <s:submit action="deleteQuery" key="echobase.action.deleteSqlQuery"
- theme="simple"/>
- </li>
- </s:if>
- <li>
- <s:submit action="saveQuery" key="echobase.action.saveSqlQuery"
- theme="simple"/>
- </li>
- <li>
- <s:submit key="echobase.action.applySqlQuery" theme="simple"
- onclick="return loadGridData();"/>
- </li>
- </ul>
- </fieldset>
-</s:form>
-
-<br/>
-
-<div id="resultGrid" class="cleanBoth"></div>
-
-
Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportGrid.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportGrid.jsp 2011-11-13 22:20:37 UTC (rev 54)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportGrid.jsp 2011-11-13 22:22:54 UTC (rev 55)
@@ -1,64 +0,0 @@
-<%--
- #%L
- EchoBase :: UI
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2011 Ifremer, Codelutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- --%>
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
-<%@ taglib prefix="sjg" uri="/struts-jquery-grid-tags" %>
-
-<s:url id="loadUrl" action="getExportSqlResult" namespace="/export"
- escapeAmp="false">
- <s:param name="sql" value="%{sql}"/>
-</s:url>
-
-<s:form action="downloadExport" namespace="/export">
-
- <fieldset>
- <legend><s:text name="echobase.sqlQuery.result"/></legend>
-
- <s:hidden key="sql" label=""/>
- <s:textfield key="fileName" required="true" size="100"
- label="%{getText('echobase.common.exportFileName')}"/>
- <s:submit key="echobase.action.exportSqlData" align="left"/>
- <br/>
-<sjg:grid id="rows" caption="%{getText('echobase.common.request.result')}"
- dataType="json" href="%{loadUrl}" gridModel="datas"
- pager="true" pagerButtons="true" pagerInput="true"
- navigator="true" autowidth="true" rownumbers="false"
- navigatorEdit="false" navigatorDelete="false"
- navigatorSearch="false" navigatorRefresh="false"
- navigatorAdd="false" rowList="10,15,20,50" rowNum="10"
- viewrecords="true">
-
- <s:iterator value="columnNames" var="name" status="status">
-
- <sjg:gridColumn name="%{#name}" title="%{#name}" sortable="false"/>
-
- </s:iterator>
-
-</sjg:grid>
- </fieldset>
-</s:form>
-
-
-
Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportSql.jsp (from rev 51, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/export.jsp)
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportSql.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportSql.jsp 2011-11-13 22:22:54 UTC (rev 55)
@@ -0,0 +1,135 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
+
+<s:url id="reloadUrl" action='exportSql' namespace='/export'/>
+<s:url id="exportSqlResultUrl" action="exportSqlResult" namespace="/export"/>
+<script type="text/javascript">
+
+ function reloadQuery() {
+ var queryId = $('[name="query.topiaId"]').val();
+ var url = "${reloadUrl}?" + $.param({ 'query.topiaId':queryId});
+ window.location = url;
+ return false;
+ }
+
+ function loadGridData() {
+ // get sql query
+ var sqlQuery = "${exportSqlResultUrl}?" +
+ $.param({ sql :$('[name="query.sqlQuery"]').val()});
+
+ $.ajax(sqlQuery, {
+ success: function(data, textStatus, jqXHR) {
+ $('#resultGrid').html(data);
+ }
+ });
+ return false;
+ }
+
+ jQuery(document).ready(function () {
+
+ $('[name="query.topiaId"]').change(function(event) {
+ var url = "${reloadUrl}?" + $.param({ 'query.topiaId':this.value});
+ window.location = url;
+ });
+
+ var queryId = $('[name="query.topiaId"]').val();
+ if (queryId) {
+ // auto launch query
+ loadGridData();
+ }
+
+ });
+
+
+</script>
+
+<title><s:text name="echobase.title.export"/></title>
+
+<s:set var="queryExists" value="query.topiaId != null && query.topiaId != ''"/>
+
+<s:form id="exportQueryForm" namespace="/export">
+
+ <s:select key="query.topiaId" label="%{getText('echobase.common.sqlQueries')}"
+ list="queries" headerKey="" headerValue=""/>
+
+ <br/>
+
+ <fieldset>
+ <legend><s:text name="echobase.sqlQuery.configuration"/></legend>
+
+ <s:textarea key="query.name" required="true" cols="160" rows="1"
+ label="%{getText('echobase.common.query.name')}"/>
+
+ <s:textarea key="query.description" required="true" cols="160" rows="2"
+ label="%{getText('echobase.common.query.description')}"/>
+
+ <s:textarea key="query.sqlQuery" required="true" cols="160" rows="4"
+ label="%{getText('echobase.common.sqlQuery')}"/>
+
+ <s:if test="queryExists">
+
+ <s:label value="%{query.lastModifiedDate}" readonly="true"
+ label="%{getText('echobase.common.lastModifiedDate')}"/>
+
+ <s:label value="%{decorate(query.lastModifiedUser, null)}" readonly="true"
+ label="%{getText('echobase.common.lastModifiedUser')}"/>
+
+ </s:if>
+
+
+ <ul class="toolbar floatRight">
+ <s:if test="queryExists">
+ <li>
+ <s:submit onclick="return reloadQuery();" theme="simple"
+ key="echobase.action.reloadSqlQuery"/>
+ </li>
+ <li>
+ <s:submit action="cloneExportQuery" theme="simple"
+ key="echobase.action.cloneSqlQuery"/>
+ </li>
+ <li>
+ <s:submit action="deleteExportQuery" theme="simple"
+ key="echobase.action.deleteSqlQuery"/>
+ </li>
+ </s:if>
+ <li>
+ <s:submit action="saveExportQuery" theme="simple"
+ key="echobase.action.saveSqlQuery"/>
+ </li>
+ <li>
+ <s:submit key="echobase.action.applySqlQuery" theme="simple"
+ onclick="return loadGridData();"/>
+ </li>
+ </ul>
+ </fieldset>
+</s:form>
+
+<br/>
+
+<div id="resultGrid" class="cleanBoth"></div>
+
+
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportSql.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportSqlResult.jsp (from rev 51, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportGrid.jsp)
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportSqlResult.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportSqlResult.jsp 2011-11-13 22:22:54 UTC (rev 55)
@@ -0,0 +1,64 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
+<%@ taglib prefix="sjg" uri="/struts-jquery-grid-tags" %>
+
+<s:url id="loadUrl" action="getExportSqlResult" namespace="/export"
+ escapeAmp="false">
+ <s:param name="sql" value="%{sql}"/>
+</s:url>
+
+<s:form action="downloadExportSqlResult" namespace="/export">
+
+ <fieldset>
+ <legend><s:text name="echobase.sqlQuery.result"/></legend>
+
+ <s:hidden key="sql" label=""/>
+ <s:textfield key="fileName" required="true" size="100"
+ label="%{getText('echobase.common.exportFileName')}"/>
+ <s:submit key="echobase.action.exportSqlData" align="left"/>
+ <br/>
+<sjg:grid id="rows" caption="%{getText('echobase.common.request.result')}"
+ dataType="json" href="%{loadUrl}" gridModel="datas"
+ pager="true" pagerButtons="true" pagerInput="true"
+ navigator="true" autowidth="true" rownumbers="false"
+ navigatorEdit="false" navigatorDelete="false"
+ navigatorSearch="false" navigatorRefresh="false"
+ navigatorAdd="false" rowList="10,15,20,50" rowNum="10"
+ viewrecords="true">
+
+ <s:iterator value="columnNames" var="name" status="status">
+
+ <sjg:gridColumn name="%{#name}" title="%{#name}" sortable="false"/>
+
+ </s:iterator>
+
+</sjg:grid>
+ </fieldset>
+</s:form>
+
+
+
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/exportSqlResult.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
1
0
r54 - in trunk/echobase-services/src/main: java/fr/ifremer/echobase/services java/fr/ifremer/echobase/services/models resources
by tchemit@users.forge.codelutin.com 13 Nov '11
by tchemit@users.forge.codelutin.com 13 Nov '11
13 Nov '11
Author: tchemit
Date: 2011-11-13 23:20:37 +0100 (Sun, 13 Nov 2011)
New Revision: 54
Url: http://forge.codelutin.com/repositories/revision/echobase/54
Log:
- add createAdmin in userService
- can duplicate s service context (needed when two db context at the same time)
- implements the EmbeddedApplicationService
- improvement in service api
Added:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EmbeddedApplicationService.java
trunk/echobase-services/src/main/resources/echobase-embedded.properties
Removed:
trunk/echobase-services/src/main/resources/echobase-db-h2.properties
Modified:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractEchoBaseService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceContext.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceContextImpl.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ExportSqlService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/UserService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/ImportModel.java
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractEchoBaseService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractEchoBaseService.java 2011-11-13 22:18:21 UTC (rev 53)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractEchoBaseService.java 2011-11-13 22:20:37 UTC (rev 54)
@@ -23,6 +23,7 @@
*/
package fr.ifremer.echobase.services;
+import fr.ifremer.echobase.EchoBaseConfiguration;
import fr.ifremer.echobase.entities.meta.DbMeta;
import org.nuiton.topia.TopiaContext;
@@ -53,5 +54,14 @@
return serviceContext.getDbMeta();
}
+ protected EchoBaseConfiguration getConfiguration() {
+ return serviceContext.getConfiguration();
+ }
+ protected <E extends EchoBaseService> E newService(Class<E> serviceClass) {
+ E e = serviceContext.newService(serviceClass);
+ return e;
+ }
+
+
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java 2011-11-13 22:18:21 UTC (rev 53)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java 2011-11-13 22:20:37 UTC (rev 54)
@@ -35,7 +35,7 @@
import fr.ifremer.echobase.entities.meta.DbMeta;
import fr.ifremer.echobase.entities.meta.TableMeta;
import org.apache.commons.beanutils.BeanUtils;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nuiton.topia.TopiaException;
@@ -65,8 +65,7 @@
protected DecoratorService getDecoratorService() {
if (decoratorService == null) {
-
- decoratorService = serviceContext.newService(DecoratorService.class);
+ decoratorService = newService(DecoratorService.class);
}
return decoratorService;
}
@@ -230,7 +229,8 @@
}
}
- protected Map<String, Object> loadRow(TableMeta tableMeta, TopiaEntity entity) {
+ protected Map<String, Object> loadRow(TableMeta tableMeta,
+ TopiaEntity entity) {
Map<String, Object> row = Maps.newLinkedHashMap();
EntityOperator<TopiaEntity> operator =
(EntityOperator<TopiaEntity>) tableMeta.getOperator();
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceContext.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceContext.java 2011-11-13 22:18:21 UTC (rev 53)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceContext.java 2011-11-13 22:20:37 UTC (rev 54)
@@ -42,12 +42,16 @@
TopiaContext getTransaction();
+ void setTransaction(TopiaContext transaction);
+
Locale getLocale();
EchoBaseConfiguration getConfiguration();
DbMeta getDbMeta();
+ EchoBaseServiceFactory getServiceFactory();
+
<E extends EchoBaseService> E newService(Class<E> clazz);
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceContextImpl.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceContextImpl.java 2011-11-13 22:18:21 UTC (rev 53)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceContextImpl.java 2011-11-13 22:20:37 UTC (rev 54)
@@ -48,11 +48,35 @@
protected DbMeta dbMeta;
- public EchoBaseServiceContextImpl(Locale locale,
- TopiaContext transaction,
- EchoBaseConfiguration configuration,
- DbMeta dbMeta,
- EchoBaseServiceFactory serviceFactory) {
+ public static EchoBaseServiceContextImpl newContext(
+ EchoBaseServiceContext serviceContext,
+ TopiaContext transaction) {
+ return newContext(serviceContext.getLocale(),
+ transaction,
+ serviceContext.getConfiguration(),
+ serviceContext.getDbMeta(),
+ serviceContext.getServiceFactory()
+ );
+ }
+
+ public static EchoBaseServiceContextImpl newContext(
+ Locale locale,
+ TopiaContext transaction,
+ EchoBaseConfiguration configuration,
+ DbMeta dbMeta,
+ EchoBaseServiceFactory serviceFactory) {
+ return new EchoBaseServiceContextImpl(locale,
+ transaction,
+ configuration,
+ dbMeta,
+ serviceFactory);
+ }
+
+ protected EchoBaseServiceContextImpl(Locale locale,
+ TopiaContext transaction,
+ EchoBaseConfiguration configuration,
+ DbMeta dbMeta,
+ EchoBaseServiceFactory serviceFactory) {
this.locale = locale;
this.transaction = transaction;
this.configuration = configuration;
@@ -67,6 +91,11 @@
}
@Override
+ public void setTransaction(TopiaContext transaction) {
+ this.transaction = transaction;
+ }
+
+ @Override
public Locale getLocale() {
return locale;
}
@@ -86,7 +115,8 @@
return dbMeta;
}
- protected EchoBaseServiceFactory getServiceFactory() {
+ @Override
+ public EchoBaseServiceFactory getServiceFactory() {
return serviceFactory;
}
}
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EmbeddedApplicationService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EmbeddedApplicationService.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EmbeddedApplicationService.java 2011-11-13 22:20:37 UTC (rev 54)
@@ -0,0 +1,201 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services;
+
+import com.google.common.base.Supplier;
+import com.google.common.collect.Lists;
+import fr.ifremer.echobase.EchoBaseTechnicalException;
+import fr.ifremer.echobase.EchoBaseTopiaRootContextSupplierFactory;
+import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.entities.ExportQuery;
+import fr.ifremer.echobase.entities.Voyage;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.util.FileUtil;
+import org.nuiton.util.ZipUtil;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.List;
+
+/**
+ * To create embedded application.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.1
+ */
+public class EmbeddedApplicationService extends AbstractEchoBaseService {
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(EmbeddedApplicationService.class);
+
+
+ public File createEmbeddedApplication(String fileName, String... voyageIds) {
+
+ File warLocation = getConfiguration().getWarLocation();
+
+ File tempDirectory = new File(FileUtils.getTempDirectory(),
+ "echobase-embedded_" + System.nanoTime());
+ tempDirectory.deleteOnExit();
+
+ File zipDirectory = new File(tempDirectory, fileName);
+
+ File zipFile = new File(tempDirectory, "echobase.zip");
+
+ if (log.isInfoEnabled()) {
+ log.info("Creates zip file [" + zipFile + "] from directory " +
+ zipDirectory);
+ }
+ try {
+ // create /
+ FileUtil.createDirectoryIfNecessary(zipDirectory);
+
+ // copy configuration file to /
+ copyConfigurationFile(zipDirectory);
+
+ // copy war to /
+ FileUtil.copy(warLocation, new File(zipDirectory, warLocation.getName()));
+
+ // create h2 db in /db
+ createH2Batabase(zipDirectory, voyageIds);
+
+ } catch (Exception eee) {
+ throw new EchoBaseTechnicalException(
+ "Could not create zip structure at location " +
+ zipDirectory, eee);
+ }
+
+
+ try {
+ ZipUtil.compress(zipFile, zipDirectory);
+ } catch (IOException eee) {
+ throw new EchoBaseTechnicalException(
+ "Can not create zip file " + zipFile, eee);
+ } finally {
+ FileUtil.deleteRecursively(zipDirectory);
+ }
+
+ return zipFile;
+ }
+
+ protected void copyConfigurationFile(File zipDirectory) throws IOException {
+
+ File configurationfile = new File(zipDirectory, "echobase.properties");
+ if (log.isInfoEnabled()) {
+ log.info("Copy configuration to " + configurationfile);
+ }
+ InputStream configInputStream =
+ getClass().getResourceAsStream("/echobase-embedded.properties");
+ OutputStream configOutputStream = new FileOutputStream(configurationfile);
+ try {
+ IOUtils.copy(configInputStream, configOutputStream);
+ } finally {
+ IOUtils.closeQuietly(configInputStream);
+ configOutputStream.close();
+ }
+ }
+
+ protected void createH2Batabase(File zipDirectory,
+ String... voyageIds) throws IOException, TopiaException {
+
+ // create new h2 db
+ Supplier<TopiaContext> topiaContextSupplier =
+ new EchoBaseTopiaRootContextSupplierFactory().newEmbeddedDatabase(zipDirectory);
+
+ TopiaContext rootContext = topiaContextSupplier.get();
+
+ TopiaContext topiaContext = rootContext.beginTransaction();
+ try {
+
+ // create new service context (with new transaction)
+ EchoBaseServiceContext newServiceContext =
+ EchoBaseServiceContextImpl.newContext(serviceContext,
+ topiaContext);
+
+ // get user service from h2 db
+ UserService userService =
+ newServiceContext.newService(UserService.class);
+
+ // create admin user
+ userService.createDefaultAdminUser();
+
+ // get admin from h2 db
+ EchoBaseUser admin = userService.getUserByEmail(
+ UserService.DEFAULT_ADMIN_EMAIL);
+
+ // get export query service
+ ExportSqlService exportSqlService =
+ newService(ExportSqlService.class);
+
+ // get all export queries from application
+ List<ExportQuery> queries = exportSqlService.getQueries();
+
+ // remove link to application user
+ for (ExportQuery query : queries) {
+ query.setLastModifiedUser(null);
+ }
+
+ // replicate queries
+ getTransaction().replicateEntities(topiaContext, queries);
+
+ // create export sql service from h2 db
+ exportSqlService =
+ newServiceContext.newService(ExportSqlService.class);
+
+ // get all queries from h2 db
+ queries = exportSqlService.getQueries();
+
+ // attach them to default created admin user in the db
+ for (ExportQuery query : queries) {
+ exportSqlService.createOrUpdate(query, admin);
+ }
+
+ // replicate referentiel to new h2 db
+ //TODO
+
+ if (voyageIds != null) {
+ // replicate selected voyage to new h2 db
+ VoyageService voyageService = newService(VoyageService.class);
+ List<Voyage> voyages = Lists.newArrayList();
+ for (String voyageId : voyageIds) {
+ Voyage voyage = voyageService.getVoyageById(voyageId);
+ voyages.add(voyage);
+ }
+ getTransaction().replicateEntities(topiaContext, voyages);
+ }
+ } finally {
+ topiaContext.closeContext();
+ }
+
+ }
+
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EmbeddedApplicationService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ExportSqlService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ExportSqlService.java 2011-11-13 22:18:21 UTC (rev 53)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ExportSqlService.java 2011-11-13 22:20:37 UTC (rev 54)
@@ -28,7 +28,7 @@
import fr.ifremer.echobase.entities.EchoBaseUser;
import fr.ifremer.echobase.entities.ExportQuery;
import fr.ifremer.echobase.entities.ExportQueryDAO;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nuiton.topia.TopiaContext;
@@ -40,7 +40,6 @@
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
-import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -56,7 +55,7 @@
/** Logger. */
private static final Log log = LogFactory.getLog(ExportSqlService.class);
- public Collection<ExportQuery> getQueries() {
+ public List<ExportQuery> getQueries() {
try {
List<ExportQuery> result = getDAO().findAll();
return result;
@@ -65,7 +64,7 @@
}
}
- public ExportQuery getQuery(String queryId) {
+ public ExportQuery getQueryById(String queryId) {
try {
ExportQuery result = getDAO().findByTopiaId(queryId);
@@ -114,10 +113,6 @@
}
}
- protected ExportQueryDAO getDAO() throws TopiaException {
- return EchoBaseDAOHelper.getExportQueryDAO(getTransaction());
- }
-
public Map<String, Object>[] executeSql(String sql, Pager pager) {
// get a query to count all rows for the request
@@ -148,7 +143,7 @@
}
}
- public String createCsvStream(String sql, EchoBaseUser echoBaseUser) {
+ public String createCsvFileContent(String sql, EchoBaseUser echoBaseUser) {
GenericSQLQuery sqlQuery = new GenericSQLQuery(sql, null);
Map<String, Object>[] rows;
@@ -161,7 +156,7 @@
}
StringBuilder buffer = new StringBuilder();
int rowCount = rows.length;
- buffer.append("# Created at ").append(new Date()).append(" by user ").append(echoBaseUser.getEmail());
+ buffer.append("#Created at ").append(new Date()).append(" by user ").append(echoBaseUser.getEmail());
buffer.append("\n#").append(StringUtils.join(columnNames, ";"));
for (int i = 0; i < rowCount; i++) {
Map<String, Object> row = rows[i];
@@ -171,6 +166,10 @@
return buffer.toString();
}
+ protected ExportQueryDAO getDAO() throws TopiaException {
+ return EchoBaseDAOHelper.getExportQueryDAO(getTransaction());
+ }
+
private static class GenericSQLQuery extends TopiaSQLQuery<Map<String, Object>> {
protected String[] columnNames;
@@ -188,6 +187,17 @@
return columnNames;
}
+ public Map<String, Object>[] getResult(TopiaContext tx) throws TopiaException {
+ List<Map<String, Object>> rows =
+ findMultipleResult((TopiaContextImplementor) tx);
+ return rows.toArray(new Map[rows.size()]);
+ }
+
+ public String[] getColumnNames(TopiaContext tx) throws TopiaException {
+ findSingleResult((TopiaContextImplementor) tx);
+ return columnNames;
+ }
+
@Override
protected PreparedStatement prepareQuery(Connection connection) throws SQLException {
return connection.prepareStatement(
@@ -236,18 +246,5 @@
return result;
}
- public Map<String, Object>[] getResult(TopiaContext tx) throws TopiaException {
- List<Map<String, Object>> rows =
- findMultipleResult((TopiaContextImplementor) tx);
- return rows.toArray(new Map[rows.size()]);
- }
-
-
- public String[] getColumnNames(TopiaContext tx) throws TopiaException {
- findSingleResult((TopiaContextImplementor) tx);
- return columnNames;
- }
-
-
}
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/UserService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/UserService.java 2011-11-13 22:18:21 UTC (rev 53)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/UserService.java 2011-11-13 22:20:37 UTC (rev 54)
@@ -29,6 +29,7 @@
import fr.ifremer.echobase.entities.EchoBaseUser;
import fr.ifremer.echobase.entities.EchoBaseUserDAO;
import fr.ifremer.echobase.entities.EchoBaseUserDTO;
+import fr.ifremer.echobase.entities.EchoBaseUserDTOImpl;
import org.apache.commons.lang3.StringUtils;
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.framework.TopiaQuery;
@@ -42,6 +43,10 @@
*/
public class UserService extends AbstractEchoBaseService {
+ public static final String DEFAULT_ADMIN_EMAIL = "admin";
+
+ public static final String DEFAULT_ADMIN_PASSWORD = "admin";
+
public List<EchoBaseUser> getUsers() {
return getUsers(null);
}
@@ -131,6 +136,25 @@
return s.equals(user.getPassword());
}
+ public void createDefaultAdminUser() {
+ EchoBaseUserDTO userDTO;
+ userDTO = new EchoBaseUserDTOImpl();
+ userDTO.setEmail(DEFAULT_ADMIN_EMAIL);
+ userDTO.setPassword(DEFAULT_ADMIN_PASSWORD);
+ userDTO.setAdmin(true);
+ createOrUpdate(userDTO);
+
+ if (getConfiguration().getOptionAsBoolean("createAdmins")) {
+ for (int i = 0; i < 1000; i++) {
+ userDTO = new EchoBaseUserDTOImpl();
+ userDTO.setEmail(DEFAULT_ADMIN_EMAIL + i);
+ userDTO.setPassword(DEFAULT_ADMIN_PASSWORD);
+ userDTO.setAdmin(i % 2 == 0);
+ createOrUpdate(userDTO);
+ }
+ }
+ }
+
public static String encodePassword(String password) {
String encodedPassword = StringUtil.encodeMD5(password);
return encodedPassword;
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/ImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/ImportModel.java 2011-11-13 22:18:21 UTC (rev 53)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/ImportModel.java 2011-11-13 22:20:37 UTC (rev 54)
@@ -24,7 +24,7 @@
package fr.ifremer.echobase.services.models;
import fr.ifremer.echobase.entities.Voyage;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import java.io.File;
Deleted: trunk/echobase-services/src/main/resources/echobase-db-h2.properties
===================================================================
--- trunk/echobase-services/src/main/resources/echobase-db-h2.properties 2011-11-13 22:18:21 UTC (rev 53)
+++ trunk/echobase-services/src/main/resources/echobase-db-h2.properties 2011-11-13 22:20:37 UTC (rev 54)
@@ -1,31 +0,0 @@
-###
-# #%L
-# EchoBase :: Services
-#
-# $Id$
-# $HeadURL$
-# %%
-# Copyright (C) 2011 Ifremer, Codelutin
-# %%
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# #L%
-###
-hibernate.hbm2ddl.auto=update
-hibernate.show_sql=false
-
-hibernate.dialect=org.hibernate.dialect.H2Dialect
-hibernate.connection.username=sa
-hibernate.connection.password=sa
-hibernate.connection.driver_class=org.h2.Driver
-hibernate.connection.url=jdbc:h2:file:${internal.db.directory}/echobase-user
Copied: trunk/echobase-services/src/main/resources/echobase-embedded.properties (from rev 51, trunk/echobase-services/src/main/resources/echobase-db-h2.properties)
===================================================================
--- trunk/echobase-services/src/main/resources/echobase-embedded.properties (rev 0)
+++ trunk/echobase-services/src/main/resources/echobase-embedded.properties 2011-11-13 22:20:37 UTC (rev 54)
@@ -0,0 +1,29 @@
+###
+# #%L
+# EchoBase :: Services
+#
+# $Id$
+# $HeadURL$
+# %%
+# Copyright (C) 2011 Ifremer, Codelutin
+# %%
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# #L%
+###
+
+hibernate.dialect=org.hibernate.dialect.H2Dialect
+hibernate.connection.username=sa
+hibernate.connection.password=sa
+hibernate.connection.driver_class=org.h2.Driver
+hibernate.connection.url=jdbc:h2:file:./db/echobase
Property changes on: trunk/echobase-services/src/main/resources/echobase-embedded.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
1
0
r53 - in trunk/echobase-entities/src/main: java/fr/ifremer/echobase resources
by tchemit@users.forge.codelutin.com 13 Nov '11
by tchemit@users.forge.codelutin.com 13 Nov '11
13 Nov '11
Author: tchemit
Date: 2011-11-13 23:18:21 +0100 (Sun, 13 Nov 2011)
New Revision: 53
Url: http://forge.codelutin.com/repositories/revision/echobase/53
Log:
- fix version loading (remove snapshot if any)
- add a default h2 configuration (when loading a embedded db)
- improve TopiaRootContextSupplierFactory (should remove the supplier this does nothing interesting for us)
- fix war location (reuse the data.directory)
Added:
trunk/echobase-entities/src/main/resources/topia-h2.properties
Modified:
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseConfiguration.java
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseConfigurationOption.java
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseTopiaRootContextSupplierFactory.java
Modified: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseConfiguration.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseConfiguration.java 2011-11-13 16:37:52 UTC (rev 52)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseConfiguration.java 2011-11-13 22:18:21 UTC (rev 53)
@@ -24,7 +24,7 @@
package fr.ifremer.echobase;
import com.google.common.base.Preconditions;
-import org.apache.commons.lang.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nuiton.topia.TopiaContextFactory;
@@ -32,6 +32,7 @@
import org.nuiton.util.ArgumentsParserException;
import org.nuiton.util.FileUtil;
import org.nuiton.util.Version;
+import org.nuiton.util.VersionUtil;
import java.io.File;
import java.io.IOException;
@@ -107,7 +108,10 @@
}
public Version getApplicationVersion() {
- Version v = applicationConfig.getOptionAsVersion(EchoBaseConfigurationOption.VERSION.key);
+ String versionStr =
+ applicationConfig.getOption(EchoBaseConfigurationOption.VERSION.key);
+ String s = VersionUtil.removeSnapshot(versionStr);
+ Version v = VersionUtil.valueOf(s);
Preconditions.checkNotNull(v);
return v;
}
Modified: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseConfigurationOption.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseConfigurationOption.java 2011-11-13 16:37:52 UTC (rev 52)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseConfigurationOption.java 2011-11-13 22:18:21 UTC (rev 53)
@@ -52,10 +52,10 @@
"", URL.class),
WAR_DIRECTORY("war.directory",
"Répertoire où est stoqué le war",
- "/var/local/echobase/war", File.class),
+ "${data.directory}/war", File.class),
WAR_LOCATION("war.location",
"Chemin complêt d'accès au war",
- "${war.directory}/echobase-${project.version}.war",
+ "${war.directory}/echobase-ui-${project.version}.war",
File.class);
Modified: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseTopiaRootContextSupplierFactory.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseTopiaRootContextSupplierFactory.java 2011-11-13 16:37:52 UTC (rev 52)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseTopiaRootContextSupplierFactory.java 2011-11-13 22:18:21 UTC (rev 53)
@@ -29,7 +29,6 @@
import fr.ifremer.echobase.entities.EchoBaseDAOHelper;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.hibernate.cfg.Environment;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaContextFactory;
import org.nuiton.topia.TopiaNotFoundException;
@@ -67,7 +66,7 @@
public Supplier<TopiaContext> newEmbeddedDatabase(File dir) {
- File databaseFile = new File(dir, "h2-db");
+ File databaseFile = new File(dir, "db");
String databaseAbsolutePath = databaseFile.getAbsolutePath();
@@ -82,8 +81,9 @@
} finally {
Closeables.closeQuietly(input);
}
- properties.setProperty(Environment.URL,
- "jdbc:h2:file:" + databaseAbsolutePath);
+ properties.setProperty(
+ TopiaContextFactory.CONFIG_URL,
+ "jdbc:h2:file:" + databaseAbsolutePath + "/echobase");
// add entities to the context
properties.setProperty(
Added: trunk/echobase-entities/src/main/resources/topia-h2.properties
===================================================================
--- trunk/echobase-entities/src/main/resources/topia-h2.properties (rev 0)
+++ trunk/echobase-entities/src/main/resources/topia-h2.properties 2011-11-13 22:18:21 UTC (rev 53)
@@ -0,0 +1,30 @@
+###
+# #%L
+# EchoBase :: Entities
+#
+# $Id$
+# $HeadURL$
+# %%
+# Copyright (C) 2011 Ifremer, Codelutin
+# %%
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# #L%
+###
+hibernate.hbm2ddl.auto=update
+hibernate.show_sql=false
+
+hibernate.dialect=org.hibernate.dialect.H2Dialect
+hibernate.connection.username=sa
+hibernate.connection.password=sa
+hibernate.connection.driver_class=org.h2.Driver
\ No newline at end of file
Property changes on: trunk/echobase-entities/src/main/resources/topia-h2.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
1
0