Skip to content

Commit

Permalink
Move some interfaces to implementation project.
Browse files Browse the repository at this point in the history
Necessary due to current Ecorification limitation to one project.
  • Loading branch information
HeikoKlare committed Mar 31, 2018
1 parent 937827f commit c4a43ac
Show file tree
Hide file tree
Showing 23 changed files with 855 additions and 857 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
package org.cocome.tradingsystem.inventory.application.usermanager;

import org.cocome.tradingsystem.inventory.data.usermanager.IUser;
import org.cocome.tradingsystem.util.exception.NotInDatabaseException;

/**
* Interface for the authentication of users.
*
* @author Tobias Pöppke
* @author Robert Heinrich
*/
public interface IAuthenticator {
public boolean checkCredentials(IUser user) throws NotInDatabaseException;

public boolean checkHasRole(IUser user, Role role) throws NotInDatabaseException;

IUser requestAuthToken(String username) throws NotInDatabaseException;

boolean revokeAuthToken(String username);

}
package org.cocome.tradingsystem.inventory.application.usermanager;

import org.cocome.tradingsystem.inventory.data.usermanager.IUser;
import org.cocome.tradingsystem.util.exception.NotInDatabaseException;

/**
* Interface for the authentication of users.
*
* @author Tobias Pöppke
* @author Robert Heinrich
*/
public interface IAuthenticator {
public boolean checkCredentials(IUser user) throws NotInDatabaseException;

public boolean checkHasRole(IUser user, Role role) throws NotInDatabaseException;

IUser requestAuthToken(String username) throws NotInDatabaseException;

boolean revokeAuthToken(String username);

}
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
package org.cocome.tradingsystem.inventory.application.usermanager;

import org.cocome.tradingsystem.inventory.application.store.CustomerWithStoreTO;
import org.cocome.tradingsystem.inventory.data.usermanager.ICustomer;
import org.cocome.tradingsystem.inventory.data.usermanager.IUser;
import org.cocome.tradingsystem.util.exception.NotInDatabaseException;

