| Package | Description |
|---|---|
| net.nowtryz.cafetapi |
Main package for the Cafet API, the API that connect the application to the server
|
| net.nowtryz.cafetapi.datas |
Data managing classes package
|
| net.nowtryz.cafetapi.exceptions |
API exceptions
|
| Modifier and Type | Method and Description |
|---|---|
static APIException |
ServerExceptionsManager.handle(HTTPException e)
Handle HTTP error from the server return more explicit exception
|
| Modifier and Type | Method and Description |
|---|---|
void |
AsyncHandler.handleException(APIException e) |
| Modifier and Type | Method and Description |
|---|---|
DataResult<Choice> |
CafetAPI.addChoice(String name,
int formulaId) |
DataResult<Formula> |
CafetAPI.addFormula(String name) |
DataResult<Formula> |
CafetAPI.addFormula(String name,
double price,
boolean viewable) |
DataResult<Product> |
CafetAPI.addProduct(String name,
int groupId) |
DataResult<Product> |
CafetAPI.addProduct(String name,
int groupId,
double price,
boolean viewable) |
DataResult<ProductGroup> |
CafetAPI.addProductGroup(String name) |
Result |
CafetAPI.addProductToChoice(int choiceId,
int... productIds) |
DataResult<Choice> |
CafetAPI.getChoice(int id) |
DataResult<Client> |
CafetAPI.getClient(int id) |
ArrayResult<Expense> |
CafetAPI.getClientExpenses(int id) |
ArrayResult<Reload> |
CafetAPI.getClientReloads(int id) |
ArrayResult<Client> |
CafetAPI.getClients() |
ArrayResult<ExpenseDetail> |
CafetAPI.getExpenseDetails(int id) |
DataResult<Formula> |
CafetAPI.getFormula(int id) |
DataResult<FormulaBought> |
CafetAPI.getFormulaBought(int id) |
ArrayResult<Choice> |
CafetAPI.getFormulaChoices(int id) |
ArrayResult<Formula> |
CafetAPI.getFormulas(boolean showUnviewable) |
ArrayResult<ProductBought> |
CafetAPI.getFormumaBoughtProducts(int id) |
ArrayResult<Product> |
CafetAPI.getGroupProducts(int id,
boolean showUnviewable) |
DataResult<Product> |
CafetAPI.getProduct(int id) |
DataResult<ProductBought> |
CafetAPI.getProductBought(int id) |
DataResult<ProductGroup> |
CafetAPI.getProductGroup(int id) |
ArrayResult<ProductGroup> |
CafetAPI.getProductGroups() |
void |
AsyncHandler.AsyncResultHandler.handleResult(S result) |
LoginResult |
CafetAPI.login(String email,
String password) |
Result |
CafetAPI.removeFormula(int formulaId) |
Result |
CafetAPI.removeFormulaChoice(int choiceId) |
Result |
CafetAPI.removeProduct(int productId) |
Result |
CafetAPI.removeProductFromChoice(int choiceId,
int... productIds) |
Result |
CafetAPI.removeProductGroup(int groupId) |
Result |
CafetAPI.saveOrder(int clientId,
Map<Product,Integer> products,
Map<OrderBuilder.FormulaBuilder,Product[]> formulas) |
Result |
CafetAPI.saveReload(int clientId,
float amount) |
ArrayResult<Client> |
CafetAPI.searchClient(String expression) |
Result |
CafetAPI.setChoiceName(int choiceId,
String name) |
Result |
CafetAPI.setFormulaImage(int formulaId,
Image image,
String format) |
Result |
CafetAPI.setFormulaName(int formulaId,
String name) |
Result |
CafetAPI.setFormulaPrice(int formulaId,
float price) |
Result |
CafetAPI.setFormulaVisibility(int formulaId,
boolean visilility) |
Result |
CafetAPI.setProductGroup(int productId,
int groupId) |
Result |
CafetAPI.setProductGroupDisplayName(int groupId,
String displayName) |
Result |
CafetAPI.setProductGroupName(int groupId,
String name) |
Result |
CafetAPI.setProductImage(int productId,
Image image,
String format) |
Result |
CafetAPI.setProductName(int productId,
String name) |
Result |
CafetAPI.setProductPrice(int productId,
float price) |
Result |
CafetAPI.setProductVisibility(int productId,
boolean visilility) |
| Modifier and Type | Method and Description |
|---|---|
void |
Choice.addProduct(Product product) |
OrderBuilder.FormulaBuilder |
OrderBuilder.buildFormula(Formula formula) |
Choice |
Formula.createNewChoice(String name) |
void |
Formula.delete() |
abstract void |
Payable.delete() |
void |
ProductGroup.delete()
Delete this group from the database
|
void |
Choice.delete() |
void |
Product.delete()
Delete this product from the database
|
Product[] |
ProductGroup.getAllProducts()
Return products of this group included unviewable ones
|
Choice[] |
Formula.getChoices()
Return the choices
|
Client |
Expense.getClient()
Return the client who has spent money
|
Client |
Reload.getClient()
Return the client
|
Client |
ExpenseDetail.getClient()
Return the client
|
ExpenseDetail[] |
Expense.getDetails()
Return the itemized bill
|
Expense[] |
Client.getExpenses()
Return a list of latest client's expenses
|
Formula |
FormulaBought.getFormula()
Return the formula
|
Formula |
Choice.getFormula()
Return the formula
|
ProductGroup |
Product.getGroup()
Return the group
|
Product |
ProductBought.getProduct()
Return the product
|
ProductBought[] |
FormulaBought.getProducts()
Return the products
|
Product[] |
ProductGroup.getProducts()
Return products of this group exept unviewable ones
|
Reload[] |
Client.getReloads()
Return a list of latest client's reloads
|
void |
Choice.remove(Product product) |
void |
OrderBuilder.save(CafetAPI api,
int clientId) |
void |
ProductGroup.setDisplayName(String displayName)
Sets displayName
|
void |
Product.setGroup(ProductGroup group)
Sets group
|
void |
Formula.setImage(Image image,
String format) |
abstract void |
Payable.setImage(Image image,
String format)
Sets image
|
void |
Product.setImage(Image image,
String format)
Sets image
|
void |
Formula.setName(String name) |
abstract void |
Payable.setName(String name)
Sets name
|
void |
ProductGroup.setName(String name)
Sets name
|
void |
Choice.setName(String name)
Sets name
|
void |
Product.setName(String name)
Sets name
|
void |
Formula.setPrice(float price) |
abstract void |
Payable.setPrice(float price)
Sets price
|
void |
Product.setPrice(float price)
Sets price
|
void |
Formula.setViewable(boolean viewable) |
abstract void |
Payable.setViewable(boolean viewable)
Sets viewable
|
void |
Product.setViewable(boolean viewable)
Sets viewable
|
void |
Client.update()
Update information about the client
|
| Modifier and Type | Class and Description |
|---|---|
class |
AuthenticationException |
class |
BannedUserException |
class |
ContentTypeException |
class |
FailedAuthenticationException |
class |
HTTPException |
class |
IllegalResultException |
class |
IllegalStatusException |
class |
MissingResultElementException |
class |
PermissionException |
class |
QueryException |
class |
ResultException |
class |
ResultSemanticException |
class |
ServerErrorException |
Copyright © 2019 Nowtryz. All rights reserved.