Skip to content

Commit

Permalink
Updates for compatibility with the pickup shop, bugfixes and author u…
Browse files Browse the repository at this point in the history
…pdates
  • Loading branch information
s_poeppk committed Mar 9, 2016
1 parent 6a3c420 commit e8f0ee8
Show file tree
Hide file tree
Showing 158 changed files with 6,899 additions and 5,230 deletions.
12 changes: 6 additions & 6 deletions cocome-maven-project/cloud-logic-service/cloud-logic-ear/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@
<parent>
<groupId>org.cocome</groupId>
<artifactId>cloud-logic-service</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.1</version>
</parent>
<dependencies>
<dependency>
<groupId>org.cocome</groupId>
<artifactId>cloud-logic-ejb</artifactId>
<version>${project.version}</version>
<version>1.1</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>org.cocome</groupId>
<artifactId>cloud-logic-webservice</artifactId>
<version>${project.version}</version>
<version>1.1</version>
<type>war</type>
</dependency>
<dependency>
<!-- <dependency>
<groupId>net.kieker-monitoring</groupId>
<artifactId>kieker</artifactId>
<version>1.12</version>
</dependency>
<dependency>
<dependency>
<groupId>org.iobserve</groupId>
<artifactId>monitoring</artifactId>
<version>0.0.1-SNAPSHOT</version>
Expand All @@ -39,7 +39,7 @@
<groupId>org.iobserve</groupId>
<artifactId>common</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependency> -->
</dependencies>

<build>
Expand Down
131 changes: 53 additions & 78 deletions cocome-maven-project/cloud-logic-service/cloud-logic-ejb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,89 +10,64 @@
<parent>
<groupId>org.cocome</groupId>
<artifactId>cloud-logic-service</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.1</version>
</parent>

<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>de.kit.ipd</groupId>
<artifactId>java.utils</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<!-- This dependency is necessary because the standard javaee library
doesn't provide javadocs -->
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-all-6.0</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</dependency>
<dependency>
<groupId>net.kieker-monitoring</groupId>
<artifactId>kieker</artifactId>
<version>1.12</version>
</dependency>
<dependency>
<groupId>org.iobserve</groupId>
<artifactId>monitoring</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.iobserve</groupId>
<artifactId>common</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>de.kit.ipd</groupId>
<artifactId>java.utils</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<!-- This dependency is necessary because the standard javaee library doesn't provide javadocs -->
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-all-6.0</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
<excludes>
<!-- These are not needed because they don't use the cloud backend
database -->
<exclude>org/cocome/tradingsystem/inventory/data/store/StoreQueryProvider.java</exclude>
<exclude>org/cocome/tradingsystem/inventory/data/enterprise/EnterpriseQueryProvider.java</exclude>
<exclude>org/cocome/tradingsystem/inventory/data/persistence/*Transaction*.java</exclude>
<exclude>de/kit/ipd/java/tradingsystem/entity/*.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<generateClient>true</generateClient>
<clientIncludes>
<clientInclude>**/I*.class</clientInclude>
<clientInclude>**/*Event.class</clientInclude>
<clientInclude>**/*Exception.class</clientInclude>
<clientInclude>**/scope/CashDeskSessionScoped.class</clientInclude>
<clientInclude>**/datatypes/*.class</clientInclude>
</clientIncludes>
</configuration>
</plugin>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<generateClient>true</generateClient>
<clientIncludes>
<clientInclude>**/I*.class</clientInclude>
<clientInclude>**/*Event.class</clientInclude>
<clientInclude>**/*Exception.class</clientInclude>
<clientInclude>**/scope/CashDeskSessionScoped.class</clientInclude>
<clientInclude>**/datatypes/*.class</clientInclude>
</clientIncludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
Expand All @@ -102,7 +77,7 @@
<goals>
<goal>copy</goal>
</goals>
<configuration>
<configuration>
<outputDirectory>${endorsed.dir}</outputDirectory>
<silent>true</silent>
<artifactItems>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
* @author Yannick Welsch
* @author Lubomir Bulej
* @author Tobias Pöppke
* @author Robert Heinrich
*/

@Dependent
Expand Down Expand Up @@ -136,7 +137,6 @@ public void onEvent(@Observes CashAmountEnteredEvent event) throws IllegalCashDe
final double cashAmount = event.getCashAmount();
LOG.debug("\tcashAmount: " + cashAmount);

this.cashDesk.setSendCashAmountEntered(false);
this.cashDesk.startCashPayment(cashAmount);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
* @author Yannick Welsch
* @author Lubomir Bulej
* @author Tobias Pöppke
* @author Robert Heinrich
*/