/**
* Interface for the management of users.
*
* @author Tobias Pöppke
* @author Robert Heinrich
*/
public interface IUserManager {

IUser getUserByName(String username) throws NotInDatabaseException;

ICustomer getCustomerByName(String username) throws NotInDatabaseException;

boolean createUser(UserTO userTO);

boolean createCustomer(CustomerWithStoreTO customerTO);

boolean updateUser(UserTO userTO);

boolean updateCustomer(CustomerWithStoreTO customerTO);
package org.cocome.tradingsystem.inventory.application.usermanager;

import org.cocome.tradingsystem.inventory.application.store.CustomerWithStoreTO;
import org.cocome.tradingsystem.inventory.data.usermanager.ICustomer;
import org.cocome.tradingsystem.inventory.data.usermanager.IUser;
import org.cocome.tradingsystem.util.exception.NotInDatabaseException;

/**
* Interface for the management of users.
*
* @author Tobias Pöppke
* @author Robert Heinrich
*/
public interface IUserManager {

IUser getUserByName(String username) throws NotInDatabaseException;

ICustomer getCustomerByName(String username) throws NotInDatabaseException;

boolean createUser(UserTO userTO);

boolean createCustomer(CustomerWithStoreTO customerTO);

boolean updateUser(UserTO userTO);

boolean updateCustomer(CustomerWithStoreTO customerTO);
}
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
package org.cocome.tradingsystem.inventory.application.usermanager.credentials;

import org.cocome.tradingsystem.inventory.application.usermanager.CredentialType;
import org.cocome.tradingsystem.inventory.data.usermanager.IUser;

/**
* Interface for credentials.
*
* @author Tobias Pöppke
* @author Robert Heinrich
*/
public interface ICredential {
public CredentialType getType();

public boolean isMatching(ICredential credential);

public String getCredentialString();

public void setCredentialString(String credential);

public char[] getCredentialChars();

public void setCredentialChars(char[] credential);

public char[] resetCredential(IUser user);
}
package org.cocome.tradingsystem.inventory.application.usermanager.credentials;

import org.cocome.tradingsystem.inventory.application.usermanager.CredentialType;
import org.cocome.tradingsystem.inventory.data.usermanager.IUser;

/**
* Interface for credentials.
*
* @author Tobias Pöppke
* @author Robert Heinrich
*/
public interface ICredential {
public CredentialType getType();

public boolean isMatching(ICredential credential);

public String getCredentialString();

public void setCredentialString(String credential);

public char[] getCredentialChars();

public void setCredentialChars(char[] credential);

public char[] resetCredential(IUser user);
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.cocome.tradingsystem.inventory.application.usermanager.credentials;

import org.cocome.tradingsystem.inventory.application.usermanager.CredentialType;

public interface ICredentialFactory {
ICredential getCredential(CredentialType type);

package org.cocome.tradingsystem.inventory.application.usermanager.credentials;

import org.cocome.tradingsystem.inventory.application.usermanager.CredentialType;

public interface ICredentialFactory {
ICredential getCredential(CredentialType type);

}
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
package org.cocome.tradingsystem.inventory.data.enterprise;

import org.cocome.tradingsystem.inventory.application.store.EnterpriseTO;
import org.cocome.tradingsystem.inventory.application.store.ProductTO;
import org.cocome.tradingsystem.inventory.application.store.ProductWithSupplierTO;
import org.cocome.tradingsystem.inventory.application.store.StoreWithEnterpriseTO;
import org.cocome.tradingsystem.inventory.application.store.SupplierTO;
import org.cocome.tradingsystem.inventory.data.store.IStore;
import org.cocome.tradingsystem.util.exception.NotInDatabaseException;

public interface IEnterpriseDataFactory {

public IProduct getNewProduct();

public IProductSupplier getNewProductSupplier();

public ITradingEnterprise getNewTradingEnterprise();

public IProduct convertToProduct(ProductTO productTO);

public ITradingEnterprise convertToEnterprise(EnterpriseTO enterpriseTO);

public IProductSupplier convertToSupplier(SupplierTO supplierTO);

public SupplierTO fillSupplierTO(IProductSupplier supplier);

public EnterpriseTO fillEnterpriseTO(ITradingEnterprise enterprise);

public ProductTO fillProductTO(IProduct product);

public ProductWithSupplierTO fillProductWithSupplierTO(
IProduct product) throws NotInDatabaseException;

package org.cocome.tradingsystem.inventory.data.enterprise;

import org.cocome.tradingsystem.inventory.application.store.EnterpriseTO;
import org.cocome.tradingsystem.inventory.application.store.ProductTO;
import org.cocome.tradingsystem.inventory.application.store.ProductWithSupplierTO;
import org.cocome.tradingsystem.inventory.application.store.SupplierTO;
import org.cocome.tradingsystem.util.exception.NotInDatabaseException;

public interface IEnterpriseDataFactory {

public IProduct getNewProduct();

public IProductSupplier getNewProductSupplier();

public ITradingEnterprise getNewTradingEnterprise();

public IProduct convertToProduct(ProductTO productTO);

public ITradingEnterprise convertToEnterprise(EnterpriseTO enterpriseTO);

public IProductSupplier convertToSupplier(SupplierTO supplierTO);

public SupplierTO fillSupplierTO(IProductSupplier supplier);

public EnterpriseTO fillEnterpriseTO(ITradingEnterprise enterprise);

public ProductTO fillProductTO(IProduct product);

public ProductWithSupplierTO fillProductWithSupplierTO(
IProduct product) throws NotInDatabaseException;

}
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
package org.cocome.tradingsystem.inventory.data.enterprise;

import org.cocome.tradingsystem.util.exception.NotInDatabaseException;

public interface IProduct {

/**
* Gets identifier value
*
* @return The id.
*/
long getId();

/**
* Sets identifier.
*
* @param id
* Identifier value.
*/
void setId(long id);

/**
* @return The barcode of the product
*/
long getBarcode();

/**
* @param barcode
* The barcode of the product
*/
void setBarcode(long barcode);

/**
* @return The name of the product
*/
String getName();

/**
* @param name
* The name of the product
*/
void setName(String name);

/**
* @return The ProductSupplier of this product
* @throws NotInDatabaseException
*/
IProductSupplier getSupplier() throws NotInDatabaseException;

/**
* @param supplier
* The ProductSupplier of this product
*/
void setSupplier(IProductSupplier supplier);

/**
* @return The purchase price of this product
*/
double getPurchasePrice();

/**
* @param purchasePrice
* The purchase price of this product
*/
void setPurchasePrice(double purchasePrice);

package org.cocome.tradingsystem.inventory.data.enterprise;

import org.cocome.tradingsystem.util.exception.NotInDatabaseException;

public interface IProduct {

/**
* Gets identifier value
*
* @return The id.
*/
long getId();

/**
* Sets identifier.
*
* @param id
* Identifier value.
*/
void setId(long id);

/**
* @return The barcode of the product
*/
long getBarcode();

/**
* @param barcode
* The barcode of the product
*/
void setBarcode(long barcode);

/**
* @return The name of the product
*/
String getName();

/**
* @param name
* The name of the product
*/
void setName(String name);

/**
* @return The ProductSupplier of this product
* @throws NotInDatabaseException
*/
IProductSupplier getSupplier() throws NotInDatabaseException;

/**
* @param supplier
* The ProductSupplier of this product
*/
void setSupplier(IProductSupplier supplier);

/**
* @return The purchase price of this product
*/
double getPurchasePrice();

/**
* @param purchasePrice
* The purchase price of this product
*/
void setPurchasePrice(double purchasePrice);

}
Loading

0 comments on commit c4a43ac

Please sign in to comment.