-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move some interfaces to implementation project.
Necessary due to current Ecorification limitation to one project.
- Loading branch information
1 parent
937827f
commit c4a43ac
Showing
23 changed files
with
855 additions
and
857 deletions.
There are no files selected for viewing
42 changes: 21 additions & 21 deletions
42
...plication/usermanager/IAuthenticator.java → ...plication/usermanager/IAuthenticator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
|
||
} |
52 changes: 26 additions & 26 deletions
52
...application/usermanager/IUserManager.java → ...application/usermanager/IUserManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |
52 changes: 26 additions & 26 deletions
52
.../usermanager/credentials/ICredential.java → .../usermanager/credentials/ICredential.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |
14 changes: 7 additions & 7 deletions
14
...nager/credentials/ICredentialFactory.java → ...nager/credentials/ICredentialFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
|
||
} |
64 changes: 31 additions & 33 deletions
64
...ta/enterprise/IEnterpriseDataFactory.java → ...ta/enterprise/IEnterpriseDataFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
|
||
} |
File renamed without changes.
132 changes: 66 additions & 66 deletions
132
...m/inventory/data/enterprise/IProduct.java → ...m/inventory/data/enterprise/IProduct.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
|
||
} |
Oops, something went wrong.