@CashDeskSessionScoped
Expand Down Expand Up @@ -213,11 +214,6 @@ public class CashDeskModel implements Serializable, ICashDeskModelLocal {
//

boolean expressModeEnabled = false;

// Determines whether the cash desk should send this event
// Needed because it is possible to enter the amount directly
// via the cash desk and digit by digit via the cash box
boolean sendCashAmountEntered = true;

//
// Sale state
Expand All @@ -230,14 +226,6 @@ public class CashDeskModel implements Serializable, ICashDeskModelLocal {
private double runningTotal;

String cardInfo;

public boolean isSendCashAmountEntered() {
return sendCashAmountEntered;
}

public void setSendCashAmountEntered(boolean sendCashAmountEntered) {
this.sendCashAmountEntered = sendCashAmountEntered;
}

/**
* {@inheritDoc}
Expand Down Expand Up @@ -299,7 +287,6 @@ private void resetSale() {
this.runningTotal = 0.0;
this.saleProducts = Lists.newArrayList();
this.cardInfo = INVALID_CARD_INFO;
this.sendCashAmountEntered = true;
}

private void sendSaleStartedEvent() {
Expand Down Expand Up @@ -483,10 +470,7 @@ public void startCashPayment(final double amount) throws IllegalCashDeskStateExc
final double change = this.computeChangeAmount(amount);
if (Math.signum(change) >= 0) {
this.state = CashDeskState.PAID_BY_CASH;
if (this.sendCashAmountEntered) {
// The method was called directly, not caused by the cash box
this.sendCashAmountEnteredEvent(amount);
}
this.sendCashAmountEnteredEvent(amount);
this.sendChangeAmountCalculatedEvent(change);

} else {
Expand Down Expand Up @@ -606,7 +590,7 @@ private void makeSale(final PaymentMode mode) {

//
// Request the store inventory system to account for the sale.
// This uses JMS so that the notification can be asynchronous
// This should use JMS so that the notification can be asynchronous
// and the message persisted.
//
this.sendAccountSaleEvent(saleTO);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
* Enumerates the states the {@link CashDeskEventHandler} can be in.
*
* @author Yannick Welsch
* @author Tobias Pöppke
* @author Robert Heinrich
*/
public enum CashDeskState {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* @author Holger Klus
* @author Lubomir Bulej
* @author Tobias Pöppke
* @author Robert Heinrich
*/
@Local
public interface ICashDeskEventConsumerLocal {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* be triggered from outside.
*
* @author Tobias Pöppke
* @author Robert Heinrich
*
*/
@Local
Expand Down Expand Up @@ -137,12 +138,4 @@ public interface ICashDeskModelLocal {
*/
public CashDeskState getState();

/**
* Determines whether this CashDesk should send out a CashAmountEnteredEvent
* by itself or not.
*
* @param send
*/
public void setSendCashAmountEntered(boolean send);

}
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@
*
* @author Lubomir Bulej
* @author Reiner Jung
*/
/**
* @author rju
*
* @author Tobias Pöppke
* @author Robert Heinrich
*/

public class IllegalCashDeskStateException extends BaseException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* @author Yannick Welsch
* @author Lubomir Bulej
* @author Tobias Pöppke
* @author Robert Heinrich
*/
@Stateless
public class BarcodeScannerModel implements IBarcodeScannerLocal {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* @author Holger Klus
* @author Lubomir Bulej
* @author Tobias Pöppke
* @author Robert Heinrich
*/
@Local
public interface IBarcodeScannerLocal {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* @author Yannick Welsch
* @author Lubomir Bulej
* @author Tobias Pöppke
* @author Robert Heinrich
*/
@Stateless
public class CardReaderModel implements ICardReaderLocal {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*
* @author Lubomir Bulej
* @author Tobias Pöppke
* @author Robert Heinrich
*/
@Local
public interface ICardReaderLocal {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* @author Yannick Welsch
* @author Lubomir Bulej
* @author Tobias Pöppke
* @author Robert Heinrich
*/

@Dependent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
* @author Yannick Welsch
* @author Lubomir Bulej
* @author Tobias Pöppke
* @author Robert Heinrich
*/

@CashDeskSessionScoped
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* @author Holger Klus
* @author Lubomir Bulej
* @author Tobias Pöppke
* @author Robert Heinrich
*/
@Local
interface ICashBoxEventConsumerLocal {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
*
* @author Lubomir Bulej
* @author Tobias Pöppke
* @author Robert Heinrich
*/
@Local
public interface ICashBoxLocal {
Expand Down
Loading

0 comments on commit e8f0ee8

Please sign in to comment.