Commit cedc9e68 by Tuukka Kivilahti

Merge branch 'master' into primelayout_fix

2 parents 1883023b 7af996b3
Showing with 24 additions and 2337 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

...@@ -2,10 +2,14 @@ ...@@ -2,10 +2,14 @@
*/build */build
*.class *.class
.DS_Store .DS_Store
/code/MoyaDatabase/src/fi/codecrew/moya/model/*_.java
/code/MoyaDatabase/src/fi/codecrew/moya/model/*/*_.java
*~ *~
# Eclipse settings should be ignored
.metadata .metadata
.classpath
.project
.settings
# Allow canonical metamodel generation preferences in git
# !/code/moya-database/.settings/org.eclipse.jpt.core.prefs
/code/*/target/ /code/*/target/
/code/*/test-output/ /code/*/test-output/
moya-git.properties moya-git.properties
/*
* Copyright Codecrew Ry
*
* All rights reserved.
*
* This license applies to any software containing a notice placed by the
* copyright holder. Such software is herein referred to as the Software.
* This license covers modification, distribution and use of the Software.
*
* Any distribution and use in source and binary forms, with or without
* modification is not permitted without explicit written permission from the
* copyright owner.
*
* A non-exclusive royalty-free right is granted to the copyright owner of the
* Software to use, modify and distribute all modifications to the Software in
* future versions of the Software.
*
*/
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MoyaAuthModule</name>
<comment></comment>
<projects>
<project>lib-AuthModule-depends</project>
<project>MoyaAuthModuleClient</project>
<project>MoyaBeansClient</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
line.separator=\n
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7
#Sat Jun 12 05:20:18 EEST 2010
eclipse.preferences.version=1
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="GlassFish 4.0"/>
<installed facet="java" version="1.7"/>
</faceted-project>
eclipse.preferences.version=1
org.jboss.ide.eclipse.as.core.singledeployable.deployableList=
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="oracle.eclipse.tools.glassfish.lib.system">
<attributes>
<attribute name="owner.project.facets" value="jst.utility"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MoyaAuthModuleClient</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.jboss.tools.jst.web.kb.kbbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.jboss.tools.jst.web.kb.kbnature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="MoyaAuthModuleClient">
<wb-resource deploy-path="/" source-path="/src"/>
</wb-module>
</project-modules>
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="GlassFish 4.0"/>
<fixed facet="java"/>
<fixed facet="jst.utility"/>
<installed facet="jst.utility" version="1.0"/>
<installed facet="java" version="1.7"/>
</faceted-project>
eclipse.preferences.version=1
org.jboss.ide.eclipse.as.core.singledeployable.deployableList=
<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>
<groupId>fi.codecrew.moya</groupId>
<artifactId>moya-authmodule-client</artifactId>
<version>0.2.0</version>
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="ejbModule">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="oracle.eclipse.tools.glassfish.lib.system">
<attributes>
<attribute name="owner.project.facets" value="jst.ejb"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MoyaBeans</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
line.separator=\n
eclipse.preferences.version=1
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="MoyaBeans">
<wb-resource deploy-path="/" source-path="/ejbModule" tag="defaultRootSource"/>
<property name="ClientJARURI" value="MoyaBeansClient.jar"/>
<property name="ClientProject" value="MoyaBeansClient"/>
<property name="java-output-path" value="/MoyaBeans/build/classes"/>
</wb-module>
</project-modules>
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="GlassFish 4.0"/>
<fixed facet="java"/>
<fixed facet="jst.ejb"/>
<installed facet="java" version="1.7"/>
<installed facet="glassfish.ejb" version="4.0"/>
<installed facet="jst.ejb" version="3.2"/>
</faceted-project>
disabled=06target
eclipse.preferences.version=1
eclipse.preferences.version=1
org.eclipse.wst.ws.service.policy.projectEnabled=false
default.configuration=
eclipse.preferences.version=1
hibernate3.enabled=false
eclipse.preferences.version=1
org.jboss.ide.eclipse.as.core.singledeployable.deployableList=
package fi.codecrew.moya;
public interface PermissionStrings {
}
package fi.codecrew.moya.facade.callbacks;
import javax.persistence.metamodel.SingularAttribute;
import fi.codecrew.moya.utilities.jpa.ModelInterface;
public interface StringPredicateField<T extends ModelInterface> {
SingularAttribute<T, String> getField();
}
package fi.codecrew.moya.verkkomaksutfi;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@XmlAccessorType(XmlAccessType.FIELD)
public class ContactEntry {
private String firstName;
private String lastName;
private String companyName;
private String email;
private String telephone;
private String mobile;
private ContactAddressEntry address;
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public ContactAddressEntry getAddress() {
return address;
}
public void setAddress(ContactAddressEntry address) {
this.address = address;
}
}
package fi.codecrew.moya.verkkomaksutfi;
import java.math.BigDecimal;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import fi.codecrew.moya.beanutil.DecimalXMLAdapter;
@XmlAccessorType(XmlAccessType.FIELD)
public class ProductEntry {
private String title;
private String code;
@XmlJavaTypeAdapter(DecimalXMLAdapter.class)
private BigDecimal amount = BigDecimal.ONE;
@XmlJavaTypeAdapter(DecimalXMLAdapter.class)
private BigDecimal price = BigDecimal.ZERO;
private Integer vat = 23;
@XmlJavaTypeAdapter(DecimalXMLAdapter.class)
private BigDecimal discount = BigDecimal.ZERO;
private Integer type = 1;
public ProductEntry(String t) {
title = t;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public Integer getVat() {
return vat;
}
public void setVat(Integer vat) {
this.vat = vat;
}
public BigDecimal getDiscount() {
return discount;
}
public void setDiscount(BigDecimal discount) {
this.discount = discount;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
}
package fi.codecrew.moya.verkkomaksutfi;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@XmlAccessorType(XmlAccessType.FIELD)
public class UrlSetEntry {
public UrlSetEntry()
{
}
public UrlSetEntry(String url) {
success = url + "/success.jsf";
failure = url + "/failure.jsf";
pending = url + "/pending.jsf";
notification = url + "/notification.jsf";
}
private String success;
private String failure;
private String pending;
private String notification;
public String getSuccess() {
return success;
}
public void setSuccess(String success) {
this.success = success;
}
public String getFailure() {
return failure;
}
public void setFailure(String failure) {
this.failure = failure;
}
public String getPending() {
return pending;
}
public void setPending(String pending) {
this.pending = pending;
}
public String getNotification() {
return notification;
}
public void setNotification(String notification) {
this.notification = notification;
}
}
package fi.codecrew.moya.beans;
import org.testng.annotations.Test;
public class BarcodeTests {
@Test
public void tbd() {
}
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="ejbModule">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="oracle.eclipse.tools.glassfish.lib.system">
<attributes>
<attribute name="owner.project.facets" value="jst.utility"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MoyaBeansClient</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.jboss.tools.jst.web.kb.kbbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.jboss.tools.jst.web.kb.kbnature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
line.separator=\n
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7
eclipse.preferences.version=1
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="MoyaBeansClient">
<wb-resource deploy-path="/" source-path="/ejbModule"/>
</wb-module>
</project-modules>
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="GlassFish 4.0"/>
<fixed facet="java"/>
<fixed facet="jst.utility"/>
<installed facet="jst.utility" version="1.0"/>
<installed facet="java" version="1.7"/>
</faceted-project>
default.configuration=
eclipse.preferences.version=1
hibernate3.enabled=false
eclipse.preferences.version=1
org.jboss.ide.eclipse.as.core.singledeployable.deployableList=
package fi.codecrew.moya.beans;
import java.util.ArrayList;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.enums.ActionLogMessageState;
import fi.codecrew.moya.model.ActionLogMessage;
import fi.codecrew.moya.model.ActionLogMessageResponse;
import fi.codecrew.moya.model.ActionLogMessageTag;
import fi.codecrew.moya.model.Role;
@Local
public interface ActionLogBeanLocal {
public List<ActionLogMessage> getAllActionLogEvents();
public List<Role> getAssignableRoles();
public ActionLogMessage find(Integer id);
public List<ActionLogMessageResponse> getActionLogMessageResponses(ActionLogMessage id);
public void addActionLogMessageResponse(ActionLogMessage alm, String message, ActionLogMessageState state);
public void createActionLogEvent(String message, boolean isTask);
List<ActionLogMessageTag> getAllTags();
ActionLogMessageTag getActionLogMessageTagByString(String s);
List<ActionLogMessage> getAllActionLogEventsByFilter(
List<ActionLogMessageTag> filterTags);
}
package fi.codecrew.moya.beans;
import java.io.IOException;
import java.io.InputStream;
import javax.ejb.Local;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.Place;
import fi.codecrew.moya.model.PrintedCard;
import fi.codecrew.moya.model.Product;
@Local
public interface BarcodeBeanLocal {
public PrintedCard getPrintedCard(String barcode) ;
public EventUser getUser(String barcode);
public InputStream getUserBarcode(EventUser user) throws IOException;
public InputStream getCardBarcode(PrintedCard printedCard) throws IOException;
public String getPlaceTextCode(Place place);
public Place getPlaceFromTextCode(String hexcode);
public String checkVrAuthCode(String code);
public Product getProduct(String barcode);
public Place getPlaceFromBarcode(String barcode);
}
package fi.codecrew.moya.beans;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Collection;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.bortal.views.BillSummary;
import fi.codecrew.moya.model.Bill;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.FoodWave;
import fi.codecrew.moya.model.Product;
@Local
public interface BillBeanLocal {
Bill findById(int id);
//
// Bill createEmptyBill(User shoppingUser) throws PermissionDeniedException;
//
// BillLine addProductToBill(Bill bill, Product product, BigDecimal count)
// throws PermissionDeniedException;
List<Bill> findAll();
Collection<BillSummary> getBillLineSummary();
Bill markPaid(Bill bill, Calendar when);
void getPdfBillStream(Bill bill, OutputStream ostream);
Bill createBill(Bill bill);
Bill save(Bill bill);
List<Bill> find(EventUser user);
Bill expireBill(Bill bill);
Bill addProductToBill(Bill bill, Product product, BigDecimal count, FoodWave foodwave);
Bill addProductToBill(Bill bill, Product product, BigDecimal count);
}
package fi.codecrew.moya.beans;
import javax.ejb.Local;
@Local
public interface BillLineBeanLocal {
}
package fi.codecrew.moya.beans;
import javax.ejb.Local;
@Local
public interface BootstrapBeanLocal {
void saneDefaults();
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.model.PrintedCard;
import fi.codecrew.moya.util.MassPrintResult;
@Local
public interface CardPrintBeanLocal {
public MassPrintResult getUserCardsAsPrintablePdf(List<Integer> userIdList) throws Exception;
public MassPrintResult getUserCardAsPrintablePdf(Integer userId) throws Exception;
public void acceptMassPrintResult(MassPrintResult mpr);
byte[] constructPNG(PrintedCard card) throws Exception;
}
package fi.codecrew.moya.beans;
import java.io.IOException;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.enums.CardState;
import fi.codecrew.moya.model.CardCode;
import fi.codecrew.moya.model.CardObjectData;
import fi.codecrew.moya.model.CardTemplate;
import fi.codecrew.moya.model.CardTextData;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.PrintedCard;
import fi.codecrew.moya.utilities.jsf.EntityFinderBean;
@Local
public interface CardTemplateBeanLocal extends EntityFinderBean<CardTemplate> {
// List<CardTemplate> findAll();
void create(CardTemplate card);
CardTemplate find(Integer id);
void checkAllUsersCardRights();
List<PrintedCard> findActiveCards();
List<CardTextData> findCardTextDatas(CardTemplate template);
List<CardObjectData> findCardObjectDatas(CardTemplate template);
CardTemplate save(CardTemplate card);
CardTextData save(CardTextData textData);
CardObjectData save(CardObjectData objectData);
PrintedCard getCard(Integer idParam);
List<PrintedCard> getCards(EventUser user);
CardTemplate saveImage(CardTemplate cardTemplate, byte[] bytes) throws IOException;
List<CardTemplate> findAll();
PrintedCard checkPrintedCard(EventUser user);
CardTemplate getUsersCardtype(EventUser user);
PrintedCard saveCard(PrintedCard card);
PrintedCard findCard(Integer id);
CardTextData findTextData(Integer id);
CardObjectData findObjectData(Integer id);
List<PrintedCard> getCardsByState(CardState... pendingPrint);
PrintedCard setCardState(Integer cardId, CardState printed) throws Exception;
EventUser giveCard(EventUser user, boolean markUserPlacesDelivered);
void removeCardCode(CardCode code);
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.util.CheckoutBank;
import fi.codecrew.moya.util.CheckoutReturnType;
import fi.codecrew.moya.model.Bill;
@Local
public interface CheckoutFiBeanLocal {
boolean isPaymentEnabled();
List<CheckoutBank> getToken(Bill bill);
// List<CheckoutBank> testXml();
boolean validateReturn(CheckoutReturnType returnType, String version, String stamp, String reference, String payment, String status, String algorithm, String mac);
}
package fi.codecrew.moya.beans;
import java.math.BigDecimal;
import java.util.Calendar;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.model.Discount;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.Product;
@Local
public interface DiscountBeanLocal {
Discount save(Discount discount);
public List<Discount> getActiveDiscountsByProduct(Product product, BigDecimal quantity, Calendar time, EventUser user);
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.model.EventOrganiser;
import fi.codecrew.moya.model.LanEvent;
import fi.codecrew.moya.model.LanEventPrivateProperty;
import fi.codecrew.moya.model.LanEventProperty;
import fi.codecrew.moya.model.LanEventPropertyKey;
@Local
public interface EventBeanLocal {
// static final String HTTP_URL_HOSTNAME = "HTTP_URL_HOSTNAME";
LanEvent getEventByHostname(String hostname);
LanEvent getCurrentEvent();
LanEvent mergeChanges(LanEvent event);
void create(LanEvent event);
String flushCache();
LanEventProperty getProperty(LanEventPropertyKey property);
String getPropertyString(LanEventPropertyKey property);
LanEventProperty saveOrCreateProperty(LanEventProperty property);
EventOrganiser mergeChanges(EventOrganiser eventorg);
List<LanEventPrivateProperty> getPrivateProperties();
LanEventPrivateProperty saveOrCreatePrivateProperty(LanEventPrivateProperty privateProperty);
long getPropertyLong(LanEventPropertyKey property);
LanEvent getEventById(Integer id);
LanEvent deleteProperty(LanEventProperty property);
LanEvent deletePrivateProperty(LanEventPrivateProperty property);
List<LanEvent> findAllEvents();
}
package fi.codecrew.moya.beans;
import javax.ejb.Local;
import fi.codecrew.moya.model.EventMap;
import fi.codecrew.moya.model.Place;
@Local
public interface EventMapBeanLocal {
EventMap saveMap(EventMap eventmap);
EventMap create(String mapname);
void sendImage(int destId, byte[] imagedata);
EventMap find(Integer mapId);
EventMap clearPlaces(EventMap map);
void deletePlace(Place place);
Place findPlace(Integer id);
Place updatePlace(Place place);
void createPlace(Place create);
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.model.EventOrganiser;
import fi.codecrew.moya.model.LanEvent;
import fi.codecrew.moya.model.User;
@Local
public interface EventOrganiserBeanLocal {
void save(EventOrganiser eventorg);
List<EventOrganiser> getEventOrganisers();
EventOrganiser create(String createorgname);
EventOrganiser find(Integer orgId);
LanEvent findEvent(Integer eventid);
List<EventOrganiser> getOrganisations(User user);
boolean hasOrgPermission(Integer orgId);
boolean hasEventPermission(Integer eventid);
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.model.FoodWave;
import fi.codecrew.moya.model.FoodWaveTemplate;
import fi.codecrew.moya.model.Product;
@Local
public interface FoodWaveBeanLocal {
List<FoodWaveTemplate> getTemplates();
FoodWaveTemplate saveOrCreateTemplate(FoodWaveTemplate template);
List<FoodWave> findShoppableFoodwaves();
FoodWaveTemplate saveTemplate(FoodWaveTemplate waveTemplate);
List<FoodWave> getOpenFoodWaves();
FoodWaveTemplate findTemplate(Integer templateId);
public FoodWave findFoodwave(Integer foodwaveId);
public FoodWave merge(FoodWave foodWave);
public List<FoodWave> getEventFoodWaves();
public void createFoodWave(FoodWave fw);
FoodWaveTemplate addProductToTemplate(FoodWaveTemplate template, Product currentProduct);
FoodWaveTemplate removeProductFromTemplate(Product product, FoodWaveTemplate template);
}
package fi.codecrew.moya.beans;
import javax.ejb.Local;
@Local
public interface LdapBeanLocal {
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.Local;
import javax.faces.model.ListDataModel;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.Lecture;
import fi.codecrew.moya.model.LectureGroup;
@Local
public interface LectureBeanLocal {
public List<Lecture> getLecturesByLectureGroup(LectureGroup group);
public List<LectureGroup> getLectureGroups();
public LectureGroup saveLectureGroup(LectureGroup group);
public LectureGroup findLectureGroup(Integer id);
public Lecture findLecture(Integer id);
public Lecture saveLecture(Lecture lecture);
public List<Lecture> findAvailableLectures(LectureGroup group, EventUser user);
public List<Lecture> getParticipatedLectures(EventUser user);
public Lecture participate(EventUser user, Lecture lecture);
public Lecture unparticipate(EventUser user, Lecture lecture);
public int userLectureSelectsLeft(LectureGroup group, EventUser user);
public int userLectureSelects(LectureGroup group, EventUser user);
public boolean isUserCanParticipate(EventUser user);
public Lecture getFirstLecture();
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.ApplicationException;
import javax.ejb.Local;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.LanEvent;
import fi.codecrew.moya.model.LicenseCode;
import fi.codecrew.moya.model.LicenseTarget;
import fi.codecrew.moya.model.User;
@Local
public interface LicenseBeanLocal {
public LicenseCode accessCode(LicenseCode code) throws GenerationException;
public List<LicenseTarget> findAll(LanEvent event);
public void saveOrCreateLicense(LicenseTarget game);
public List<LicenseTarget> findUserGames(EventUser user);
public List<LicenseTarget> findUnopenedUserGames(EventUser user);
public LicenseCode createAndAccessCode(LicenseTarget target, User user) throws GenerationException;
@ApplicationException(rollback=true)
public static class GenerationException extends Exception {
public GenerationException() {
super();
}
public GenerationException(String message) {
super(message);
}
/**
*
*/
private static final long serialVersionUID = 1L;
}
}
\ No newline at end of file
package fi.codecrew.moya.beans;
import javax.ejb.Local;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.LanEvent;
import fi.codecrew.moya.model.LogEntry;
import fi.codecrew.moya.model.User;
@Local
public interface LoggingBeanLocal {
LogEntry logMessage(SecurityLogType paramType, LanEvent event, User user, Object... description);
LogEntry logMessage(SecurityLogType paramType, EventUser user, Object... description);
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.model.MenuNavigation;
@Local
public interface MenuBeanLocal {
// List<MenuNavigation> getTopnavigations();
void flushDefaultmenu();
MenuNavigation findNavigation(String pagename);
List<MenuNavigation> getTopmenus();
void flushOldMenu();
MenuNavigation findNavigationId(Integer id);
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.model.NetworkAssociation;
@Local
public interface NetworkAssociationBeanLocal {
NetworkAssociation tryAssociate(String username, String password,
String ip, String mac, String code, boolean codeRequired)
throws Exception;
List<NetworkAssociation> getStatusByIPAndMAC(String ip, String mac);
List<NetworkAssociation> getActiveAssociations(boolean activatePending);
NetworkAssociation tryAssociate(String ip, String mac);
List<NetworkAssociation> getPendingAssociations();
void dropAssociationById(Integer associd);
NetworkAssociation getActiveAssociationByIP(String ipAddress);
NetworkAssociation tryAssociate(String usercode, String ip, String mac,
String code, Boolean codeRequired) throws Exception;
List<NetworkAssociation> getActiveAssociationsByHorizon(Boolean activate,
String horizon);
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.model.News;
import fi.codecrew.moya.model.NewsGroup;
@Local
public interface NewsBeanLocal {
NewsGroup findByName(String groupname);
List<NewsGroup> findAll();
NewsGroup findById(int newsgroupid);
NewsGroup merge(NewsGroup newsgroup);
void createNewsgroup(NewsGroup newsgroup);
News createNews(NewsGroup newsgroup);
News saveNews(News news);
News findNews(Integer newsid);
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.model.OrgRole;
@Local
public interface OrgRoleBeanLocal {
List<OrgRole> listOrgRoles();
OrgRole find(Integer id);
List<OrgRole> getPossibleParents(OrgRole orgRole);
void create(OrgRole orgRole);
}
package fi.codecrew.moya.beans;
import javax.ejb.Local;
import javax.resource.spi.IllegalStateException;
import fi.codecrew.moya.enums.apps.IAppPermission;
import fi.codecrew.moya.enums.apps.SpecialPermission;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.User;
@Local
public interface PermissionBeanLocal {
boolean hasPermission(IAppPermission perm);
EventUser getCurrentUser();
boolean isLoggedIn();
// boolean fatalPermission(IAppPermission perm, Object... failmessage);
// throws PermissionDeniedException;
// void fatalNotLoggedIn();
String getPrincipal();
/**
* Get common name of the logged in cert like "customer-01"
*
* @return CN of the certificate
* @throws IllegalStateException
* Principal has no CN
*/
String getCommonName() throws IllegalStateException;
EventUser getAnonEventUser();
boolean isCurrentUser(User user);
boolean isCurrentUser(EventUser user);
boolean hasPermission(SpecialPermission superadmin);
// boolean hasPermission(String perm);
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.codecrew.moya.beans;
import java.math.BigDecimal;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.exceptions.BortalCatchableException;
import fi.codecrew.moya.model.EventMap;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.GroupMembership;
import fi.codecrew.moya.model.Place;
import fi.codecrew.moya.model.PlaceGroup;
/**
*
* @author tuukka
*/
@Local
// @RemoteDestination
public interface PlaceBeanLocal {
Place findPlace(EventMap e, int x, int y);
boolean reservePlace(Place place, EventUser user);
int setBuyable(EventMap map, String buyableLike, boolean b);
// Place find(EventPk id);
boolean releasePlace(Place place);
Place mergeChanges(Place place);
PlaceGroup buySelectedPlaces(EventUser user) throws BortalCatchableException;
// void releaseUsersPlaces(User user) throws PermissionDeniedException;
Place find(int placeId);
Place unbuyPlace(Place place);
BigDecimal getTotalReservationPrice(EventUser user, Place newPlace);
BigDecimal getTotalReservationPrice(Place newPlace);
/**
*
* @param width
* page width in millimeters
* @param height
* page height in millimeters
* @param font1
* font 1 size
* @param font2
* font 2 size
* @return
*/
byte[] generatePlacesPdf(float width, float height, double font1, double font2);
// public byte[] generatePlacesPdf(double width, double height, double font1, double font2);
List<GroupMembership> matchGroupMembershipsByInviteToken(String token);
GroupMembership findGroupMembershipsByToken(String token);
PlaceGroup reserveSelectedPlaces(EventUser eventuser) throws BortalCatchableException;
public Long selectablePlaceCount(EventMap activeMap);
public EventMap findMap(Integer mapId);
public Long availablePlaceCount(EventMap activeMap);
public EventMap getActiveMap();
}
package fi.codecrew.moya.beans;
import java.io.OutputStream;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.GroupMembership;
import fi.codecrew.moya.model.PlaceGroup;
@Local
public interface PlaceGroupBeanLocal {
// PlaceGroup createPlaceGroup(User currentUser);
// GroupMembership createGroupMembership(PlaceGroup pg, Place p);
// List<GroupMembership> getMemberships(User user);
void releaseAndGenerateToken(GroupMembership gmem);
List<GroupMembership> getMembershipsAndCreations(EventUser user);
List<GroupMembership> getMemberships(EventUser user);
List<PlaceGroup> getPlacegroups(EventUser user);
void getGroupMembershipPdf(EventUser usr, OutputStream ostream);
boolean associateToToken(EventUser user, String token);
void markGrouMembershipEntered(GroupMembership row);
void markGrouMembershipNotEntered(GroupMembership row);
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.model.Poll;
import fi.codecrew.moya.model.PollAnswer;
import fi.codecrew.moya.model.PollQuestion;
import fi.codecrew.moya.model.PossibleAnswer;
@Local
public interface PollBeanLocal {
boolean createAnswers(List<PollAnswer> answers);
PossibleAnswer findPossibleAnwerById(Integer id);
void createPoll(Poll poll);
void createAnswers(PollQuestion q1);
Poll find(Integer pollId);
Poll savePoll(Poll poll);
List<Poll> findAllPolls();
List<Poll> findUsablePolls();
}
package fi.codecrew.moya.beans;
import java.math.BigDecimal;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ejb.Local;
import fi.codecrew.moya.model.AccountEvent;
import fi.codecrew.moya.model.Discount;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.InventoryEvent;
import fi.codecrew.moya.model.Product;
import fi.codecrew.moya.model.ProductFlag;
import fi.codecrew.moya.model.Role;
@Local
public interface ProductBeanLocal {
List<Product> listUserShoppableProducts();
List<Product> findProductsByFlag(ProductFlag... productFlags);
void create(Product prod);
List<Product> getProducts();
Product mergeChanges(Product product);
Product findCreditProduct();
// BigDecimal calculateTotal(Product key, BigDecimal value);
AccountEvent createAccountEvent(Product product, BigDecimal quantity, EventUser user);
// List<Discount> getActiveDiscounts(Product product, BigDecimal quantity);
Product findById(int parseInt);
Product findByBarcode(String barcode);
List<Product> findForStaffshop();
Discount findDiscount(Integer discountid);
Discount save(Discount discount);
BigDecimal calculateTotal(Product product, BigDecimal quantity, Calendar date, EventUser user);
HashMap<Integer, BigDecimal> getProductLimit(Map<Integer, BigDecimal> prodCounts, EventUser user);
BigDecimal getProductLimit(Product product, EventUser user, Map<Integer, BigDecimal> prodCounts);
void saveInventoryEvent(InventoryEvent ie);
List<Product> findProductsForEvent();
List<Product> findPlaceProducts();
AccountEvent merge(AccountEvent account);
EventUser delete(AccountEvent account);
AccountEvent find(Integer id);
void shopCash(EventUser shoppingUser, Map<Product, BigDecimal> shopMap, boolean buyInstant);
List<Role> getRolesFromAccountEvents(EventUser u);
AccountEvent markDelivered(AccountEvent e, Calendar c);
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.PrintedCard;
import fi.codecrew.moya.model.Reader;
import fi.codecrew.moya.model.ReaderEvent;
import fi.codecrew.moya.model.User;
@Local
public interface ReaderBeanLocal {
// WAT!
// ReaderEvent assocTagToPlacecode(String tag, String readerIdent, String
// placecode) throws BortalCatchableException, PermissionDeniedException;
ReaderEvent assocCodeToCard(ReaderEvent readerEvent, PrintedCard card);
List<Reader> getReaders();
List<ReaderEvent> getReaderEvents(Integer readerId);
ReaderEvent getEvent(Integer eventid);
User findTagFromAnyEvent(String value);
// lets comment this out, so I can see where this is going
// ReaderEvent createCard(ReaderEvent event, EventUser user);
Reader getReader(Integer readerid);
Reader saveReader(Reader reader);
void createReader(Reader reader);
ReaderEvent getLastReaderEvent(Integer readerId);
List<ReaderEvent> getLastReaderEvents();
ReaderEvent checkCode(String readerIdent, String code);
ReaderEvent checkCode(Reader reader, String code);
List<ReaderEvent> getReaderEvents(Integer readerId, Integer count);
List<ReaderEvent> getReaderEventsAfterEvent(Integer readerId, Integer eventId);
}
package fi.codecrew.moya.beans;
import javax.ejb.Local;
@Local
public interface RestBeanLocal {
boolean validateUserNonce(String nonce);
String getLoggedinUserRestNonce();
// String authenticateApp(String pathInfo, String appId, String userid, String applicationStamp, String mac);
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.enums.apps.IAppPermission;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.Role;
/**
*
* @author tuukka
*/
@Local
public interface RoleBeanLocal {
public List<Role> listRoles();
public Role mergeChanges(Role role);
public void create(Role role);
public List<Role> getPossibleParents(Role role);
public Role find(int val);
public Role setPermissions(Role role, List<IAppPermission> newPerms);
public void saveRoles(EventUser usr, List<Role> usersRoles);
public void saveUserSelectableRoles(EventUser user, List<Role> roles);
public List<Role> getRoles(EventUser selectedUser);
Role addRole(EventUser eventuser, Role role);
List<Role> listUserSelectableRoles();
}
package fi.codecrew.moya.beans;
import javax.ejb.Local;
import javax.resource.spi.IllegalStateException;
import fi.codecrew.moya.salespoint.SalespointSessionManager;
@Local
public interface SalesEntitySessionBeanLocal {
SalespointSessionManager getSessionManager() throws IllegalStateException;
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.model.salespoint.Salespoint;
@Local
public interface SalespointBeanLocal {
List<Salespoint> findAll();
}
package fi.codecrew.moya.beans;
import javax.ejb.Local;
import fi.codecrew.moya.salespoint.SalespointSessionManager;
@Local
public interface SalespointContainerBeanLocal {
SalespointSessionManager getSessionManagerBySalespointId(Integer id);
}
package fi.codecrew.moya.beans;
public enum SecurityLogType {
permissionDenied,
unknownException,
genericMessage,
accountEvent,
verkkomaksu,
}
package fi.codecrew.moya.beans;
import java.util.Set;
import javax.ejb.Local;
import javax.servlet.http.HttpSession;
@Local
public interface SessionMgmtBeanLocal {
void sessionCreated(HttpSession session);
void sessionDestroyed(HttpSession session);
/**
*
* @return Unmodifiable list of http sessions
*/
Set<HttpSession> getSessions();
void updateSessionUser(String sessionId, String user);
String getUsername(String sessionId);
}
package fi.codecrew.moya.beans;
import java.util.List;
import java.util.Locale;
import javax.ejb.Local;
import fi.codecrew.moya.model.PageContent;
import fi.codecrew.moya.model.SitePage;
@Local
public interface SitePageBeanLocal {
void create(SitePage sitepage);
SitePage save(SitePage sitepage);
PageContent createContent(SitePage sitepage);
List<SitePage> getPagerootsForUser();
List<SitePage> getPagesForUser(SitePage site);
List<SitePage> findAll();
SitePage find(Integer id);
List<PageContent> findContentsForUser(Integer id, Locale locale);
List<PageContent> findContentsForUser(String name, Locale locale);
SitePage findSitename(String managedPage);
}
package fi.codecrew.moya.beans;
import javax.ejb.Local;
import fi.codecrew.moya.model.Bill;
import fi.codecrew.moya.model.EventMap;
import fi.codecrew.moya.model.IUser;
@Local
public interface TestDataBeanLocal {
EventMap generateTestMap();
void generateTestPlaces(EventMap map);
Bill createBill(IUser u);
IUser createUser();
// public void printPlacesInfo();
void generateTestCompos();
IUser createAdmin();
// EventMap readMap(long bytes);
// void writeMap(byte[] bytes);
void flushMaps();
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.enums.TournamentStatus;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.Tournament;
import fi.codecrew.moya.model.TournamentGame;
import fi.codecrew.moya.model.TournamentParticipant;
import fi.codecrew.moya.model.TournamentRule;
@Local
public interface TournamentBeanLocal {
List<TournamentGame> getGames();
List<TournamentRule> getRulesByGame(TournamentGame tg);
TournamentGame createGame(TournamentGame tg);
TournamentRule createRule(TournamentRule tr);
TournamentGame findGame(Integer id);
TournamentRule findRule(Integer id);
void createTournament(Tournament tournament) throws Exception;
List<Tournament> getActiveTournaments();
Tournament getTournamentById(Integer tournamentId);
void editTournament(Tournament tournament);
void deleteTournament(Tournament tournament);
void createParticipation(TournamentParticipant tournamentParticipant) throws Exception;
boolean hasParticipations(EventUser currentUser, Tournament tournament);
EventUser findAvailablePlayerForTournamentByLogin(Tournament t, String login) throws Exception;
List<Tournament> getTournamentsInStatus(TournamentStatus status,
boolean useTimeConstraints, boolean invertMatch);
List<TournamentParticipant> findOwnParticipations();
void deleteParticipationById(Integer tpid) throws Exception;
void updateTournamentRules(TournamentRule tr) throws Exception;
}
package fi.codecrew.moya.beans;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.Feedback;
import fi.codecrew.moya.model.GameID;
import fi.codecrew.moya.model.GroupMembership;
import fi.codecrew.moya.model.LanEvent;
import fi.codecrew.moya.model.PrintedCard;
import fi.codecrew.moya.model.Role;
import fi.codecrew.moya.model.TournamentGame;
import fi.codecrew.moya.model.User;
import fi.codecrew.moya.model.UserApproval;
import fi.codecrew.moya.model.UserImage;
import fi.codecrew.moya.util.MailMessage;
import fi.codecrew.moya.util.UserSearchQuery;
import fi.codecrew.moya.utilities.SearchQuery;
import fi.codecrew.moya.utilities.SearchResult;
@Local
public interface UserBeanLocal {
List<EventUser> getUsers();
SearchResult<User> getUsers(SearchQuery search);
//SearchResult<User> getEventUsers(SearchQuery search);
EventUser mergeChanges(EventUser user);
UserImage uploadImage(EventUser user, String contentType, InputStream inputStream, String filename, String description);
UserImage findUserImage(int id);
void createNewUser(EventUser user, String password);
User findPasswordResetUser(Integer id, String hash);
boolean resetPassword(User user, String password, String hash);
public User getUser(Integer id);
/**
* Search EventUser entity by User entity ID
*
* @param userid
* ID of the User entity to be searcher
* @return
*/
EventUser findByUserId(Integer userid, boolean createEventuser);
EventUser findByEventUserId(Integer integer);
GroupMembership findToken(String token);
boolean createFromInviteToken(EventUser user, String token);
EventUser acceptInviteForExistingUser(String username, String password, String token);
UserImage findUserimageFORCE(Integer id);
UserImage saveCroppedImage(UserImage currentImage, int left, int top, int width, int height) throws IOException;
EventUser createNewUser(User usr);
boolean userExists(String login);
boolean invite(String invitemail, String url);
EventUser mergeEventUserChanges(EventUser shoppingUser);
List<Role> findUsersRoles(EventUser u);
/**
* NOTICE! If the user parameter is a persisted object the returned
* EventUser has a reloaded user, eg changes to the User object are lost!
*
* @param user
* @return
*/
EventUser getEventUser(User user, boolean create);
EventUser validateUser(String username, String password);
EventUser getUserByBarcode(String barcode);
SearchResult<EventUser> getThisEventsUsers(UserSearchQuery searchQuery);
void submitFeedback(String feedback);
List<Feedback> getFeedbacks();
UserApproval setUserApproval(EventUser user, String approvalName, boolean approvalValue, String notes);
boolean initPasswordResetForEmail(String email, String url);
PrintedCard rejectPrintedCard(PrintedCard card, MailMessage mail);
boolean initPasswordResetForUsername(String username, String url);
void addGameID(TournamentGame game, String gameid);
void removeGameIdById(Integer gameIdId);
GameID getGameIDByGameAndUser(TournamentGame tg, EventUser user);
boolean isUserInRole(EventUser user, Integer roleId);
EventUser getOtherEventsEventuser(User user, LanEvent event);
/**
* Transfers account saldo from previous event. Creates negative
* accountevent for source user and positive for dst user. There are few
* requirements.
* <ul>
* <li>User must be the same.
* <li>Organisation must be the same.
* <li>All users should have positive or zero balance on source event.
* </ul>
*
* @param source
* @param dst
* @return Saldo transferred. Zero if no transfer was made, Null if there
* was error..
*/
BigDecimal transferAccountSaldoFromPreviousEvent(List<User> dstEventuser, LanEvent source);
EventUser getUser(String authcode);
String getAuthCode(EventUser user);
}
package fi.codecrew.moya.beans;
import javax.ejb.Local;
@Local
public interface UserUtilBeanLocal {
void convertUsernames();
}
package fi.codecrew.moya.beans;
import javax.ejb.Local;
import fi.codecrew.moya.util.MailMessage;
import fi.codecrew.moya.model.User;
@Local
public interface UtilBeanLocal {
// boolean sendMail(User user, String subject, String message);
boolean sendMail(MailMessage message);
boolean convertImage(User user);
// void checkAllUsersImages() throws PermissionDeniedException;
}
package fi.codecrew.moya.beans;
import javax.ejb.Local;
import fi.codecrew.moya.util.SvmReturnType;
import fi.codecrew.moya.util.VerkkomaksutReturnEntry;
import fi.codecrew.moya.model.Bill;
@Local
public interface VerkkomaksutFiBeanLocal {
boolean isSvmEnabled();
VerkkomaksutReturnEntry getSvmToken(Bill bill);
boolean validateReturn(SvmReturnType type, String orderNumber, String timestamp, String paid, String method, String authcode);
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.model.Compo;
import fi.codecrew.moya.model.CompoEntry;
import fi.codecrew.moya.model.CompoEntryFile;
import fi.codecrew.moya.model.Vote;
@Local
public interface VotingBeanLocal {
public void createCompo(Compo c);
public void addEntry(CompoEntry compoEntry, CompoEntryFile compoEntryFile);
public List<Compo> getCompoList(boolean showHidden);
public Compo getCompoById(Integer compoId);
public Compo addEntry(CompoEntry entry);
public CompoEntry saveEntry(CompoEntry entry);
public List<CompoEntryFile> getEntryFiles(CompoEntry entry);
public CompoEntryFile findEntryFile(Integer id);
public CompoEntry findEntry(Integer entryId);
public CompoEntry saveSort(CompoEntry e);
public Vote saveVote(CompoEntry entry, Integer vote);
//public CompoEntry findEntryWithFiles(Integer entryId);
public Compo saveCompo(Compo compo);
public void create(CompoEntryFile cef);
public List<CompoEntry> getEntriesForCurrentUser();
}
package fi.codecrew.moya.beans.mail;
import javax.ejb.Local;
@Local
public interface MailBeanLocal {
}
package fi.codecrew.moya.bortal.views;
import java.math.BigDecimal;
import fi.codecrew.moya.model.BillLine;
public class BillSummary {
public BillSummary(String name) {
this.name = name;
}
private String name;
private BigDecimal active = BigDecimal.ZERO;
private BigDecimal paid = BigDecimal.ZERO;
private BigDecimal expired = BigDecimal.ZERO;
public String getName() {
return name;
}
public BigDecimal getActive() {
return active;
}
public void addLine(BillLine bl) {
if (bl.getBill().isExpired()) {
expired = getExpired().add(bl.getQuantity());
} else {
active = getActive().add(bl.getQuantity());
if (bl.getBill().getPaidDate() != null) {
paid = getPaid().add(bl.getQuantity());
}
}
}
public BigDecimal getPaid() {
return paid;
}
public BigDecimal getExpired() {
return expired;
}
}
package fi.codecrew.moya.clientutils;
import java.util.HashMap;
import java.util.Map;
import javax.security.auth.login.LoginContext;
import javax.security.auth.login.LoginException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fi.codecrew.moya.enums.apps.IAppPermission;
public class BortalLocalContextHolder {
private static final ThreadLocal<BortalLocalContextHolder> THREAD_WITH_CONTEXT = new ThreadLocal<BortalLocalContextHolder>();
private String hostname;
private boolean ssl = false;
private Integer hostnameId;
private LoginContext loginContext;
private final Map<IAppPermission, Boolean> rightcache = new HashMap<IAppPermission, Boolean>();
private static boolean inDevelopmentMode = false;
private static final Logger logger = LoggerFactory.getLogger(BortalLocalContextHolder.class);
private BortalLocalContextHolder() {
super();
}
private BortalLocalContextHolder(BortalLocalContextHolder old) {
super();
this.hostname = old.hostname;
this.ssl = old.ssl;
this.loginContext = old.loginContext;
}
public static void setHostname(String hostname) {
getThread().hostname = hostname;
}
public static String getHostname() {
return getThread().getHolderHostname();
}
public static void cleanupThread() {
if (THREAD_WITH_CONTEXT != null) {
THREAD_WITH_CONTEXT.remove();
}
}
public String getHolderHostname() {
return hostname;
}
public static Boolean hasPermission(IAppPermission permission) {
return getThread().hasHolderPermission(permission);
}
private static BortalLocalContextHolder getThread() {
if (THREAD_WITH_CONTEXT.get() == null) {
THREAD_WITH_CONTEXT.set(new BortalLocalContextHolder());
}
return THREAD_WITH_CONTEXT.get();
}
private Boolean hasHolderPermission(IAppPermission target) {
return rightcache.get(target);
}
public static void setPermission(IAppPermission permission, Boolean value) {
getThread().rightcache.put(permission, value);
}
public static BortalLocalContextHolder getInstance() {
return getThread();
}
public static boolean isInDevelopmentMode() {
return inDevelopmentMode;
}
public static void setInDevelopmentMode(boolean developmentMode) {
inDevelopmentMode = developmentMode;
}
public static Integer getHostnameId() {
return getThread().hostnameId;
}
public static void setHostnameId(Integer id)
{
getThread().hostnameId = id;
}
public static boolean isSsl() {
return getThread().ssl;
}
public static void setSsl(boolean ssl) {
getThread().ssl = ssl;
}
public static void copy(BortalLocalContextHolder contextHolder) {
if (THREAD_WITH_CONTEXT.get() != null) {
logger.warn("Context for thread is not empty. Received hostname {}", THREAD_WITH_CONTEXT.get().hostname);
}
THREAD_WITH_CONTEXT.set(new BortalLocalContextHolder(contextHolder));
}
public void setLoginContext(LoginContext loginContext) {
this.loginContext = loginContext;
}
public LoginContext getLoginContext() {
return loginContext;
}
public boolean executeLogin() {
try {
this.loginContext.login();
System.err.println("execute login");
return true;
} catch (LoginException e) {
return false;
}
}
public void executeLogout() {
try {
this.loginContext.logout();
System.err.println("execute logout");
} catch(Exception e) {
}
}
}
\ No newline at end of file
package fi.codecrew.moya.exceptions;
public class BortalCatchableException extends Exception {
private String i18nMessage;
public BortalCatchableException(String string) {
super(string);
}
public BortalCatchableException(String string, String i18nMsg) {
super(string);
setI18nMessage(i18nMsg);
}
public void setI18nMessage(String i18nMessage) {
this.i18nMessage = i18nMessage;
}
public String getI18nMessage() {
return i18nMessage;
}
/**
*
*/
private static final long serialVersionUID = 4744284457862674051L;
}
package fi.codecrew.moya.salespoint;
import java.util.ArrayList;
public class Cart {
ArrayList<CartItem> cartItems;
}
package fi.codecrew.moya.salespoint;
import java.math.BigDecimal;
import fi.codecrew.moya.model.Product;
public class CartItem {
Product product;
BigDecimal quantity;
public String getName() {
return "foo";
}
public BigDecimal getQuantity() {
return new BigDecimal(0);
}
public BigDecimal getUnitPrice() {
return new BigDecimal(0);
}
public BigDecimal getTotal() {
return getUnitPrice().multiply(getQuantity());
}
}
package fi.codecrew.moya.salespoint;
import fi.codecrew.moya.model.EventUser;
public class SalesSession {
EventUser cashierUser;
EventUser customerUser;
Cart shoppingCart;
}
No preview for this file type
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!