Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Krueger2015-06-10 04:55:52 -0400
committerJan Krueger2015-06-10 04:55:52 -0400
commit3db17ab4cff0cdb237adea4c0d908257ca501505 (patch)
treea63bd75568439afa46ba4ae69ab4f64eb518e3ef
parentf1452de9d17cf7385ce0f5d02ae1d5bd1faa1f71 (diff)
downloadorg.eclipse.openk-platform.openk-repo-3db17ab4cff0cdb237adea4c0d908257ca501505.tar.gz
org.eclipse.openk-platform.openk-repo-3db17ab4cff0cdb237adea4c0d908257ca501505.tar.xz
org.eclipse.openk-platform.openk-repo-3db17ab4cff0cdb237adea4c0d908257ca501505.zip
Implementation of Validation for incoming data
-rw-r--r--openk-platform/code-checks/checkstyle.xml3
-rw-r--r--openk-platform/code-checks/pmd.xml25
-rw-r--r--openk-platform/openk-cachedb-service/pom.xml132
-rw-r--r--openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/marketoperations/mktdomain/UnitType.java6
-rw-r--r--openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/marketoperations/referencedata/RegisteredGenerator.java3
-rw-r--r--openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/meas/AnalogValue.java6
-rw-r--r--openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/meas/Measurement.java1
-rw-r--r--openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/wires/SynchronousMachine.java8
-rw-r--r--openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/service/SynchronousMachineService.java29
-rw-r--r--openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/service/SynchronousMachineValidatorService.java162
-rw-r--r--openk-platform/openk-cachedb-service/src/test/java/org/eclipse/openk/repository/AbstractRepositoryJpaTest.java4
-rw-r--r--openk-platform/openk-cachedb-service/src/test/java/org/eclipse/openk/service/SynchronousMachineValidatorServiceTest.java24
-rw-r--r--openk-platform/openk-cachedb-service/src/test/resources/database-spring-data-test.xml14
-rw-r--r--openk-platform/openk-cachedb-service/src/test/resources/json-test-samples/synchronousmachine-sample-01.json6
-rw-r--r--openk-platform/openk-cachedb-service/src/test/resources/json-test-samples/synchronousmachine-sample-02.json2
-rw-r--r--openk-platform/openk-cachedb-service/src/test/resources/json-test-samples/synchronousmachine-sample-03.json176
-rw-r--r--openk-platform/openk-cachedb-service/src/test/resources/log4j.xml26
-rw-r--r--openk-platform/openk-eisman-portlet/pom.xml4
-rw-r--r--openk-platform/openk-eisman-portlet/src/test/resources/log4j.xml26
-rw-r--r--openk-platform/pom.xml55
20 files changed, 497 insertions, 215 deletions
diff --git a/openk-platform/code-checks/checkstyle.xml b/openk-platform/code-checks/checkstyle.xml
index 464851e7..e22a3a21 100644
--- a/openk-platform/code-checks/checkstyle.xml
+++ b/openk-platform/code-checks/checkstyle.xml
@@ -3,10 +3,13 @@
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!--
+Custom ruleset for openk platform by Jan Krueger (BTC AG)
+
Checkstyle configuration that checks the Google coding conventions from:
- Google Java Style
https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html
with changes and extensions by Jan Krueger, April 2015
+
-->
<module name="Checker">
diff --git a/openk-platform/code-checks/pmd.xml b/openk-platform/code-checks/pmd.xml
index eb887992..01ba8384 100644
--- a/openk-platform/code-checks/pmd.xml
+++ b/openk-platform/code-checks/pmd.xml
@@ -1,13 +1,10 @@
<?xml version="1.0"?>
-<ruleset xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
- xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0
- http://pmd.sf.net/ruleset_xml_schema.xsd"
+<ruleset name="custom ruleset"
+ xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://pmd.sf.net/ruleset/1.0.0"
- name="Maven Ruleset">
+ xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
- <!-- Customized PMD ruleset for Maven, see [0] for more information [0] http://pmd.sourceforge.net/howtomakearuleset.html -->
- <description>Ruleset by BTC</description>
+ <description>Custom ruleset for openk platform by BTC AG</description>
<rule ref="rulesets/java/basic.xml">
<priority>4</priority>
@@ -17,9 +14,11 @@
</rule>
<rule ref="rulesets/java/codesize.xml">
<exclude name="TooManyFields"/>
- <exclude name="TooManyMethods"/>
- <exclude name="CyclomaticComplexity"/>
- <exclude name="NPathComplexity"/>
+ <exclude name="TooManyMethods"/>
+ <exclude name="CyclomaticComplexity"/>
+ <exclude name="ModifiedCyclomaticComplexity"/>
+ <exclude name="StdCyclomaticComplexity"/>
+ <exclude name="NPathComplexity"/>
<priority>4</priority>
</rule>
<!--
@@ -29,10 +28,10 @@
</rule>
-->
<!--<rule ref="rulesets/java/controversial.xml">-->
- <!--<priority>4</priority>-->
+ <!--<priority>4</priority>-->
<!--</rule>-->
<!--<rule ref="rulesets/java/coupling.xml">-->
- <!--<priority>4</priority>-->
+ <!--<priority>4</priority>-->
<!--</rule>-->
<rule ref="rulesets/java/design.xml">
<exclude name="AbstractClassWithoutAbstractMethod"/>
@@ -66,7 +65,7 @@
</rule>
<rule ref="rulesets/java/optimizations.xml">
<exclude name="UseStringBufferForStringAppends"/>
- <exclude name="AvoidInstantiatingObjectsInLoops"/>
+ <exclude name="AvoidInstantiatingObjectsInLoops"/>
<priority>4</priority>
</rule>
<rule ref="rulesets/java/sunsecure.xml">
diff --git a/openk-platform/openk-cachedb-service/pom.xml b/openk-platform/openk-cachedb-service/pom.xml
index 2e847f8f..4b553e91 100644
--- a/openk-platform/openk-cachedb-service/pom.xml
+++ b/openk-platform/openk-cachedb-service/pom.xml
@@ -70,6 +70,121 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>cihudson</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.4.0</version>
+ <executions>
+ <execution>
+ <id>some-execution</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <executable>
+ curl -o use-postgresql https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/postgresql/fc17/postgresql-9.4.1-x86_64.tar.bz2
+ source ./use-postgresql
+ psql -d postgres -c "CREATE ROLE cachedb LOGIN PASSWORD 'cachedb' VALID UNTIL 'infinity' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;"
+ psgl -d postgres -c "CREATE DATABASE cachedb WITH ENCODING='UTF8' OWNER=cachedb TABLESPACE = pg_default CONNECTION LIMIT=-1;"
+ psql -d postgres -c "CREATE SCHEMA cachedb AUTHORIZATION cachedb;"
+ psql -d postgres -c "CREATE ROLE eisman LOGIN PASSWORD 'eisman' VALID UNTIL 'infinity' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;"
+ psql -d postgres -c "CREATE DATABASE appdb WITH ENCODING='UTF8' OWNER=postgres TABLESPACE = pg_default CONNECTION LIMIT=-1;"
+ psql -d postgres -c "CREATE SCHEMA eisman AUTHORIZATION eisman;"
+ </executable>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <!--
+ <profile>
+ <id>cihudson</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.github.adrianboimvaser</groupId>
+ <artifactId>postgresql-maven-plugin</artifactId>
+ <version>0.2-SNAPSHOT</version>
+ <configuration>
+ <pgsqlHome>${project.build.directory}/pgsql</pgsqlHome>
+ <dataDir>${project.build.directory}/data</dataDir>
+ <skip>${skipITs}</skip>
+ <databaseName>postgres</databaseName>
+ <username>postgres</username>
+ </configuration>
+ <executions>
+ <execution>
+ <id>version-check</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>version</goal>
+ </goals>
+ <configuration>
+ <mandatoryVersionRange>${postgres.version}</mandatoryVersionRange>
+ </configuration>
+ </execution>
+ <execution>
+ <id>init-db</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>initdb</goal>
+ </goals>
+ <configuration>
+ <username>postgres</username>
+ <passwordFile>${basedir}/password.txt</passwordFile>
+ <encoding>UTF8</encoding>
+ <locale>en_US</locale>
+ </configuration>
+ </execution>
+ <execution>
+ <id>start-postgresql</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>create-db</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>createdb</goal>
+ </goals>
+ <configuration>
+ <username>postgres</username>
+ <databaseName>products</databaseName>
+ </configuration>
+ </execution>
+ <execution>
+ <id>drop-db</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>dropdb</goal>
+ </goals>
+ <configuration>
+ <username>postgres</username>
+ <databaseName>products</databaseName>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop-postgresql</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ -->
</profiles>
<dependencies>
@@ -78,18 +193,6 @@
<groupId>com.liferay.portal</groupId>
<artifactId>portal-service</artifactId>
</dependency>
- <!--<dependency>-->
- <!--<groupId>com.liferay.portal</groupId>-->
- <!--<artifactId>util-bridges</artifactId>-->
- <!--</dependency>-->
- <!--<dependency>-->
- <!--<groupId>com.liferay.portal</groupId>-->
- <!--<artifactId>util-taglib</artifactId>-->
- <!--</dependency>-->
- <!--<dependency>-->
- <!--<groupId>com.liferay.portal</groupId>-->
- <!--<artifactId>util-java</artifactId>-->
- <!--</dependency>-->
<!-- Javax: Serlet, JSP & Portlet -->
<dependency>
<groupId>javax.servlet</groupId>
@@ -179,6 +282,11 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
+ <!-- Utils Joda Time -->
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ </dependency>
<!-- TestNG -->
<dependency>
<groupId>org.testng</groupId>
diff --git a/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/marketoperations/mktdomain/UnitType.java b/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/marketoperations/mktdomain/UnitType.java
index 6c4fe606..0efb6941 100644
--- a/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/marketoperations/mktdomain/UnitType.java
+++ b/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/marketoperations/mktdomain/UnitType.java
@@ -52,11 +52,7 @@ public enum UnitType {
* Biogas Thermal Generating Unit (Blockheizkraftwerk Biogas)
* CIM extension by Jan Krueger, April 2015
*/
- BIOG("BIOG"),
- /**
- * Unknown
- */
- UNKNOWN("UNKNOWN");
+ BIOG("BIOG");
private final String value;
diff --git a/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/marketoperations/referencedata/RegisteredGenerator.java b/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/marketoperations/referencedata/RegisteredGenerator.java
index c32b5650..8f89b75e 100644
--- a/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/marketoperations/referencedata/RegisteredGenerator.java
+++ b/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/marketoperations/referencedata/RegisteredGenerator.java
@@ -32,7 +32,8 @@ public class RegisteredGenerator extends RegisteredResource {
* Photovoltaic, Hydro Pump-Turbine, Reciprocating Engine, Steam Turbine,
* Synchronous Condenser, Wind Turbine
*/
- @JsonView({IncludeAttribute4Json.Topology.class, IncludeAttribute4Json.SynchronousMachine.class})
+ @JsonView({IncludeAttribute4Json.Topology.class,
+ IncludeAttribute4Json.SynchronousMachine.class})
@Enumerated(EnumType.STRING)
public UnitType unitType;
diff --git a/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/meas/AnalogValue.java b/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/meas/AnalogValue.java
index 43b57f0f..8dac37d6 100644
--- a/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/meas/AnalogValue.java
+++ b/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/meas/AnalogValue.java
@@ -25,6 +25,7 @@ import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
+import java.math.BigDecimal;
/**
* AnalogValue represents an analog MeasurementValue.
@@ -50,10 +51,9 @@ public class AnalogValue extends MeasurementValue {
*/
@JsonView(IncludeAttribute4Json.NetworkState.class)
@Column(name = "VALUE")
- private Float value;
+ private BigDecimal value;
- public Float getValue() {
+ public BigDecimal getValue() {
return value;
}
-
} \ No newline at end of file
diff --git a/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/meas/Measurement.java b/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/meas/Measurement.java
index c7fd71e7..e76b9e0f 100644
--- a/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/meas/Measurement.java
+++ b/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/meas/Measurement.java
@@ -55,6 +55,7 @@ public class Measurement extends IdentifiedObject {
* Specifies the type of Measurement, e.g. IndoorTemperature, OutDoorTemperature,
* BusVoltage, GeneratorVoltage, LineFlow etc.
*/
+ // todo: hier eine enum einfuehren !
@JsonView(IncludeAttribute4Json.NetworkState.class)
@Column(name = "MEASUREMENT_TYPE")
private String measurementType;
diff --git a/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/wires/SynchronousMachine.java b/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/wires/SynchronousMachine.java
index 2a087ffd..2db94609 100644
--- a/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/wires/SynchronousMachine.java
+++ b/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/model/wires/SynchronousMachine.java
@@ -198,14 +198,6 @@ public class SynchronousMachine extends RotatingMachine {
return referencedSynchronousMachine == null ? null : referencedSynchronousMachine.getmRid();
}
-// public String getmRid() {
-// return mRid;
-// }
-//
-// public String getName() {
-// return name;
-// }
-
public Boolean getNormallyInService() {
return normallyInService;
}
diff --git a/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/service/SynchronousMachineService.java b/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/service/SynchronousMachineService.java
new file mode 100644
index 00000000..165c98a6
--- /dev/null
+++ b/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/service/SynchronousMachineService.java
@@ -0,0 +1,29 @@
+/**
+ * ****************************************************************************
+ * Copyright (c) 2015 BTC AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * <p/>
+ * Contributors:
+ * Jan Krueger - initial API and implementation
+ * *****************************************************************************
+ */
+package org.eclipse.openk.service;
+
+import org.eclipse.openk.model.wires.SynchronousMachine;
+import org.eclipse.openk.repository.SynchronousMachineRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class SynchronousMachineService {
+
+ @Autowired
+ private SynchronousMachineRepository synchronousMachineRepository;
+
+ public SynchronousMachine save(final SynchronousMachine synchronousMachine) {
+ return synchronousMachineRepository.save(synchronousMachine);
+ }
+}
diff --git a/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/service/SynchronousMachineValidatorService.java b/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/service/SynchronousMachineValidatorService.java
index ef262127..9c4f3794 100644
--- a/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/service/SynchronousMachineValidatorService.java
+++ b/openk-platform/openk-cachedb-service/src/main/java/org/eclipse/openk/service/SynchronousMachineValidatorService.java
@@ -12,14 +12,26 @@
*/
package org.eclipse.openk.service;
+import com.google.common.base.Predicate;
+import com.google.common.collect.Collections2;
+import org.apache.log4j.Logger;
+import org.eclipse.openk.model.informative.infoperations.PsrEvent;
+import org.eclipse.openk.model.informative.infoperations.PsrEventKind;
+import org.eclipse.openk.model.meas.Analog;
+import org.eclipse.openk.model.meas.AnalogValue;
+import org.eclipse.openk.model.production.GeneratingUnit;
import org.eclipse.openk.model.wires.SynchronousMachine;
+import org.joda.time.DateTime;
import org.springframework.stereotype.Service;
+import java.math.BigDecimal;
import java.util.List;
@Service
public class SynchronousMachineValidatorService {
+ private static final Logger LOG = Logger.getLogger(SynchronousMachineValidatorService.class);
+
public List<SynchronousMachine> validate(final List<SynchronousMachine> synchronousMachineList) {
for (final SynchronousMachine synchronousMachine : synchronousMachineList) {
@@ -32,7 +44,8 @@ public class SynchronousMachineValidatorService {
* Validates the data of a single SynchronousMachine.
* Validate the following attributes:
* <ul>
- * <li>Unittype may not be null and must be an element of Enum {@see UnitType}</li>
+ * <li>Unittype may not be null</li>
+ * <li>Unittype must be an element of enum {@see UnitType}. (This is implicitly done by enum.)</li>
* <li></li>
* <li></li>
* </ul>
@@ -42,13 +55,146 @@ public class SynchronousMachineValidatorService {
*/
private SynchronousMachine validateSynchronousMachine(final SynchronousMachine synchronousMachine) {
-// final RegisteredGenerator registeredGenerator = synchronousMachine.getGeneratingUnit().getRegisteredGenerator();
-//
-// //registeredGenerator.setUnitType();
-//
-// UnitType unitType = Enums.getIfPresent(UnitType.class,
-// registeredGenerator.getUnitType().value())
-// .or(UnitType.UNKNOWN);
+ final GeneratingUnit generatingUnit = synchronousMachine.getGeneratingUnit();
+
+ if (generatingUnit.getRegisteredGenerator() == null) {
+ LOG.info("SynchronousMachnine with MRID: " + synchronousMachine.getmRid() + " has no Unittype.");
+ }
+ if (generatingUnit.getHighControlLimit() == null || generatingUnit.getHighControlLimit().getValue() == null) {
+ LOG.info("SynchronousMachnine with MRID: " + synchronousMachine.getmRid() + " has no max operating power.");
+ }
+ if (generatingUnit.getMaxOperatingP() == null || generatingUnit.getMaxOperatingP().getValue() == null) {
+ LOG.info("SynchronousMachnine with MRID: " + synchronousMachine.getmRid() + " has no max operating power.");
+ }
+ if (synchronousMachine.getReductionSettingList() == null || synchronousMachine.getReductionSettingList().size() == 0) {
+ LOG.info("SynchronousMachnine with MRID: " + synchronousMachine.getmRid() + " has no reduction settings.");
+ }
+ if (synchronousMachine.getFeedInRanking() <= 0 || synchronousMachine.getFeedInRanking() > 17) {
+ LOG.info("SynchronousMachnine with MRID: " + synchronousMachine.getmRid()
+ + " has invalid feed in ranking: " + synchronousMachine.getFeedInRanking());
+ }
+ if (synchronousMachine.getFeedInPriority() <= 0 || synchronousMachine.getFeedInPriority() > 5) {
+ LOG.info("SynchronousMachnine with MRID: " + synchronousMachine.getmRid()
+ + " has invalid feed in priority: " + synchronousMachine.getFeedInRanking());
+ }
+ if (synchronousMachine.getPsrEventList() == null || synchronousMachine.getPsrEventList().size() == 0) {
+ LOG.info("SynchronousMachnine with MRID: " + synchronousMachine.getmRid() + " has no in service date.");
+ }
+ if (synchronousMachine.getPsrEventList() != null
+ && !hasPsrEventListInServiceEvent(synchronousMachine.getPsrEventList())) {
+ LOG.info("SynchronousMachnine with MRID: " + synchronousMachine.getmRid() + " has no in-service date.");
+ }
+ if (synchronousMachine.getLocation() == null || synchronousMachine.getLocation().getElectronicAddress() == null
+ || synchronousMachine.getLocation().getElectronicAddress().getEmail() == null) {
+ LOG.info("SynchronousMachnine with MRID: " + synchronousMachine.getmRid() + " has no mail contact.");
+ }
+ // validation of measurements
+ if (synchronousMachine.getAnalogList() == null
+ || getAnalogOfMeasurmentTypeGeneratorVoltage(synchronousMachine.getAnalogList()) == null) {
+ LOG.info("SynchronousMachnine with MRID: " + synchronousMachine.getmRid()
+ + " has no or too many generator data measurements.");
+ } else {
+ final AnalogValue analogValueLatest =
+ getLatestAnalogValue(getAnalogOfMeasurmentTypeGeneratorVoltage(synchronousMachine.getAnalogList()));
+ if (!hasValidTimestamp(analogValueLatest)) {
+ LOG.info("SynchronousMachnine with MRID: " + synchronousMachine.getmRid()
+ + " with measurement value: " + analogValueLatest.getValue()
+ + " timestamp: " + analogValueLatest.getTimeStamp().getValue()
+ + " has no valid measurement value. Value is too old or in the future.");
+ }
+ if (generatingUnit.getMaxOperatingP() != null
+ && generatingUnit.getMaxOperatingP().getValue() != null
+ && analogValueLatest.getValue().compareTo(generatingUnit.getMaxOperatingP().getValue()) == 1) {
+ LOG.info("SynchronousMachnine with MRID: " + synchronousMachine.getmRid()
+ + " with measurement value: " + analogValueLatest.getValue()
+ + " timestamp: " + analogValueLatest.getTimeStamp().getValue()
+ + " has a measurement value which is greater then max operating power (installed power).");
+ }
+ if (!hasCorrectSignum(analogValueLatest.getValue())) {
+ LOG.info("SynchronousMachnine with MRID: " + synchronousMachine.getmRid()
+ + " with measurement value: " + analogValueLatest.getValue()
+ + " timestamp: " + analogValueLatest.getTimeStamp().getValue()
+ + " has a measurement value which does not comply to the default signum."
+ + " The signum value will be set to the default signum value");
+
+ }
+ }
return synchronousMachine;
}
+
+ private boolean hasCorrectSignum(final BigDecimal value) {
+ boolean result = true;
+ // todo: aus portal-ext auslesen
+ // int signum = Integer.valueOf(PropsUtil.get("measurement.signum.default"));
+ // todo: signum statt 1!
+ final int signum = 1;
+ if (value.equals(BigDecimal.valueOf(0)) || value.signum() != signum) {
+ result = false;
+ } else if (value.signum() == signum) {
+ result = true;
+ }
+ return result;
+ }
+
+ private boolean hasValidTimestamp(final AnalogValue analogValue) {
+ final DateTime now = DateTime.now();
+ final DateTime dateTimeOfValue = new DateTime(analogValue.getTimeStamp().getValue());
+ // todo: aus portal-ext auslesen
+ //int hours = Integer.valueOf(PropsUtil.get("measurement.time.period.passed.valid"));
+ // todo: hours statt 12!
+ // DateTime of value is not older than n hours AND is not younger than now
+ return dateTimeOfValue.plusHours(12).isAfter(now) && !dateTimeOfValue.isAfter(now);
+ }
+
+ private boolean hasPsrEventListInServiceEvent(final List<PsrEvent> psrEventList) {
+ final Predicate<PsrEvent> predicate = new Predicate<PsrEvent>() {
+ @Override
+ public boolean apply(final PsrEvent psrEvent) {
+ return psrEvent.getPsrEventKind().equals(PsrEventKind.IN_SERVICE);
+ }
+ };
+ return Collections2.filter(psrEventList, predicate).size() >= 1;
+ }
+
+ private Analog getAnalogOfMeasurmentTypeGeneratorVoltage(final List<Analog> analogList) {
+ Analog analog = null;
+ final Predicate<Analog> predicate = new Predicate<Analog>() {
+ @Override
+ public boolean apply(final Analog analog) {
+ return "GeneratorVoltage".equals(analog.getMeasurementType());
+ }
+ };
+ if (Collections2.filter(analogList, predicate).size() == 1) {
+ analog = Collections2.filter(analogList, predicate).iterator().next();
+ }
+ return analog;
+ }
+
+// private boolean hasOneGeneratorVoltageMeasurement(final List<Analog> analogList) {
+// final Predicate<Analog> predicate = new Predicate<Analog>() {
+// @Override
+// public boolean apply(final Analog analog) {
+// return "GeneratorVoltage".equals(analog.getMeasurementType());
+// }
+// };
+// return Collections2.filter(analogList, predicate).size() == 1;
+// }
+
+
+ private AnalogValue getLatestAnalogValue(final Analog analog) {
+ AnalogValue analogValue = null;
+ for (final AnalogValue analogVal : analog.getAnalogValueList()) {
+ // initialise
+ if (analogValue == null) {
+ analogValue = analogVal;
+ }
+ // if younger set this value
+ if (analogValue.getTimeStamp().getValue().before(analogVal.getTimeStamp().getValue())) {
+ analogValue = analogVal;
+ }
+ }
+ return analogValue;
+ }
+
+
}
diff --git a/openk-platform/openk-cachedb-service/src/test/java/org/eclipse/openk/repository/AbstractRepositoryJpaTest.java b/openk-platform/openk-cachedb-service/src/test/java/org/eclipse/openk/repository/AbstractRepositoryJpaTest.java
index 23b14604..6a2f35b5 100644
--- a/openk-platform/openk-cachedb-service/src/test/java/org/eclipse/openk/repository/AbstractRepositoryJpaTest.java
+++ b/openk-platform/openk-cachedb-service/src/test/java/org/eclipse/openk/repository/AbstractRepositoryJpaTest.java
@@ -23,11 +23,15 @@ import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springframework.test.context.transaction.TransactionalTestExecutionListener;
import org.springframework.test.web.client.MockRestServiceServer;
import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.Log4jConfigurer;
import org.springframework.web.client.RestTemplate;
+import org.testng.annotations.BeforeClass;
+import javax.annotation.PostConstruct;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URISyntaxException;
diff --git a/openk-platform/openk-cachedb-service/src/test/java/org/eclipse/openk/service/SynchronousMachineValidatorServiceTest.java b/openk-platform/openk-cachedb-service/src/test/java/org/eclipse/openk/service/SynchronousMachineValidatorServiceTest.java
index 185f09c7..1dd48a9b 100644
--- a/openk-platform/openk-cachedb-service/src/test/java/org/eclipse/openk/service/SynchronousMachineValidatorServiceTest.java
+++ b/openk-platform/openk-cachedb-service/src/test/java/org/eclipse/openk/service/SynchronousMachineValidatorServiceTest.java
@@ -16,24 +16,42 @@ import com.google.common.collect.Lists;
import org.eclipse.openk.model.wires.SynchronousMachine;
import org.eclipse.openk.repository.AbstractRepositoryJpaTest;
import org.springframework.beans.factory.annotation.Autowired;
+import org.testng.Assert;
+import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;
import java.io.IOException;
import java.net.URISyntaxException;
+import java.util.Arrays;
-public class SynchronousMachineValidatorServiceTest extends AbstractRepositoryJpaTest{
+public class SynchronousMachineValidatorServiceTest extends AbstractRepositoryJpaTest {
@Autowired
private SynchronousMachineValidatorService synchronousMachineValidatorService;
+ @Autowired
+ private SynchronousMachineService synchronousMachineService;
+
+ @AfterMethod
+ private void cleanup() {
+ deleteDataTopology();
+ }
+
+ // funktioniert nicht mwhr wenn Werte aus portal-ext gelesen werden
@Test
- public void validateSynchronousMachine () throws IOException, URISyntaxException {
- final String contentJson = getContentOfJsonFile("json-test-samples/synchronousmachine-sample-01.json");
+ public void validateSynchronousMachine() throws IOException, URISyntaxException {
+ final String contentJson = getContentOfJsonFile("json-test-samples/synchronousmachine-sample-03.json");
final String uri = "/openk-cachedb-service/rest/synchronousmachine/";
SynchronousMachine[] synchronousMachineList = initRestTemplate(contentJson, uri).getForObject(uri, SynchronousMachine[].class);
synchronousMachineValidatorService.validate(Lists.newArrayList(synchronousMachineList));
+ for (SynchronousMachine synchronousMachine : Arrays.asList(synchronousMachineList)) {
+ Assert.assertTrue(synchronousMachine.getGeneratingUnit() != null);
+ synchronousMachineService.save(synchronousMachine);
+ }
+
+
}
}
diff --git a/openk-platform/openk-cachedb-service/src/test/resources/database-spring-data-test.xml b/openk-platform/openk-cachedb-service/src/test/resources/database-spring-data-test.xml
index 21b31c49..ff808a76 100644
--- a/openk-platform/openk-cachedb-service/src/test/resources/database-spring-data-test.xml
+++ b/openk-platform/openk-cachedb-service/src/test/resources/database-spring-data-test.xml
@@ -8,9 +8,17 @@
http://www.springframework.org/schema/data/jpa
http://www.springframework.org/schema/data/jpa/spring-jpa.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
- <context:component-scan
- base-package="org.eclipse.openk.service"/>
- <!--<mvc:annotation-driven/>-->
+ <!--<bean id="log4jInitializer" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">-->
+ <!--<property name="targetClass" value="org.springframework.util.Log4jConfigurer" />-->
+ <!--<property name="targetMethod" value="initLogging" />-->
+ <!--<property name="arguments">-->
+ <!--<list>-->
+ <!--<value>classpath:log4j.xml</value>-->
+ <!--</list>-->
+ <!--</property>-->
+ <!--</bean>-->
+
+ <context:component-scan base-package="org.eclipse.openk.service"/>
<jpa:repositories base-package="org.eclipse.openk.repository"
entity-manager-factory-ref="cacheDbEntityManagerFactory"
diff --git a/openk-platform/openk-cachedb-service/src/test/resources/json-test-samples/synchronousmachine-sample-01.json b/openk-platform/openk-cachedb-service/src/test/resources/json-test-samples/synchronousmachine-sample-01.json
index cf47c335..c635c345 100644
--- a/openk-platform/openk-cachedb-service/src/test/resources/json-test-samples/synchronousmachine-sample-01.json
+++ b/openk-platform/openk-cachedb-service/src/test/resources/json-test-samples/synchronousmachine-sample-01.json
@@ -40,7 +40,7 @@
"registeredGenerator": {"unitType": "PHOT"}
},
"location": {
- "name": "Location01",
+ "name": "UnitTest - Location01",
"electronicAddress": {"email": "mail@einspeiser-01.de"},
"mainAddress": {
"streetDetail": {
@@ -111,7 +111,7 @@
"registeredGenerator": {"unitType": "PTUR"}
},
"location": {
- "name": "Location02",
+ "name": "UnitTest - Location02",
"electronicAddress": {"email": "mail@einspeiser-02.de"},
"mainAddress": {
"streetDetail": {
@@ -177,7 +177,7 @@
"registeredGenerator": {"unitType": "WIND"}
},
"location": {
- "name": "Location03",
+ "name": "UnitTest - Location03",
"electronicAddress": {"email": "mail@einspeiser-03.de"},
"mainAddress": {
"streetDetail": {
diff --git a/openk-platform/openk-cachedb-service/src/test/resources/json-test-samples/synchronousmachine-sample-02.json b/openk-platform/openk-cachedb-service/src/test/resources/json-test-samples/synchronousmachine-sample-02.json
index 12215067..9804a056 100644
--- a/openk-platform/openk-cachedb-service/src/test/resources/json-test-samples/synchronousmachine-sample-02.json
+++ b/openk-platform/openk-cachedb-service/src/test/resources/json-test-samples/synchronousmachine-sample-02.json
@@ -138,7 +138,7 @@
"registeredGenerator": {"unitType": "WIND"}
},
"location": {
- "name": "Location03",
+ "name": "UnitTest - Location03",
"electronicAddress": {"email": "mail@einspeiser-03.de"},
"mainAddress": {
"streetDetail": {
diff --git a/openk-platform/openk-cachedb-service/src/test/resources/json-test-samples/synchronousmachine-sample-03.json b/openk-platform/openk-cachedb-service/src/test/resources/json-test-samples/synchronousmachine-sample-03.json
index 7029c41a..2e05b62c 100644
--- a/openk-platform/openk-cachedb-service/src/test/resources/json-test-samples/synchronousmachine-sample-03.json
+++ b/openk-platform/openk-cachedb-service/src/test/resources/json-test-samples/synchronousmachine-sample-03.json
@@ -1,147 +1,105 @@
[
{
- "name": "UnitTest - SynchronousMachine01",
- "mRid": "458899",
+ "@class": "org.eclipse.openk.model.wires.SynchronousMachine",
+ "name": "UnitTest - SynchronousMachine A",
+ "mRid": "1-100366/885",
"psrEventList": [ {
"createdDateTime": {"value": "10.12.2015 12:00:00"},
- "psrEventKind": "inService"
- }],
- "operatingShareList": [ {
- "percentage": {"value": 100},
- "operatingParticipant": {
- "name": "UnitTest - MDN-0479",
- "mRid": "1000"
- }
+ "psrEventKind": "outOfService"
}],
- "normallyInService": true,
"controlEnabled": true,
+ "normallyInService": true,
"maxU": {
"value": 30,
"multiplier": "k",
"unit": "W"
},
"synchronousMachineKind": "GENERATOR",
- "currentReductionSetting": {"value": 60},
+ "currentReductionSetting": {"value": 80},
"statusCurrentReductionSetting": true,
- "feedInRanking": 14,
+ "feedInRanking": 18,
"feedInPriority": 1,
"communicationType": "EFT",
"communicationGroup": 1,
- "referencedSynchronousMachineMrid": null,
+ "referencedSynchronousMachineMrid": "458899",
"generatingUnit": {
- "highControlLimit": {
- "value": 30,
+ "@class": "org.eclipse.openk.model.production.GeneratingUnit",
+ "name": "UnitTest - Generating Unit 04",
+ "mRid": "54/7787875488787",
+ "highControlLimit": {
+ "value": 2,
"multiplier": "k",
"unit": "W"
},
"maxOperatingP": {
- "value": 50,
"multiplier": "k",
"unit": "W"
},
- "generatorControlSource": "isControllable",
- "registeredGenerator": {"unitType": "PHOT"}
+ "generatorControlSource": "isControllable"
},
- "location": {
- "name": "UnitTest - Location01",
- "electronicAddress": {"email": "mail@einspeiser-01.de"},
- "mainAddress": {
- "streetDetail": {
- "name": "Strasse A",
- "number": "21"
+ "analogList": [ {
+ "mRid": "1/88991",
+ "measurementType": "GeneratorVoltage",
+ "unitMultiplier": "k",
+ "unitSymbol": "W",
+ "analogValueList": [
+ {
+ "timeStamp": {"value": "09.06.2015 08:12:35"},
+ "measurementValueQuality": {"failure": false},
+ "value": -11.11
},
- "postalCode": "22000",
- "townDetail": {
- "country": "Germany",
- "name": "City A"
+ {
+ "timeStamp": {"value": "06.06.2015 08:11:11"},
+ "measurementValueQuality": {"failure": false},
+ "value": 12.12
+ },
+ {
+ "timeStamp": {"value": "06.06.2015 08:10:10"},
+ "measurementValueQuality": {"failure": false},
+ "value": 13.13
+ },
+ {
+ "timeStamp": {"value": "05.06.2015 08:09:09"},
+ "measurementValueQuality": {"failure": false},
+ "value": 14.14
}
- },
- "positionPointList": [ {
- "sequenceNumber": null,
- "xPosition": "56.002554",
- "yPosition": "20.00122",
- "zPosition": null
- }]
- },
- "reductionSettingList": [
- {"setting": {"value": 10}},
- {"setting": {"value": 20}},
- {"setting": {"value": 30}},
- {"setting": {"value": 40}},
- {"setting": {"value": 50}}
- ]
- },
- {
- "name": "UnitTest - SynchronousMachine02",
- "mRid": "2000",
- "psrEventList": [],
- "operatingShareList": [ {
- "percentage": {"value": 100},
- "operatingParticipant": {
- "name": "UnitTest - MDN-0479",
- "mRid": "1000"
- }
+ ]
}],
- "normallyInService": true,
- "controlEnabled": true,
- "maxU": {
- "value": 30,
- "multiplier": "k",
- "unit": "W"
- },
- "synchronousMachineKind": "GENERATOR",
- "currentReductionSetting": {"value": 90},
- "statusCurrentReductionSetting": true,
- "feedInRanking": 15,
- "feedInPriority": 1,
- "communicationType": "EFT",
- "communicationGroup": 1,
- "referencedSynchronousMachineMrid": "458899",
- "generatingUnit": {
- "highControlLimit": {
- "value": 22,
- "multiplier": "k",
- "unit": "W"
- },
- "maxOperatingP": {
- "value": 222,
- "multiplier": "k",
- "unit": "W"
- },
- "generatorControlSource": "isControllable",
- "registeredGenerator": {"unitType": "PTUR"}
- },
"location": {
- "name": "UnitTest - Location02",
- "electronicAddress": {"email": "mail@einspeiser-02.de"},
+ "name": "UnitTest - Location03",
+ "electronicAddress": {"email": "mail@einspeiser-03.de"},
"mainAddress": {
"streetDetail": {
- "name": "Strasse B",
+ "name": "Strasse C",
"number": "21"
},
"postalCode": "22000",
"townDetail": {
"country": "Germany",
- "name": "City B"
+ "name": "City C"
}
},
"positionPointList": []
},
- "reductionSettingList": []
+ "reductionSettingList": [
+
+ ],
+ "operatingParticipantList": [ {
+ "name": "UnitTest - MDN-0479",
+ "mRid": "1000/33",
+ "percentage": {"value": 100}
+ }]
},
{
- "name": "UnitTest - SynchronousMachine03",
- "mRid": "1002",
- "psrEventList": [],
- "operatingShareList": [ {
- "percentage": {"value": 100},
- "operatingParticipant": {
- "name": "UnitTest - MDN-0479",
- "mRid": "1000"
- }
+ "@class": "org.eclipse.openk.model.wires.SynchronousMachine",
+ "name": "UnitTest - SynchronousMachine B",
+ "mRid": "2-10022/85",
+ "psrEventList": [ {
+ "createdDateTime": {"value": "10.12.2015 12:00:00"},
+ "psrEventKind": "inService"
}],
- "normallyInService": true,
"controlEnabled": true,
+ "normallyInService": true,
"maxU": {
"value": 30,
"multiplier": "k",
@@ -150,14 +108,16 @@
"synchronousMachineKind": "GENERATOR",
"currentReductionSetting": {"value": 80},
"statusCurrentReductionSetting": true,
- "feedInRanking": 15,
+ "feedInRanking": 18,
"feedInPriority": 1,
"communicationType": "EFT",
"communicationGroup": 1,
"referencedSynchronousMachineMrid": "458899",
"generatingUnit": {
+ "@class": "org.eclipse.openk.model.production.GeneratingUnit",
+ "name": "UnitTest - Generating Unit 04",
+ "mRid": "2-54/7787875488787",
"highControlLimit": {
- "value": 33,
"multiplier": "k",
"unit": "W"
},
@@ -166,8 +126,7 @@
"multiplier": "k",
"unit": "W"
},
- "generatorControlSource": "isControllable",
- "registeredGenerator": {"unitType": "WIND"}
+ "generatorControlSource": "isControllable"
},
"location": {
"name": "UnitTest - Location03",
@@ -185,6 +144,13 @@
},
"positionPointList": []
},
- "reductionSettingList": []
+ "reductionSettingList": [
+
+ ],
+ "operatingParticipantList": [ {
+ "name": "UnitTest - MDN-0479",
+ "mRid": "21000/33",
+ "percentage": {"value": 100}
+ }]
}
] \ No newline at end of file
diff --git a/openk-platform/openk-cachedb-service/src/test/resources/log4j.xml b/openk-platform/openk-cachedb-service/src/test/resources/log4j.xml
new file mode 100644
index 00000000..1ab6fe22
--- /dev/null
+++ b/openk-platform/openk-cachedb-service/src/test/resources/log4j.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+ <appender name="console" class="org.apache.log4j.ConsoleAppender">
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%-7p %d [%t] %c %x - %m%n"/>
+ </layout>
+ </appender>
+
+ <logger name="org.eclipse.openk">
+ <level value="DEBUG"/>
+ </logger>
+ <logger name="org.springframework">
+ <level value="info"/>
+ </logger>
+ <logger name="org.flywaydb">
+ <level value="info"/>
+ </logger>
+
+ <root>
+ <appender-ref ref="console"/>
+ </root>
+
+</log4j:configuration>
diff --git a/openk-platform/openk-eisman-portlet/pom.xml b/openk-platform/openk-eisman-portlet/pom.xml
index ddc17012..374f0d2a 100644
--- a/openk-platform/openk-eisman-portlet/pom.xml
+++ b/openk-platform/openk-eisman-portlet/pom.xml
@@ -47,8 +47,8 @@
<configuration>
<driver>org.postgresql.Driver</driver>
<url>jdbc:postgresql://localhost:5432/appdb</url>
- <username>postgres</username>
- <password>postgres</password>
+ <username>eisman</username>
+ <password>eisman</password>
</configuration>
<executions>
<execution>
diff --git a/openk-platform/openk-eisman-portlet/src/test/resources/log4j.xml b/openk-platform/openk-eisman-portlet/src/test/resources/log4j.xml
new file mode 100644
index 00000000..1ab6fe22
--- /dev/null
+++ b/openk-platform/openk-eisman-portlet/src/test/resources/log4j.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+ <appender name="console" class="org.apache.log4j.ConsoleAppender">
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%-7p %d [%t] %c %x - %m%n"/>
+ </layout>
+ </appender>
+
+ <logger name="org.eclipse.openk">
+ <level value="DEBUG"/>
+ </logger>
+ <logger name="org.springframework">
+ <level value="info"/>
+ </logger>
+ <logger name="org.flywaydb">
+ <level value="info"/>
+ </logger>
+
+ <root>
+ <appender-ref ref="console"/>
+ </root>
+
+</log4j:configuration>
diff --git a/openk-platform/pom.xml b/openk-platform/pom.xml
index c6e906d0..397d7fd0 100644
--- a/openk-platform/pom.xml
+++ b/openk-platform/pom.xml
@@ -31,6 +31,7 @@
<javax.servlet.api.version>3.1.0</javax.servlet.api.version>
<javax.servlet.jsp.version>2.0</javax.servlet.jsp.version>
<jdk.version>1.7</jdk.version>
+ <joda.time.version>2.3</joda.time.version>
<jshint.maven.version>1.6.0</jshint.maven.version>
<!--
Liferay Maven Plugin Versionen 6.2.1 oder 6.2.2 sind zu langsam !
@@ -204,59 +205,12 @@
<dependencyManagement>
<dependencies>
<!-- Liferay -->
- <!--<dependency>-->
- <!--<groupId>com.liferay.portal</groupId>-->
- <!--<artifactId>portal-client</artifactId>-->
- <!--<version>${liferay.version}</version>-->
- <!--</dependency>-->
- <!--<dependency>-->
- <!--<groupId>com.liferay.portal</groupId>-->
- <!--<artifactId>portal-impl</artifactId>-->
- <!--<version>${liferay.version}</version>-->
- <!--<scope>provided</scope>-->
- <!--</dependency>-->
- <!--<dependency>-->
- <!--<groupId>com.liferay.portal</groupId>-->
- <!--<artifactId>portal-pacl</artifactId>-->
- <!--<version>${liferay.version}</version>-->
- <!--<scope>provided</scope>-->
- <!--</dependency>-->
<dependency>
<groupId>com.liferay.portal</groupId>
<artifactId>portal-service</artifactId>
<version>${liferay.version}</version>
<scope>provided</scope>
</dependency>
- <!--<dependency>-->
- <!--<groupId>com.liferay.portal</groupId>-->
- <!--<artifactId>portal-web</artifactId>-->
- <!--<version>${liferay.version}</version>-->
- <!--<type>war</type>-->
- <!--<scope>provided</scope>-->
- <!--</dependency>-->
- <!--<dependency>-->
- <!--<groupId>com.liferay.portal</groupId>-->
- <!--<artifactId>util-bridges</artifactId>-->
- <!--<version>${liferay.version}</version>-->
- <!--<scope>provided</scope>-->
- <!--</dependency>-->
- <!--<dependency>-->
- <!--<groupId>com.liferay.portal</groupId>-->
- <!--<artifactId>util-taglib</artifactId>-->
- <!--<version>${liferay.version}</version>-->
- <!--<scope>provided</scope>-->
- <!--</dependency>-->
- <!--<dependency>-->
- <!--<groupId>com.liferay.portal</groupId>-->
- <!--<artifactId>util-java</artifactId>-->
- <!--<version>${liferay.version}</version>-->
- <!--<scope>provided</scope>-->
- <!--</dependency>-->
- <!--<dependency>-->
- <!--<groupId>com.liferay.portal</groupId>-->
- <!--<artifactId>util-slf4j</artifactId>-->
- <!--<version>${liferay.version}</version>-->
- <!--</dependency>-->
<!-- Javax: REST, Servlet, JSP, JSTL & Portlet -->
<dependency>
<groupId>javax.servlet</groupId>
@@ -323,7 +277,6 @@
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>${eclipselink.version}</version>
- <!--<scope>compile</scope>-->
</dependency>
<!-- Hibernate Bean Validation -->
<dependency>
@@ -370,6 +323,12 @@
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
+ <!-- Utils Joda Time -->
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <version>${joda.time.version}</version>
+ </dependency>
<!-- TestNG -->
<dependency>
<groupId>org.testng</groupId>

Back to the top